diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/svm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 05efc4ef75a6..665008d97856 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -772,6 +772,15 @@ static void svm_get_segment(struct kvm_vcpu *vcpu, | |||
772 | var->l = (s->attrib >> SVM_SELECTOR_L_SHIFT) & 1; | 772 | var->l = (s->attrib >> SVM_SELECTOR_L_SHIFT) & 1; |
773 | var->db = (s->attrib >> SVM_SELECTOR_DB_SHIFT) & 1; | 773 | var->db = (s->attrib >> SVM_SELECTOR_DB_SHIFT) & 1; |
774 | var->g = (s->attrib >> SVM_SELECTOR_G_SHIFT) & 1; | 774 | var->g = (s->attrib >> SVM_SELECTOR_G_SHIFT) & 1; |
775 | |||
776 | /* | ||
777 | * SVM always stores 0 for the 'G' bit in the CS selector in | ||
778 | * the VMCB on a VMEXIT. This hurts cross-vendor migration: | ||
779 | * Intel's VMENTRY has a check on the 'G' bit. | ||
780 | */ | ||
781 | if (seg == VCPU_SREG_CS) | ||
782 | var->g = s->limit > 0xfffff; | ||
783 | |||
775 | var->unusable = !var->present; | 784 | var->unusable = !var->present; |
776 | } | 785 | } |
777 | 786 | ||