[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210724154320.apc7lm2pclfzig7n@liuwe-devbox-debian-v2>
Date: Sat, 24 Jul 2021 15:43:20 +0000
From: Wei Liu <wei.liu@...nel.org>
To: Praveen Kumar <kumarpraveen@...ux.microsoft.com>
Cc: Wei Liu <wei.liu@...nel.org>, linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org, kys@...rosoft.com,
haiyangz@...rosoft.com, sthemmin@...rosoft.com,
decui@...rosoft.com, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, x86@...nel.org, hpa@...or.com,
viremana@...ux.microsoft.com, sunilmut@...rosoft.com,
nunodasneves@...ux.microsoft.com
Subject: Re: [PATCH v2] hyperv: root partition faults writing to VP ASSIST
MSR PAGE
On Thu, Jul 22, 2021 at 09:45:36PM +0530, Praveen Kumar wrote:
> >
> > I think about this a bit more, the NULL check for *hvp in hv_cpu_init in
> > the original code is perhaps due to the code has opted to not free the
> > page when disabling the VP assist page. When the CPU is brought back
> > online, it does not want to allocate another page, but to use the one
> > that's already allocated.
> >
> > So, since you listened to my suggestion to add a similar check, you need
> > to reset hv_vp_assist_page to NULL here. Alternatively the check for
> > *hvp can be dropped for the root path. Either way, the difference
> > between root and non-root should be documented.
> >
>
> I would make it as NULL post memunmap as you suggested, so that we
> don't end up reusing the old/cached value. Before doing that, is there
> any use-case where hypervisor can allocate or change the VP assist
> page that can impact root kernel execution ?
I don't think a sane hypervisor will change the page in such a way.
Wei.
Powered by blists - more mailing lists