summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2009-03-23 17:51:23 -0300
committerGreg Kroah-Hartman <gregkh@suse.de>2009-05-02 10:57:06 -0700
commitae88df0aa69791cdaff74e89e65f2703f22e398e (patch)
tree5f7bb75bb97d8651ff9d36a0c531ab3d5c5abd2b
parentca4bd92990aadcbea84fa25ec0cc5b0cd387cb9a (diff)
KVM: SVM: Set the 'busy' flag of the TR selector
(cherry picked from c0d09828c870f90c6bc72070ada281568f89c63b) 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: Amit Shah <amit.shah@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--arch/x86/kvm/svm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 14ba6ff63cfc..cf5c7aaea2f9 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -781,6 +781,13 @@ static void svm_get_segment(struct kvm_vcpu *vcpu,
if (seg == VCPU_SREG_CS)
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;
}