提交 b586eb02 编写于 作者: A Andre Przywara 提交者: Avi Kivity

KVM: SVM: Fix cross vendor migration issue in segment segment descriptor

On AMD CPUs sometimes the DB bit in the stack segment
descriptor is left as 1, although the whole segment has
been made unusable. Clear it here to pass an Intel VMX
entry check when cross vendor migrating.
Signed-off-by: NAndre Przywara <andre.przywara@amd.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 9b5843dd
...@@ -803,6 +803,15 @@ static void svm_get_segment(struct kvm_vcpu *vcpu, ...@@ -803,6 +803,15 @@ static void svm_get_segment(struct kvm_vcpu *vcpu,
if (!var->unusable) if (!var->unusable)
var->type |= 0x1; var->type |= 0x1;
break; break;
case VCPU_SREG_SS:
/* On AMD CPUs sometimes the DB bit in the segment
* descriptor is left as 1, although the whole segment has
* been made unusable. Clear it here to pass an Intel VMX
* entry check when cross vendor migrating.
*/
if (var->unusable)
var->db = 0;
break;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册