summaryrefslogtreecommitdiff
path: root/drivers/kvm/svm.c
diff options
context:
space:
mode:
authorDor Laor <dor.laor@qumranet.com>2007-02-19 16:25:43 (GMT)
committerAvi Kivity <avi@qumranet.com>2007-05-03 07:52:22 (GMT)
commit510043da8582ad49d22a1e9a6b211e6ede10cd2e (patch)
tree0ded38e3d2fb77d02c59a6afce464d15d75e1cca /drivers/kvm/svm.c
parent9b22bf578332d3e326c349bc8a8789af3d952435 (diff)
downloadlinux-510043da8582ad49d22a1e9a6b211e6ede10cd2e.tar.xz
KVM: Use the generic skip_emulated_instruction() in hypercall code
Instead of twiddling the rip registers directly, use the skip_emulated_instruction() function to do that for us. Signed-off-by: Dor Laor <dor.laor@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r--drivers/kvm/svm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 3d8ea7a..6787f11 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1078,7 +1078,8 @@ static int halt_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
static int vmmcall_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
{
- vcpu->svm->vmcb->save.rip += 3;
+ vcpu->svm->next_rip = vcpu->svm->vmcb->save.rip + 3;
+ skip_emulated_instruction(vcpu);
return kvm_hypercall(vcpu, kvm_run);
}