Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KVM: x86/mmu: Track PRIVATE impact on hugepage mappings for all memslots
Track the effects of private attributes on potential hugepage mappings if the VM supports private memory, i.e. even if the target memslot can only ever be mapped shared. If userspace configures a chunk of memory as private, KVM must not allow that memory to be mapped shared regardless of whether or not the *current* memslot can be mapped private. E.g. if the guest accesses a private range using a shared memslot, then KVM must exit to userspace. Fixes: 5bb0b4e ("KVM: x86: Disallow hugepages when memory attributes are mixed") Link: https://lore.kernel.org/r/20230921203331.3746712-8-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
- Loading branch information