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

From
Lorenzo Stoakes (ARM) <ljs@kernel.org>
Date
2026-09-24 08:23:07
Also in
kvm, kvmarm, linux-doc, linux-kselftest, linux-s390, lkml
Reply to
Fuad Tabba, 2026-09-23
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)"
[off-list ref] wrote:
[...]
quoted
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
[...]
quoted
+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!
Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev>
Thanks! :)
Cheers,
/fuad
--
Cheers, Lorenzo
Thread (35 messages) 35 messages, 4 authors, 20d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help