]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: x86/mmu: Reject direct bits in gpa passed to KVM_PRE_FAULT_MEMORY
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Jun 2025 04:47:44 +0000 (00:47 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Jun 2025 04:51:42 +0000 (00:51 -0400)
commit8046d29dde17002523f94d3e6e0ebe486ce52166
tree8fae8cdb87a817126365595643df883f16b5e979
parentaa2024c01a9afba6728b362626f868811ca872ee
KVM: x86/mmu: Reject direct bits in gpa passed to KVM_PRE_FAULT_MEMORY

Only let userspace pass the same addresses that were used in KVM_SET_USER_MEMORY_REGION
(or KVM_SET_USER_MEMORY_REGION2); gpas in the the upper half of the address space
are an implementation detail of TDX and KVM.

Extracted from a patch by Sean Christopherson <seanjc@google.com>.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c