[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 4/6] x86/viridian: add warnings for unimplemented hypercalls and MSRs



> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: 21 March 2017 15:33
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 4/6] x86/viridian: add warnings for unimplemented
> hypercalls and MSRs
> 
> >>> On 20.03.17 at 18:08, <paul.durrant@xxxxxxxxxx> wrote:
> > These warnings can be useful when Microsoft updates Windows.
> >
> > In the past there have been several cases when Windows erroneously uses
> > hypercalls and MSRs that should be gated on CPUID flags than Xen does
> > not set. The usual symptom is a guest crash with little or no information
> > in the hypervisor log. Adding these warnings at least gives a clue as to
> > what might be happening in such cases.
> >
> > Some versions of Windows do currently issue hypercalls that they should
> > not, so this patch whitelists those to avoid the warnings as the lack
> > of implementation is clearly proved not to be a problem to the guest.
> >
> > The warnings are rate limited so a malicious guest cannot use them to
> > as a DoS.
> >
> > NOTE: Because the MSR warnings need to be gated on range checking the
> >       MSR address this patch imports the up-to-date definitions of all
> >       the viridian MSRs from the specification.
> >
> > Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
> 
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> with one remark:
> 
> > @@ -552,6 +610,10 @@ int wrmsr_viridian_regs(uint32_t idx, uint64_t val)
> >          break;
> >
> >      default:
> > +        if ( idx >= VIRIDIAN_MSR_MIN && idx <= VIRIDIAN_MSR_MAX )
> > +            gprintk(XENLOG_WARNING, "write to unimplemented MSR
> %08x\n",
> > +                    idx);
> 
> Mind if I shorten the string literal by one using %#x instead of
> %08x (also on the read side) while committing?

No, I don't mind.

  Paul

> 
> Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.