diff options
author | 2024-02-22 11:06:08 -0800 | |
---|---|---|
committer | 2024-02-22 17:07:06 -0800 | |
commit | e563592224e02f87048edee3ce3f0da16cceee88 (patch) | |
tree | ad0976f7e30ac681a603bfdc5db8cd19def4aba4 /arch | |
parent | Merge tag 'kvmarm-fixes-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
download | linux-e563592224e02f87048edee3ce3f0da16cceee88.tar.gz linux-e563592224e02f87048edee3ce3f0da16cceee88.tar.bz2 linux-e563592224e02f87048edee3ce3f0da16cceee88.zip |
KVM: Make KVM_MEM_GUEST_MEMFD mutually exclusive with KVM_MEM_READONLY
Disallow creating read-only memslots that support GUEST_MEMFD, as
GUEST_MEMFD is fundamentally incompatible with KVM's semantics for
read-only memslots. Read-only memslots allow the userspace VMM to emulate
option ROMs by filling the backing memory with readable, executable code
and data, while triggering emulated MMIO on writes. GUEST_MEMFD doesn't
currently support writes from userspace and KVM doesn't support emulated
MMIO on private accesses, i.e. the guest can only ever read zeros, and
writes will always be treated as errors.
Cc: Fuad Tabba <tabba@google.com>
Cc: Michael Roth <michael.roth@amd.com>
Cc: Isaku Yamahata <isaku.yamahata@gmail.com>
Cc: Yu Zhang <yu.c.zhang@linux.intel.com>
Cc: Chao Peng <chao.p.peng@linux.intel.com>
Fixes: a7800aa80ea4 ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory")
Link: https://lore.kernel.org/r/20240222190612.2942589-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions