All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>,
	Steffen Einsle <einsle@phptrix.de>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] x86/msr: handle reads to MSR_P5_MC_{ADDR,TYPE}
Date: Thu, 28 Apr 2022 12:52:50 +0200	[thread overview]
Message-ID: <YmpyAkgmqphvI9oQ@Air-de-Roger> (raw)
In-Reply-To: <4843821d-4e9b-f57d-cf84-375f0b8a3ff2@suse.com>

On Thu, Apr 28, 2022 at 12:39:19PM +0200, Jan Beulich wrote:
> On 28.04.2022 11:13, Roger Pau Monne wrote:
> > --- a/xen/arch/x86/cpu/mcheck/mce_intel.c
> > +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c
> > @@ -1008,8 +1008,24 @@ int vmce_intel_wrmsr(struct vcpu *v, uint32_t msr, uint64_t val)
> >  
> >  int vmce_intel_rdmsr(const struct vcpu *v, uint32_t msr, uint64_t *val)
> >  {
> > +    const struct cpuid_policy *cp = v->domain->arch.cpuid;
> >      unsigned int bank = msr - MSR_IA32_MC0_CTL2;
> >  
> > +    switch ( msr )
> > +    {
> > +    case MSR_P5_MC_ADDR:
> > +        /* Bank 0 is used for the 'bank 0 quirk' on older processors. */
> > +        *val = v->arch.vmce.bank[1].mci_addr;
> > +        return 1;
> > +
> > +    case MSR_P5_MC_TYPE:
> > +        *val = v->arch.vmce.bank[1].mci_status;
> > +        return 1;
> > +    }
> 
> Could I ask you to add a reference to vcpu_fill_mc_msrs() in the comment?

Sure.

Thanks, Roger.


      reply	other threads:[~2022-04-28 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28  9:13 [PATCH v2] x86/msr: handle reads to MSR_P5_MC_{ADDR,TYPE} Roger Pau Monne
2022-04-28 10:39 ` Jan Beulich
2022-04-28 10:52   ` Roger Pau Monné [this message]

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=YmpyAkgmqphvI9oQ@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=einsle@phptrix.de \
    --cc=jbeulich@suse.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.