diff options
author | Amit Shah <amit.shah@redhat.com> | 2008-10-27 10:04:18 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 15:51:48 +0100 |
commit | c0d09828c870f90c6bc72070ada281568f89c63b (patch) | |
tree | 84964d81972066b33496f9c2105f2b338d369dae /arch/x86/kvm/svm.c | |
parent | KVM: SVM: Set the 'g' bit of the cs selector for cross-vendor migration (diff) | |
download | linux-c0d09828c870f90c6bc72070ada281568f89c63b.tar.xz linux-c0d09828c870f90c6bc72070ada281568f89c63b.zip |
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: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | arch/x86/kvm/svm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 665008d97856..743aebd7bfcc 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; } |