提交 9fd4a3b7 编写于 作者: A Avi Kivity

KVM: VMX: don't clobber segment AR if emulating invalid state

The ususable bit is important for determining state validity; don't
clobber it.
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 1872a3f4
......@@ -1649,7 +1649,7 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
var->limit = vmcs_read32(sf->limit);
var->selector = vmcs_read16(sf->selector);
ar = vmcs_read32(sf->ar_bytes);
if (ar & AR_UNUSABLE_MASK)
if ((ar & AR_UNUSABLE_MASK) && !emulate_invalid_guest_state)
ar = 0;
var->type = ar & 15;
var->s = (ar >> 4) & 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册