linux/Documentation/virt/kvm
Sean Christopherson bb58b90b1a KVM: Introduce KVM_SET_USER_MEMORY_REGION2
Introduce a "version 2" of KVM_SET_USER_MEMORY_REGION so that additional
information can be supplied without setting userspace up to fail.  The
padding in the new kvm_userspace_memory_region2 structure will be used to
pass a file descriptor in addition to the userspace_addr, i.e. allow
userspace to point at a file descriptor and map memory into a guest that
is NOT mapped into host userspace.

Alternatively, KVM could simply add "struct kvm_userspace_memory_region2"
without a new ioctl(), but as Paolo pointed out, adding a new ioctl()
makes detection of bad flags a bit more robust, e.g. if the new fd field
is guarded only by a flag and not a new ioctl(), then a userspace bug
(setting a "bad" flag) would generate out-of-bounds access instead of an
-EINVAL error.

Cc: Jarkko Sakkinen <jarkko@kernel.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Message-Id: <20231027182217.3615211-9-seanjc@google.com>
Acked-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-11-13 05:30:41 -05:00
..
arm KVM: arm64: Document vCPU feature selection UAPIs 2023-10-04 17:11:51 +00:00
devices KVM: arm64: Clarify the ordering requirements for vcpu/RD creation 2023-09-30 18:15:44 +00:00
s390 ARM: 2022-08-04 14:59:54 -07:00
x86 KVM: Documentation: Add the missing description for tdp_mmu_page into kvm_mmu_page 2023-09-27 13:32:18 -07:00
api.rst KVM: Introduce KVM_SET_USER_MEMORY_REGION2 2023-11-13 05:30:41 -05:00
halt-polling.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
index.rst KVM: Move halt-polling documentation into common directory 2022-12-02 13:20:30 -05:00
locking.rst Documentation: KVM: make corrections to locking.rst 2023-06-16 08:20:53 -06:00
ppc-pv.rst Documentation: KVM: make corrections to ppc-pv.rst 2023-06-16 08:20:53 -06:00
review-checklist.rst docs: fix broken references for ReST files that moved around 2020-04-20 15:45:03 -06:00
vcpu-requests.rst Documentation: KVM: make corrections to vcpu-requests.rst 2023-06-16 08:20:53 -06:00