[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW4PR21MB2002964FBB69F00BBEE9F324C0E99@MW4PR21MB2002.namprd21.prod.outlook.com>
Date: Tue, 27 Jul 2021 16:51:23 +0000
From: Sunil Muthuswamy <sunilmut@...rosoft.com>
To: Michael Kelley <mikelley@...rosoft.com>,
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>
CC: KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
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>,
"nunodasneves@...ux.microsoft.com" <nunodasneves@...ux.microsoft.com>
Subject: RE: [PATCH v3] hyperv: root partition faults writing to VP ASSIST MSR
PAGE
> >
> > - if (*hvp) {
> > - u64 val;
> > + WARN_ON(!(*hvp));
> >
> > - val = vmalloc_to_pfn(*hvp);
> > - val = (val << HV_X64_MSR_VP_ASSIST_PAGE_ADDRESS_SHIFT) |
> > - HV_X64_MSR_VP_ASSIST_PAGE_ENABLE;
> > + if (*hvp) {
> > + if (!hv_root_partition)
> > + msr.guest_physical_address = vmalloc_to_pfn(*hvp);
> >
> > - wrmsrl(HV_X64_MSR_VP_ASSIST_PAGE, val);
> > + msr.enable = 1;
> > + wrmsrl(HV_X64_MSR_VP_ASSIST_PAGE, msr.as_uint64);
>
> This version has a substantive difference compared with previous versions
> in that the "enable" bit is being set and written back to the MSR even when
> running in the root partition. Is that intentional?
Yes, the hypervisor won't allow the root to change the page address. So, to
enable/disable it, the page address needs to be preserved and just the enable
bit needs to be toggled.
- Sunil
Powered by blists - more mailing lists