]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: emulating descriptor load misses long-mode case
authorNadav Amit <namit@cs.technion.ac.il>
Thu, 18 Sep 2014 19:39:43 +0000 (22:39 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 24 Sep 2014 12:07:52 +0000 (14:07 +0200)
commitc3d8ccd7c3b97abbe063d9431c81dac0a9f9819e
tree9686489a905a31c8eccbd10e3c3bb83eca8d88e9
parent588f487fb2b07f7badad8bcaa599c6894c56ee55
KVM: x86: emulating descriptor load misses long-mode case

In 64-bit mode a #GP should be delivered to the guest "if the code segment
descriptor pointed to by the selector in the 64-bit gate doesn't have the L-bit
set and the D-bit clear." - Intel SDM "Interrupt 13—General Protection
Exception (#GP)".

This patch fixes the behavior of CS loading emulation code. Although the
comment says that segment loading is not supported in long mode, this function
is executed in long mode, so the fix is necassary.

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