diff options
author | Nadav Amit <namit@cs.technion.ac.il> | 2014-11-02 11:55:01 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-11-08 08:20:52 +0100 |
commit | b2c9d43e6c0f821bde0c1c840038d159d18f1519 (patch) | |
tree | 55ab7c34dad126e8a511c78e7888e3544f7a3272 /arch/x86/kvm/emulate.c | |
parent | db324fe6f20b0ad118d230da23107ddb12784e8c (diff) |
KVM: x86: Return UNHANDLABLE on unsupported SYSENTER
Now that KVM injects #UD on "unhandlable" error, it makes better sense to
return such error on sysenter instead of directly injecting #UD to the guest.
This allows to track more easily the unhandlable cases the emulator does not
support.
Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index bf4d23e0f76e..dab9b74c29de 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2358,11 +2358,9 @@ static int em_sysenter(struct x86_emulate_ctxt *ctxt) && !vendor_intel(ctxt)) return emulate_ud(ctxt); - /* XXX sysenter/sysexit have not been tested in 64bit mode. - * Therefore, we inject an #UD. - */ + /* sysenter/sysexit have not been tested in 64bit mode. */ if (ctxt->mode == X86EMUL_MODE_PROT64) - return emulate_ud(ctxt); + return X86EMUL_UNHANDLEABLE; setup_syscalls_segments(ctxt, &cs, &ss); |