aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2018-10-08 21:28:05 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-17 00:30:02 +0200
commit44dd3ffa7bb31126e0fc4f6f30398546eb494388 (patch)
tree39b059882ee455fa9ed4c5e40dbe8ad9c536eafc /arch/x86/include/asm/kvm_host.h
parentkvm: x86: optimize dr6 restore (diff)
downloadlinux-dev-44dd3ffa7bb31126e0fc4f6f30398546eb494388.tar.xz
linux-dev-44dd3ffa7bb31126e0fc4f6f30398546eb494388.zip
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>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r--arch/x86/include/asm/kvm_host.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 901572b4f6f7..5e8f1a08b9d2 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -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)