]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Use MMU's role_regs, not vCPU state, to compute mmu_role
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:08 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:40 +0000 (18:00 -0400)
commitd37b8dfd8f2326d6a8eec7d6471d3a732f7a34db
treebaee9510863acbd751fb1e16833c1f402831dccc
parentce7270d0ac33a11c610610efdefa31cd89983d26
KVM: x86/mmu: Use MMU's role_regs, not vCPU state, to compute mmu_role

Use the provided role_regs to calculate the mmu_role instead of pulling
bits from current vCPU state.  For some flows, e.g. nested TDP, the vCPU
state may not be correct (or relevant).

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