KVM: x86 emulator: fix access registers for instructions with ModR/M byte and Mod = 3
authorAurelien Jarno <aurelien@aurel32.net>
Sun, 2 Dec 2007 11:18:39 +0000 (13:18 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 14 Dec 2007 17:50:55 +0000 (09:50 -0800)
commitfb2fc4cf555e1a5eb4f061ca7c76adf667407f9c
tree67837dae9cfea044816dc62e049f2bdf562a7bed
parent117b22fffff1989cd9e2d90720f05dd438cea2f1
KVM: x86 emulator: fix access registers for instructions with ModR/M byte and Mod = 3

patch 4e62417bf317504c0b85e0d7abd236f334f54eaf in mainline.

The patch belows changes the access type to register from memory for
instructions that are declared as SrcMem or DstMem, but have a
ModR/M byte with Mod = 3.

It fixes (at least) the lmsw and smsw instructions on an AMD64 CPU,
which are needed for FreeBSD.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/kvm/x86_emulate.c