]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Use MMU's role/role_regs to compute context's metadata
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:21 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:44 +0000 (18:00 -0400)
commit2e330b90a52e8646fa729491684801f3949f41f0
treed3c4089309d3ea90ed37d222d13cad421ff5d24b
parent1b5fe319e2c153c0cfa6d71b22624905c5c8048c
KVM: x86/mmu: Use MMU's role/role_regs to compute context's metadata

Use the MMU's role and role_regs to calculate the MMU's guest root level
and NX bit.  For some flows, the vCPU state may not be correct (or
relevant), e.g. EPT doesn't interact with EFER.NX and nested NPT will
configure the guest_mmu with possibly-stale vCPU state.

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