OSDN Git Service

KVM: x86/mmu: Use shadow page role to detect PML-unfriendly pages for L2
authorSean Christopherson <seanjc@google.com>
Thu, 18 Nov 2021 02:08:42 +0000 (18:08 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Dec 2021 09:24:41 +0000 (04:24 -0500)
commitce92ef7604ffe74da84f559f6eba8c6053250451
tree0e9cfe20eb6172341195c76f57b201ecbdeb3ba9
parent8fc78909c05d1691c0d087cb1b9a4858762c747d
KVM: x86/mmu: Use shadow page role to detect PML-unfriendly pages for L2

Rework make_spte() to query the shadow page's role, specifically whether
or not it's a guest_mode page, a.k.a. a page for L2, when determining if
the SPTE is compatible with PML.  This eliminates a dependency on @vcpu,
with a future goal of being able to create SPTEs without a specific vCPU.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu_internal.h
arch/x86/kvm/mmu/spte.c