RE: [PATCH 03/16] KVM: x86: set gfn-to-pfn cache length consistently with VM word size

From: Durrant, Paul
Date: Mon Nov 14 2022 - 06:28:55 EST


> -----Original Message-----
> From: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
> Sent: 13 November 2022 13:37
> To: Paolo Bonzini <pbonzini@xxxxxxxxxx>; Sean Christopherson
> <seanjc@xxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx; mhal@xxxxxxx;
> Durrant, Paul <pdurrant@xxxxxxxxxxxx>; Kaya, Metin <metikaya@xxxxxxxxxxxx>
> Subject: RE: [EXTERNAL][PATCH 03/16] KVM: x86: set gfn-to-pfn cache length
> consistently with VM word size
>
> On Sun, 2022-11-13 at 13:32 +0000, David Woodhouse wrote:
> > For the runstate area, I think we can live with using a gfn_to_hva
> > cache instead, and writing via the userspace address (with appropriate
> > atomicity for the RUNSTATE_runnable case as we have at the moment
> > gating the refresh).
>
> Which mostly involves just reverting commit a795cd43c5b5 I think?
>
> IIRC the reason for that commit was mostly consistency with other
> things that really *did* want to be switched to gpc.

A straight reversion would re-introduce the page-spanning check in kvm_xen_vcpu_set_attr() but I think we can just leave that out.

Paul