]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Emulate should check #UD before #GP
authorNadav Amit <namit@cs.technion.ac.il>
Wed, 10 Dec 2014 09:19:04 +0000 (11:19 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 10 Dec 2014 11:53:37 +0000 (12:53 +0100)
commit1720d1a08ca33b49d7fc7412467b76528980041e
treed3be824a5fc8c034cea5aa3e157ebec6efeda7e7
parentf58897048077e8edeca4a952fa88cf9613e88e72
KVM: x86: Emulate should check #UD before #GP

Intel SDM table 6-2 ("Priority Among Simultaneous Exceptions and Interrupts")
shows that faults from decoding the next instruction got higher priority than
general protection.  Moving the protected-mode check before the CPL check to
avoid wrong exception on vm86 mode.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c