On Thu, Mar 04, 2021 at 11:28:16PM +0000, Andrew Cooper wrote:
> On 04/03/2021 23:09, Boris Ostrovsky wrote:
> > On 3/4/21 9:47 AM, Roger Pau Monne wrote:
> >> Introduce an option to allow selecting a less strict behaviour for
> >> rdmsr accesses targeting a MSR not explicitly handled by Xen. Since
> >> commit 84e848fd7a162f669 accesses to MSRs not explicitly handled by
> >> Xen result in the injection of a #GP to the guest. This is a behavior
> >> change since previously a #GP was only injected if accessing the MSR
> >> on the real hardware will also trigger a #GP.
> >>
> >> This commit attempts to offer a fallback option similar to the
> >> previous behavior. Note however that the value of the underlying MSR
> >> is never leaked to the guest, as the newly introduced option only
> >> changes whether a #GP is injected or not.
> >>
> >> Long term the plan is to properly handle all the MSRs, so the option
> >> introduced here should be considered a temporary resort for OSes that
> >> don't work properly with the new MSR policy. Any OS that requires this
> >> option to be enabled should be reported to
> >> xen-devel@lists.xenproject.org.
> >>
> >> Signed-off-by: Roger Pau Monné <roger....@citrix.com>
> >> ---
> >> Changes since v1:
> >>  - Only apply the option to HVM guests.
> >>  - Only apply the special handling to MSR reads.
> >>  - Sanitize the newly introduced flags field.
> >>  - Print a warning message when the option is used.
> >> ---
> >> Cc: Boris Ostrovsky <boris.ostrov...@oracle.com>
> >> ---
> >> Boris, could you please test with Solaris to see if this fixes the
> >> issue?
> >
> > Yes, still works. (It worked especially well after I noticed new option 
> > name ;-))
> 
> I'm afraid I want to break and rework how this bugfix happens.  Solaris
> is still broken on all older branches and this isn't a suitable fix to
> backport.

Right, I think that's the reactive part of the fixing that we spoke
with Jan, but I think we would still need something similar to
rdmsr_relaxed.

There's at least one other MSR which Jan identified that we also want
to handle MSR_K7_HWCR.

Thanks, Roger.

Reply via email to