Closed ZenithalHourlyRate closed 1 year ago
Make this a pull request and we will merge it in. I am running EPYC with SEV and can verify this. Be sure to bump the KVMFR version in the module and in the DKMS config, and add yourself to AUTHORS
An extra question: Have LookingGlass considered upstreaming the ivshmem pci driver part to the mainline? Such a device would be handy for many other use cases.
This has been raised many times, someone at one point even attempted to upstream it on our behalf. The reason we did not do this is that we knew that it would be rejected (and it was) as it largely duplicates existing functionality in the kernel already. We need this driver to work around an intentional security limitation in the uio implementation that prevents us using DMABUF.
we knew that it would be rejected (and it was)
Could a link to that patch thread be provided?
it largely duplicates existing functionality in the kernel already
I am curious which driver would do the similar thing
Could a link to that patch thread be provided?
If I can find it, it was quite some time ago
I am curious which driver would do the similar thing
udambuf, I wrote KVMFR largely based on this module, but removing the F_SEAL_SHRINK
seal requirement on the file used. This seal was preventing us from using a shared memory file for a dmabuf as a shared memory file can be shrunk in size while in use. I proposed removing this restriction but it was rejected.
This is kind of a bug report as the current kvmfr kernel module does not work in a VM when AMD SEV is enabled, but it seems that it is mostly not the use case here so I just post it as a note in case some other people encounter the same issue.
Some background, AMD SEV (Secure Encrypted Virtualization) will bring up a VM with its memory fully encrypted. kvmfr will "hotplug" the ivshmem to the VM as normal memory, so it will also be encrypted. However, once ivshmem is encrypted it is not shared anymore, so we need to clear the encryption bit of the PTE of the ivshmem.