Re: [PATCH v3 14/40] KVM: x86: Move async #PF helpers to x86.h (as inlines)

From: Yosry Ahmed

Date: Fri May 29 2026 - 20:50:50 EST


On Fri, May 29, 2026 at 05:39:58PM -0700, Sean Christopherson wrote:
> On Sat, May 30, 2026, Yosry Ahmed wrote:
> > On Fri, May 29, 2026 at 03:21:57PM -0700, Sean Christopherson wrote:
> > > Move kvm_pv_async_pf_enabled() and kvm_async_pf_hash_reset() to x86.h in
> > > anticipation of extracting the majority of register and MSR specific code
> > > out of x86.c.
> >
> > Not sure how these things are relevant?
>
> Oh, I should have explained that. The PV async #PF stuff is controlled via MSR,
> so kvm_async_pf_hash_reset() will also be called from msrs.c. And there are fun
> CR0.PG interactions that need to be handled, so kvm_pv_async_pf_enabled() will
> be called from regs.c.
>
> But they also need to be called from x86.c where the core PV async #PF support
> lives.

Makes sense.

With the changelog updated:

Reviewed-by: Yosry Ahmed <yosry@xxxxxxxxxx>