KVM: VMX: Avoid leaking fake realmode state to userspace
authorAvi Kivity <avi@redhat.com>
Mon, 3 Jan 2011 12:28:52 +0000 (14:28 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 17 Mar 2011 16:08:25 +0000 (13:08 -0300)
commita9179499350d30446d8983d272a9157963604b0f
tree32ad44938298a460f047f16f5942f037c22e853c
parentd0ba64f9b4b3e41e7b91681fe04a334bc8bfc8f5
KVM: VMX: Avoid leaking fake realmode state to userspace

When emulating real mode, we fake some state:

 - tr.base points to a fake vm86 tss
 - segment registers are made to conform to vm86 restrictions

change vmx_get_segment() not to expose this fake state to userspace;
instead, return the original state.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/vmx.c