[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MWHPR21MB159302588AD32CA605192398D7E39@MWHPR21MB1593.namprd21.prod.outlook.com>
Date: Wed, 21 Jul 2021 04:10:33 +0000
From: Michael Kelley <mikelley@...rosoft.com>
To: Wei Liu <wei.liu@...nel.org>
CC: Praveen Kumar <kumarpraveen@...ux.microsoft.com>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Dexuan Cui <decui@...rosoft.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "x86@...nel.org" <x86@...nel.org>,
"hpa@...or.com" <hpa@...or.com>,
"viremana@...ux.microsoft.com" <viremana@...ux.microsoft.com>,
Sunil Muthuswamy <sunilmut@...rosoft.com>,
"nunodasneves@...ux.microsoft.com" <nunodasneves@...ux.microsoft.com>
Subject: RE: [PATCH] hyperv: root partition faults writing to VP ASSIST MSR
PAGE
From: Wei Liu <wei.liu@...nel.org> Sent: Tuesday, July 20, 2021 9:29 AM
>
> On Tue, Jul 20, 2021 at 04:20:44PM +0000, Michael Kelley wrote:
> > From: Wei Liu <wei.liu@...nel.org> Sent: Tuesday, July 20, 2021 6:35 AM
> > >
> > > On Tue, Jul 20, 2021 at 06:55:56PM +0530, Praveen Kumar wrote:
> > > [...]
> > > > >
> > > > >> + if (hv_root_partition &&
> > > > >> + ms_hyperv.features & HV_MSR_APIC_ACCESS_AVAILABLE) {
> > > > >
> > > > > Is HV_MSR_APIC_ACCESS_AVAILABLE a root only flag? Shouldn't non-root
> > > > > kernel check this too?
> > > >
> > > > Yes, you are right. Will update this in v2. thanks.
> > >
> > > Please split adding this check to its own patch.
> > >
> > > Ideally one patch only does one thing.
> > >
> > > Wei.
> > >
> >
> > I was just looking around in the Hyper-V TLFS, and I didn't see
> > anywhere that the ability to set up a VP Assist page is dependent
> > on HV_MSR_APIC_ACCESS_AVAILABLE. Or did I just miss it?
>
> The feature bit Praveen used is wrong and should be fixed.
>
> Per internal discussion this is gated by the AccessIntrCtrlRegs bit.
>
> Wei.
>
The AccessIntrCtrlRegs bit *is* HV_MSR_APIC_ACCESS_AVAILABLE.
Both are defined as bit 4 of the Partition Privilege flags. :-) I don't
know why the names don't line up. Even so, it's not clear to me that
AccessIntrCtrlRegs has any bearing on the VP Assist page. I see this
description of AccessIntrCtrlRegs:
The partition has access to the synthetic MSRs associated with the
APIC (HV_X64_MSR_EOI, HV_X64_MSR_ICR and HV_X64_MSR_TPR).
If this flag is cleared, accesses to these MSRs results in a #GP fault if
the MSR intercept is not installed.
But maybe you have additional info that applies to the root
partition that is not in the TLFS.
Michael
Powered by blists - more mailing lists