Skip to content

Commit

Permalink
x86/kvm/mmu: make vcpu->mmu a pointer to the current MMU
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vitaly Kuznetsov authored and Paolo Bonzini committed Oct 16, 2018
1 parent 0e0a53c commit 44dd3ff
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 124 deletions.
5 changes: 4 additions & 1 deletion arch/x86/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,10 @@ struct kvm_vcpu_arch {
* the paging mode of the l1 guest. This context is always used to
* handle faults.
*/
struct kvm_mmu mmu;
struct kvm_mmu *mmu;

/* Non-nested MMU for L1 */
struct kvm_mmu root_mmu;

/*
* Paging state of an L2 guest (used for nested npt)
Expand Down
Loading

0 comments on commit 44dd3ff

Please sign in to comment.