From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH] xen: Fake out the Bus Unit Config MSR on revF AMD CPUs Date: Thu, 8 Mar 2012 11:13:51 +0000 Message-ID: <1331205231.32288.45.camel@elijah> References: <4F58947B0200007800077161@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F58947B0200007800077161@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: George Dunlap , xen-devel List-Id: xen-devel@lists.xenproject.org On Thu, 2012-03-08 at 10:14 +0000, Jan Beulich wrote: > >>> On 07.03.12 at 18:59, George Dunlap wrote: > > Win2k8 x64 reads this MSR on revF chips, where it wasn't publically > > available; it uses a magic constant in %rdi as a password, which we > > don't have in rdmsr_safe(). Since we'll ignore the later writes, just > > use a plausible value here (the reset value from rev10h chips) if the > > real CPU didn't provide one. > > > > Signed-off-by: George Dunlap > > > > diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c > > --- a/xen/arch/x86/hvm/svm/svm.c > > +++ b/xen/arch/x86/hvm/svm/svm.c > > @@ -1516,6 +1516,18 @@ static int svm_msr_read_intercept(unsign > > if ( rdmsr_safe(msr, *msr_content) == 0 ) > > break; > > > > + if ( msr == MSR_F10_BU_CFG ) > > As you're aiming at revF only, shouldn't you check at least the CPU > family here? With the MSR being model specific, you otherwise risk > to return (bogus) data for something completely different on future > CPU families. I think that makes sense, but a quick glance through arch/x86/cpu/amd.c doesn't suggest to me the most concise way of making that test... could you give me a suggestion? Thanks, -George