|
@@ -2770,12 +2770,6 @@ static int xsetbv_interception(struct vcpu_svm *svm)
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
-static int invalid_op_interception(struct vcpu_svm *svm)
|
|
|
-{
|
|
|
- kvm_queue_exception(&svm->vcpu, UD_VECTOR);
|
|
|
- return 1;
|
|
|
-}
|
|
|
-
|
|
|
static int task_switch_interception(struct vcpu_svm *svm)
|
|
|
{
|
|
|
u16 tss_selector;
|
|
@@ -3287,6 +3281,24 @@ static int pause_interception(struct vcpu_svm *svm)
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+static int nop_interception(struct vcpu_svm *svm)
|
|
|
+{
|
|
|
+ skip_emulated_instruction(&(svm->vcpu));
|
|
|
+ return 1;
|
|
|
+}
|
|
|
+
|
|
|
+static int monitor_interception(struct vcpu_svm *svm)
|
|
|
+{
|
|
|
+ printk_once(KERN_WARNING "kvm: MONITOR instruction emulated as NOP!\n");
|
|
|
+ return nop_interception(svm);
|
|
|
+}
|
|
|
+
|
|
|
+static int mwait_interception(struct vcpu_svm *svm)
|
|
|
+{
|
|
|
+ printk_once(KERN_WARNING "kvm: MWAIT instruction emulated as NOP!\n");
|
|
|
+ return nop_interception(svm);
|
|
|
+}
|
|
|
+
|
|
|
static int (*const svm_exit_handlers[])(struct vcpu_svm *svm) = {
|
|
|
[SVM_EXIT_READ_CR0] = cr_interception,
|
|
|
[SVM_EXIT_READ_CR3] = cr_interception,
|
|
@@ -3344,8 +3356,8 @@ static int (*const svm_exit_handlers[])(struct vcpu_svm *svm) = {
|
|
|
[SVM_EXIT_CLGI] = clgi_interception,
|
|
|
[SVM_EXIT_SKINIT] = skinit_interception,
|
|
|
[SVM_EXIT_WBINVD] = emulate_on_interception,
|
|
|
- [SVM_EXIT_MONITOR] = invalid_op_interception,
|
|
|
- [SVM_EXIT_MWAIT] = invalid_op_interception,
|
|
|
+ [SVM_EXIT_MONITOR] = monitor_interception,
|
|
|
+ [SVM_EXIT_MWAIT] = mwait_interception,
|
|
|
[SVM_EXIT_XSETBV] = xsetbv_interception,
|
|
|
[SVM_EXIT_NPF] = pf_interception,
|
|
|
};
|