KVM: VMX: Add module parameter and emulation flag.
authorMohammed Gamal <m.gamal005@gmail.com>
Sun, 17 Aug 2008 13:39:48 +0000 (16:39 +0300)
committerAvi Kivity <avi@qumranet.com>
Wed, 15 Oct 2008 08:15:20 +0000 (10:15 +0200)
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>
arch/x86/kvm/vmx.c

index e889b76..7c5f611 100644 (file)
@@ -49,6 +49,9 @@ module_param(flexpriority_enabled, bool, 0);
 static int enable_ept = 1;
 module_param(enable_ept, bool, 0);
 
+static int emulate_invalid_guest_state = 0;
+module_param(emulate_invalid_guest_state, bool, 0);
+
 struct vmcs {
        u32 revision_id;
        u32 abort;
@@ -86,6 +89,7 @@ struct vcpu_vmx {
                } irq;
        } rmode;
        int vpid;
+       bool emulation_required;
 };
 
 static inline struct vcpu_vmx *to_vmx(struct kvm_vcpu *vcpu)