All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] xen: Fake out the Bus Unit Config MSR on revF AMD CPUs
Date: Thu, 8 Mar 2012 11:13:51 +0000	[thread overview]
Message-ID: <1331205231.32288.45.camel@elijah> (raw)
In-Reply-To: <4F58947B0200007800077161@nat28.tlf.novell.com>

On Thu, 2012-03-08 at 10:14 +0000, Jan Beulich wrote:
> >>> On 07.03.12 at 18:59, George Dunlap <george.dunlap@eu.citrix.com> 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 <george.dunlap@eu.citrix.com>
> > 
> > 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

  reply	other threads:[~2012-03-08 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 17:59 [PATCH] xen: Fake out the Bus Unit Config MSR on revF AMD CPUs George Dunlap
2012-03-08 10:14 ` Jan Beulich
2012-03-08 11:13   ` George Dunlap [this message]
2012-03-08 11:45     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331205231.32288.45.camel@elijah \
    --to=george.dunlap@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.