aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorMohammed Gamal <m.gamal005@gmail.com>2008-08-17 09:39:48 -0400
committerAvi Kivity <avi@qumranet.com>2008-10-15 04:15:20 -0400
commit04fa4d32117b1a7773290fd59a97cf90cfc2a0d4 (patch)
tree5150302a1465b6adaf9c4812701cded318168759 /arch/x86/kvm/vmx.c
parent648dfaa7df2d3692db4e63dcb18dccb275d9c5a7 (diff)
KVM: VMX: Add module parameter and emulation flag.
The patch adds the module parameter required to enable emulating invalid guest state, as well as the emulation_required flag used to drive emulation whenever needed. Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index e889b768c751..7c5f611e1a94 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -49,6 +49,9 @@ module_param(flexpriority_enabled, bool, 0);
49static int enable_ept = 1; 49static int enable_ept = 1;
50module_param(enable_ept, bool, 0); 50module_param(enable_ept, bool, 0);
51 51
52static int emulate_invalid_guest_state = 0;
53module_param(emulate_invalid_guest_state, bool, 0);
54
52struct vmcs { 55struct vmcs {
53 u32 revision_id; 56 u32 revision_id;
54 u32 abort; 57 u32 abort;
@@ -86,6 +89,7 @@ struct vcpu_vmx {
86 } irq; 89 } irq;
87 } rmode; 90 } rmode;
88 int vpid; 91 int vpid;
92 bool emulation_required;
89}; 93};
90 94
91static inline struct vcpu_vmx *to_vmx(struct kvm_vcpu *vcpu) 95static inline struct vcpu_vmx *to_vmx(struct kvm_vcpu *vcpu)