]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Mon, 16 Feb 2015 13:44:20 +0000 (14:44 +0100)
commita9638450cced05855cbb366fc6dd0792375a6611
tree10d1e5b1a4336c98c14f842d0556037f7403ac80
parent067eafed0e6d973ee173fe1b7c2e1b29bfbfdafe
KVM: x86: emulating descriptor load misses long-mode case

commit 040c8dc8a5afa7364bb8bb5b1b76c30007d6be14 upstream.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/x86/kvm/emulate.c