Skip to content

Commit 44dd3ff

Browse files
vittyvkbonzini
authored andcommitted
x86/kvm/mmu: make vcpu->mmu a pointer to the current MMU
As a preparation to full MMU split between L1 and L2 make vcpu->arch.mmu a pointer to the currently used mmu. For now, this is always vcpu->arch.root_mmu. No functional change. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
1 parent 0e0a53c commit 44dd3ff

File tree

8 files changed

+130
-124
lines changed

8 files changed

+130
-124
lines changed

arch/x86/include/asm/kvm_host.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,10 @@ struct kvm_vcpu_arch {
543543
* the paging mode of the l1 guest. This context is always used to
544544
* handle faults.
545545
*/
546-
struct kvm_mmu mmu;
546+
struct kvm_mmu *mmu;
547+
548+
/* Non-nested MMU for L1 */
549+
struct kvm_mmu root_mmu;
547550

548551
/*
549552
* Paging state of an L2 guest (used for nested npt)

0 commit comments

Comments
 (0)