浏览代码

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>
Mohammed Gamal 17 年之前
父节点
当前提交
04fa4d3211
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      arch/x86/kvm/vmx.c

+ 4 - 0
arch/x86/kvm/vmx.c

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