> -----Original Message-----
> From: Jan Beulich [mailto:jbeul...@suse.com]
> Sent: 21 March 2017 15:33
> To: Paul Durrant <paul.durr...@citrix.com>
> Cc: Andrew Cooper <andrew.coop...@citrix.com>; xen-
> de...@lists.xenproject.org
> Subject: Re: [PATCH v2 4/6] x86/viridian: add warnings for unimplemented
> hypercalls and MSRs
> 
> >>> On 20.03.17 at 18:08, <paul.durr...@citrix.com> 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.durr...@citrix.com>
> 
> Reviewed-by: Jan Beulich <jbeul...@suse.com>
> 
> 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@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to