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

Re: [PATCH v2 for-4.15] x86/msr: introduce an option for HVM relaxed rdmsr behavior


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 5 Mar 2021 09:26:36 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x/a65TvFqrVTo8Q59SmXe5rwnFCzjuHoRiLLEmL9zKg=; b=UXzYEE9NoxDiVMY5ashFLOu0FvaAO282SmB7TqLlmOrukw2HeCNAniGoFqD2gHAxIEx6I2yOxK44ln0krcDfW7egVAtlBuGfWdRzMa47zoHXZJkGM14PH6QSDqbN2QQ2Hsbzqh+8V0Nm1Qn7d8nW2ECasMWutHtMszZ5JH6TFQgKH2z/PDW8WE9o/+O9/tqGYUiZ3NZt0mbQeO2jIRmKDCSCz/IpFSJEHyQXNK1VlwvUuwUdm20xEAGPJms6CdsrCL+9XyW5nQVfFXgjQqLFh5LX2nEWbaGYrsRv/PJWYJ1kKn9LgEv6yWl7EE0MFGFovwCFcO5KFCQ+TNYWnY5khg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dCCsthJtrbxHDRobbdgSXWJwHjwOmQYCzDafY5q12oDUSp4OIQW1PB7YO/xshaaBeNuPZjLmp7iWMlHfS3jWPyLyWX+eXJnq5vmqqJEFLoqQuY0kngZS7zs4yOgfAVMINzro2Q1VJ4F6pz23Se1kgHY/TPkTUq+3fdGAAVyc3LcOhyclQNDAa3P7xBcSaICboxeBMSIqOT58BMDeZFiX+mXsNl6+TZzNeW5X87cKGQu7Mx7cBlP5Q0DSxxMmUm5htohelnKecSWX9RqS/c+kaVtNt1uSkk5MVjgwRcFO2QXnQcfnRgSDpz0FSw2sfmtGd9RYiBI7FXI39GPVK74rcQ==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Fri, 05 Mar 2021 08:27:22 +0000
  • Ironport-sdr: oB/TpDvz2UsCGoxyFxG+hM3jVLgMaSzl1Vsb7uib6LOH2oeMiSf3d5yLqotKESAYzEkq8X+6Fq ZRGcp/FrFhQWpeNwllKZ8Eyorar1HQBeozx9F50eRPHRqYuGcD6Jqd+iXr+54Rhtas+9BjM/Qn etOW2r68qeI3MEel1dqhQf3kEIMdvVJ1WgVc63AOwfZ7i3nX736unmz25PtDnN6z8wExwdJbJw ACOpM01mLUSPofE/AS6Z2keIonJYv9gxsDLLcaRHc0iC6tlDwo43DDdQWPjVweQO1nh9QLO3ik kQ0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxxxxxxxxxxxx.
> >>
> >> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> >> ---
> >> 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.ostrovsky@xxxxxxxxxx>
> >> ---
> >> 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.



 


Rackspace

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