Thread (41 messages) 41 messages, 5 authors, 1d ago

Re: [PATCH v9 23/24] KVM: s390: arm64: Implement basic page fault handler

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2026-10-01 13:36:27
Also in: kvm, kvmarm, linux-s390, lkml
Subsystem: kernel virtual machine for s390 (kvm/s390), s390 architecture, the rest · Maintainers: Christian Borntraeger, Janosch Frank, Claudio Imbrenda, Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Linus Torvalds

On Thu, Oct 1, 2026, at 14:10, Arnd Bergmann wrote:
quoted
+		/*
+		 * Check for a cache maintenance operation. Assume the guest is
+		 * cautious and skip instruction
+		 */
+		if (kvm_is_error_hva(hva) && kvm_vcpu_dabt_is_cm(vcpu)) {
+			kvm_incr_pc(vcpu);
+			ret = 1;
+			goto out_unlock;
Hi Steffen,

[Adding Lorenzo Stoakes to Cc]

I see this function fails to build on top of linux-next, as the 
kvm_vcpu_dabt_is_cm() function was removed by commit 18b94675b1fb
("KVM: arm64: Use ESR helpers in guest abort handling").

Another ones: after 34cfa9b3af17 ("KVM: arm64: Implement
KVM_PRE_FAULT_MEMORY"), we are now missing a kvm_arch_pre_fault_allowed()
definition in arch/s390/kvm/arm64/mmu.c:

ERROR: modpost: arch/s390/kvm/arm64/kvm-arm64.ko: symbol 'kvm_arch_pre_fault_allowed' undefined!

I copied the arm64 version without the pkvm reference to make it
build for me.

     Arnd
diff --git a/arch/s390/kvm/arm64/mmu.c b/arch/s390/kvm/arm64/mmu.c
index 7ee157c61d70..be16351acaae 100644
--- a/arch/s390/kvm/arm64/mmu.c
+++ b/arch/s390/kvm/arm64/mmu.c
@@ -179,6 +179,14 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu)
 	return ret;
 }
 
+int kvm_arch_pre_fault_allowed(struct kvm_vcpu *vcpu)
+{
+	if (!kvm_vcpu_initialized(vcpu))
+		return -ENOEXEC;
+
+	return 0;
+}
+
 long kvm_arch_vcpu_pre_fault_memory(struct kvm_vcpu *vcpu, struct kvm_pre_fault_memory *range)
 {
 	struct guest_fault f = { .gfn = gpa_to_gfn(range->gpa), };
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help