Commit c0d09828 authored by Amit Shah's avatar Amit Shah Committed by Avi Kivity

KVM: SVM: Set the 'busy' flag of the TR selector

The busy flag of the TR selector is not set by the hardware. This breaks
migration from amd hosts to intel hosts.
Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 25022acc
...@@ -781,6 +781,13 @@ static void svm_get_segment(struct kvm_vcpu *vcpu, ...@@ -781,6 +781,13 @@ static void svm_get_segment(struct kvm_vcpu *vcpu,
if (seg == VCPU_SREG_CS) if (seg == VCPU_SREG_CS)
var->g = s->limit > 0xfffff; var->g = s->limit > 0xfffff;
/*
* Work around a bug where the busy flag in the tr selector
* isn't exposed
*/
if (seg == VCPU_SREG_TR)
var->type |= 0x2;
var->unusable = !var->present; var->unusable = !var->present;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment