From: Christoph Egger Subject: [PATCH] xen: handle access to MSR_AMD64_NB_CFG Date: Thu, 13 Aug 2009 13:53:44 +0200 Message-ID: <200908131353.44990.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_I7/gKScNp4j7zoB" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_I7/gKScNp4j7zoB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch handles HVM guest access to MSR_AMD64_NB_CFG. Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_I7/gKScNp4j7zoB Content-Type: text/x-diff; charset="us-ascii"; name="xen_msr_nb.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_msr_nb.diff" diff -r 8a9f81672c76 xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c Wed Aug 12 14:27:52 2009 +0100 +++ b/xen/arch/x86/hvm/hvm.c Thu Aug 13 13:47:04 2009 +0200 @@ -1850,6 +1850,14 @@ int hvm_msr_read_intercept(struct cpu_us msr_content = 0; break; + case MSR_AMD64_NB_CFG: + /* This AMD-only register may be accessed if this HVM guest + * has been migrated to an Intel host. This fixes a guest crash + * in this case. + */ + msr_content = 0; + break; + default: ret = mce_rdmsr(ecx, &lo, &hi); if ( ret < 0 ) @@ -1949,6 +1957,10 @@ int hvm_msr_write_intercept(struct cpu_u goto gp_fault; break; + case MSR_AMD64_NB_CFG: + /* ignore the write */ + break; + default: ret = mce_wrmsr(ecx, msr_content); if ( ret < 0 ) --Boundary-00=_I7/gKScNp4j7zoB Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_I7/gKScNp4j7zoB--