]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Use MMU's role to compute PKRU bitmask
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:18 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:43 +0000 (18:00 -0400)
commit2c438f9d16d618d3376eacd96e4f0150ae4b17f6
tree824d4d46bc9a0f945434938a043323c661ec6af0
parent370c608daa8de0bc874418bca5021904585aba94
KVM: x86/mmu: Use MMU's role to compute PKRU bitmask

Use the MMU's role to calculate the Protection Keys (Restrict Userspace)
bitmask instead of pulling bits from current vCPU state.  For some flows,
the vCPU state may not be correct (or relevant), e.g. EPT doesn't
interact with PKRU.  Case in point, the "ept" param simply disappears.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210622175739.3610207-34-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c