Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754656AbYLHLkl (ORCPT ); Mon, 8 Dec 2008 06:40:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751957AbYLHLhY (ORCPT ); Mon, 8 Dec 2008 06:37:24 -0500 Received: from mx2.redhat.com ([66.187.237.31]:48260 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753308AbYLHLhE (ORCPT ); Mon, 8 Dec 2008 06:37:04 -0500 From: Avi Kivity To: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Amit Shah Subject: [PATCH 31/45] KVM: SVM: Set the 'busy' flag of the TR selector Date: Mon, 8 Dec 2008 13:36:42 +0200 Message-Id: <1228736216-15787-32-git-send-email-avi@redhat.com> In-Reply-To: <1228736216-15787-1-git-send-email-avi@redhat.com> References: <1228736216-15787-1-git-send-email-avi@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1040 Lines: 37 From: Amit Shah 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 Signed-off-by: Avi Kivity --- 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 665008d..743aebd 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; } -- 1.6.0.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/