summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/vmx/vmcs.h
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2019-05-07 22:17:58 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2019-06-18 12:47:43 +0300
commit09e226cf07e6bf85d885afa43fabc02b88dc1652 (patch)
treea221f176031c9ad7037d6b2c654e138e5674db1f /arch/x86/kvm/vmx/vmcs.h
parentfe7f895dae4fa5725c0459b316b3e9ee814d2583 (diff)
downloadlinux-09e226cf07e6bf85d885afa43fabc02b88dc1652.tar.xz
KVM: nVMX: Shadow VMCS controls on a per-VMCS basis
... to pave the way for not preserving the shadow copies across switches between vmcs01 and vmcs02, and eventually to avoid VMWRITEs to vmcs02 when the desired value is unchanged across nested VM-Enters. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx/vmcs.h')
-rw-r--r--arch/x86/kvm/vmx/vmcs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx/vmcs.h b/arch/x86/kvm/vmx/vmcs.h
index 971a46c69df4..52f12d78e4fa 100644
--- a/arch/x86/kvm/vmx/vmcs.h
+++ b/arch/x86/kvm/vmx/vmcs.h
@@ -42,6 +42,14 @@ struct vmcs_host_state {
#endif
};
+struct vmcs_controls_shadow {
+ u32 vm_entry;
+ u32 vm_exit;
+ u32 pin;
+ u32 exec;
+ u32 secondary_exec;
+};
+
/*
* Track a VMCS that may be loaded on a certain CPU. If it is (cpu!=-1), also
* remember whether it was VMLAUNCHed, and maintain a linked list of all VMCSs
@@ -61,6 +69,7 @@ struct loaded_vmcs {
unsigned long *msr_bitmap;
struct list_head loaded_vmcss_on_cpu_link;
struct vmcs_host_state host_state;
+ struct vmcs_controls_shadow controls_shadow;
};
static inline bool is_exception_n(u32 intr_info, u8 vector)