KVM: VMX: mark unusable segment as nonpresent
authorGleb Natapov <gleb@redhat.com>
Fri, 28 Jun 2013 10:17:18 +0000 (13:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Jul 2013 18:39:18 +0000 (11:39 -0700)
commitafd8b04057818d14f6c01b7b83ecd2c03f073247
treeb3243ed76fe8c6ac54559571d72da817894de617
parent014442e5ef9a2ec935a6c304e97d01b89fcb5d24
KVM: VMX: mark unusable segment as nonpresent

commit 03617c188f41eeeb4223c919ee7e66e5a114f2c6 upstream.

Some userspaces do not preserve unusable property. Since usable
segment has to be present according to VMX spec we can use present
property to amend userspace bug by making unusable segment always
nonpresent. vmx_segment_access_rights() already marks nonpresent segment
as unusable.

Reported-by: Stefan Pietsch <stefan.pietsch@lsexperts.de>
Tested-by: Stefan Pietsch <stefan.pietsch@lsexperts.de>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx.c