aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2009-08-11 15:57:59 -0500
committerAvi Kivity <avi@redhat.com>2009-09-10 10:46:44 +0300
commitc0c7c04b874bf98a10d8e0c8322a5d3bc93536bc (patch)
treefd1fd86a26767fb8b59db3190f17b2c40a035ba4 /arch/x86/kvm/emulate.c
parentKVM: VMX: Adjust rflags if in real mode emulation (diff)
downloadlinux-dev-c0c7c04b874bf98a10d8e0c8322a5d3bc93536bc.tar.xz
linux-dev-c0c7c04b874bf98a10d8e0c8322a5d3bc93536bc.zip
KVM: When switching to a vm8086 task, load segments as 16-bit
According to 16.2.5 in the SDM, eflags.vm in the tss is consulted before loading and new segments. If eflags.vm == 1, then the segments are treated as 16-bit segments. The LDTR and TR are not normally available in vm86 mode so if they happen to somehow get loaded, they need to be treated as 32-bit segments. This fixes an invalid vmentry failure in a custom OS that was happening after a task switch into vm8086 mode. Since the segments were being mistakenly treated as 32-bit, we loaded garbage state. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
0 files changed, 0 insertions, 0 deletions