Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Steffen Eiden <seiden@linux.ibm.com>
To: Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.comu>,
	Andreas Grapentin <gra@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, kvm@vger.kernel.org,
	Steffen Eiden <seiden@linux.ibm.com>
Subject: [PATCH 2/2] KVM: s390: Enable the generic vCPU kick infrastructure
Date: Wed, 25 Nov 2026 17:38:37 +0100	[thread overview]
Message-ID: <20261125-vcpu_kick-v1-2-a203b01ab957@linux.ibm.com> (raw)
In-Reply-To: <20261125-vcpu_kick-v1-0-a203b01ab957@linux.ibm.com>

Drop the #ifndef CONFIG_S390 around __kvm_vcpu_kick() and its inline
wrappers so that arm on s390 can use the vCPU kick infrastructure.

Commit 0266c894b51c ("KVM: put back #ifndef CONFIG_S390 around
kvm_vcpu_kick") added the guard around the kick itself for exactly one
reason: kvm_vcpu_kick() calls smp_send_reschedule(), which s390 did not
export, and so the s390 KVM module failed to link.

KVM for arm64 guests on s390 builds on the shared arm64 KVM code, which
relies on the generic kick infrastructure. s390 will have a user for the
kick infrastructure. Let's activate it.

Native KVM/s390 is unaffected by the guards going away. It keeps its own
wakeup and request paths and gains no callers of the generic kick.

Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
---
 include/linux/kvm_host.h | 4 ----
 virt/kvm/kvm_main.c      | 2 --
 2 files changed, 6 deletions(-)

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index fe300a22ab0f..aaade63f1b5a 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -1590,14 +1590,12 @@ void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu);
 void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu);
 bool kvm_vcpu_wake_up(struct kvm_vcpu *vcpu);
 
-#ifndef CONFIG_S390
 void __kvm_vcpu_kick(struct kvm_vcpu *vcpu, int request, bool force);
 
 static inline void kvm_vcpu_kick(struct kvm_vcpu *vcpu)
 {
 	__kvm_vcpu_kick(vcpu, 0, false);
 }
-#endif
 
 int kvm_vcpu_yield_to(struct kvm_vcpu *target);
 void kvm_vcpu_on_spin(struct kvm_vcpu *vcpu, bool yield_to_kernel_mode);
@@ -2331,13 +2329,11 @@ static __always_inline void kvm_make_request(int req, struct kvm_vcpu *vcpu)
 	__kvm_make_request(req, vcpu);
 }
 
-#ifndef CONFIG_S390
 static inline void kvm_make_request_and_kick(int req, struct kvm_vcpu *vcpu)
 {
 	kvm_make_request(req, vcpu);
 	__kvm_vcpu_kick(vcpu, req, false);
 }
-#endif
 
 static inline bool kvm_request_pending(struct kvm_vcpu *vcpu)
 {
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 83e727bf6452..f2499f809fdc 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -3903,7 +3903,6 @@ bool kvm_vcpu_wake_up(struct kvm_vcpu *vcpu)
 }
 EXPORT_SYMBOL_FOR_KVM_INTERNAL(kvm_vcpu_wake_up);
 
-#ifndef CONFIG_S390
 /*
  * Kick a sleeping VCPU, or a guest VCPU in guest mode, into host kernel mode.
  */
@@ -3959,7 +3958,6 @@ void __kvm_vcpu_kick(struct kvm_vcpu *vcpu, int req, bool force)
 	put_cpu();
 }
 EXPORT_SYMBOL_FOR_KVM_INTERNAL(__kvm_vcpu_kick);
-#endif /* !CONFIG_S390 */
 
 int kvm_vcpu_yield_to(struct kvm_vcpu *target)
 {

-- 
2.56.1


  parent reply	other threads:[~2026-11-25 16:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 16:38 [PATCH 0/2] KVM: s390: Enable vCPU kick infrastructure Steffen Eiden
2026-11-25 16:38 ` [PATCH 1/2] s390: Export arch_smp_send_reschedule Steffen Eiden
2026-11-26  6:19   ` Christian Borntraeger
2026-11-25 16:38 ` Steffen Eiden [this message]
2026-11-25 16:44 ` [PATCH 0/2] KVM: s390: Enable vCPU kick infrastructure sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261125-vcpu_kick-v1-2-a203b01ab957@linux.ibm.com \
    --to=seiden@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=gra@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.comu \
    --cc=svens@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox