diff options
Diffstat (limited to 'drivers/kvm')
-rw-r--r-- | drivers/kvm/svm.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index f6e86528f031..aaa6742089e5 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -1076,6 +1076,20 @@ static int halt_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
1076 | return 0; | 1076 | return 0; |
1077 | } | 1077 | } |
1078 | 1078 | ||
1079 | static int vmmcall_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | ||
1080 | { | ||
1081 | printk(KERN_DEBUG "got vmmcall at RIP %08llx\n", | ||
1082 | vcpu->svm->vmcb->save.rip); | ||
1083 | printk(KERN_DEBUG "vmmcall params: %08llx, %08lx, %08lx, %08lx\n", | ||
1084 | vcpu->svm->vmcb->save.rax, | ||
1085 | vcpu->regs[VCPU_REGS_RCX], | ||
1086 | vcpu->regs[VCPU_REGS_RDX], | ||
1087 | vcpu->regs[VCPU_REGS_RBP]); | ||
1088 | vcpu->svm->vmcb->save.rax = 0; | ||
1089 | vcpu->svm->vmcb->save.rip += 3; | ||
1090 | return 1; | ||
1091 | } | ||
1092 | |||
1079 | static int invalid_op_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | 1093 | static int invalid_op_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) |
1080 | { | 1094 | { |
1081 | inject_ud(vcpu); | 1095 | inject_ud(vcpu); |
@@ -1276,7 +1290,7 @@ static int (*svm_exit_handlers[])(struct kvm_vcpu *vcpu, | |||
1276 | [SVM_EXIT_TASK_SWITCH] = task_switch_interception, | 1290 | [SVM_EXIT_TASK_SWITCH] = task_switch_interception, |
1277 | [SVM_EXIT_SHUTDOWN] = shutdown_interception, | 1291 | [SVM_EXIT_SHUTDOWN] = shutdown_interception, |
1278 | [SVM_EXIT_VMRUN] = invalid_op_interception, | 1292 | [SVM_EXIT_VMRUN] = invalid_op_interception, |
1279 | [SVM_EXIT_VMMCALL] = invalid_op_interception, | 1293 | [SVM_EXIT_VMMCALL] = vmmcall_interception, |
1280 | [SVM_EXIT_VMLOAD] = invalid_op_interception, | 1294 | [SVM_EXIT_VMLOAD] = invalid_op_interception, |
1281 | [SVM_EXIT_VMSAVE] = invalid_op_interception, | 1295 | [SVM_EXIT_VMSAVE] = invalid_op_interception, |
1282 | [SVM_EXIT_STGI] = invalid_op_interception, | 1296 | [SVM_EXIT_STGI] = invalid_op_interception, |