Re: [PATCH v4 01/14] KVM: Allow architectures to disallow pre-fault

From: Marc Zyngier

Date: Thu Sep 24 2026 - 18:29:29 EST


On Thu, 24 Sep 2026 09:22:47 +0100,
"Lorenzo Stoakes (ARM)" <ljs@xxxxxxxxxx> wrote:
>
> On Wed, Sep 23, 2026 at 07:52:27PM +0100, Fuad Tabba wrote:
> > Hi Lorenzo,
> >
> > On Wed, 23 Sep 2026 16:15:44 +0100, "Lorenzo Stoakes (ARM)"
> > <ljs@xxxxxxxxxx> wrote:
> > [...]
> > > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> > [...]
> > > +int kvm_arch_pre_fault_allowed(struct kvm_vcpu *vcpu)
> > > +{
> > > + if (!vcpu->kvm->arch.pre_fault_allowed)
> > > + return -EOPNOTSUPP;
> > > +
> > > + return 0;
> > > +}
> >
> > nit: the comment above the smp_rmb() in tdx_sept_map_leaf_spte() still
> > says pre_fault_allowed is read by kvm_arch_vcpu_pre_fault_memory(),
> > but after this patch it's read here.
>
> Ack can fix up I need to respin!

I've updated the comment locally.

M.

--
Without deviation from the norm, progress is not possible.