]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: nVMX: Don't emulate instructions in guest mode
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 4 Feb 2020 23:26:29 +0000 (15:26 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 28 Apr 2020 18:03:40 +0000 (19:03 +0100)
commit 07721feee46b4b248402133228235318199b05ec upstream.

vmx_check_intercept is not yet fully implemented. To avoid emulating
instructions disallowed by the L1 hypervisor, refuse to emulate
instructions by default.

[Made commit, added commit msg - Oliver]
Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[bwh: Backported to 3.16: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/kvm/vmx.c

index a1dbb20b768b169d6f0aaa4db3c0f90066e92877..1faaa78505f4a6afbb093dcb05f455999efe6f8f 100644 (file)
@@ -8938,7 +8938,7 @@ static int vmx_check_intercept(struct kvm_vcpu *vcpu,
                               struct x86_instruction_info *info,
                               enum x86_intercept_stage stage)
 {
-       return X86EMUL_CONTINUE;
+       return X86EMUL_UNHANDLEABLE;
 }
 
 static struct kvm_x86_ops vmx_x86_ops = {