summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorKyle Huey2016-11-29 21:40:37 +0100
committerPaolo Bonzini2016-12-08 15:31:03 +0100
commit6a908b628cff81d3f1eb737327c8b726c8fdfd4e (patch)
tree8464b25c1de2854c34db51cb1f32ed76035d9695 /arch/x86/kvm/svm.c
parentMerge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
downloadkernel-qcow2-linux-6a908b628cff81d3f1eb737327c8b726c8fdfd4e.tar.gz
kernel-qcow2-linux-6a908b628cff81d3f1eb737327c8b726c8fdfd4e.tar.xz
kernel-qcow2-linux-6a908b628cff81d3f1eb737327c8b726c8fdfd4e.zip
KVM: x86: Add a return value to kvm_emulate_cpuid
Once skipping the emulated instruction can potentially trigger an exit to userspace (via KVM_GUESTDBG_SINGLESTEP) kvm_emulate_cpuid will need to propagate a return value. Signed-off-by: Kyle Huey <khuey@kylehuey.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 5e64e656103c..5bdffcd781f5 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -3239,8 +3239,7 @@ static int task_switch_interception(struct vcpu_svm *svm)
static int cpuid_interception(struct vcpu_svm *svm)
{
svm->next_rip = kvm_rip_read(&svm->vcpu) + 2;
- kvm_emulate_cpuid(&svm->vcpu);
- return 1;
+ return kvm_emulate_cpuid(&svm->vcpu);
}
static int iret_interception(struct vcpu_svm *svm)