* [PATCH 1/3] KVM: s390: arm64: Turn vcpu->arch.pause into a counter
2026-11-03 16:37 [PATCH 0/3] KVM: s390: arm64: Fixes for arm64 KVM support Andreas Grapentin
@ 2026-11-03 16:37 ` Andreas Grapentin
2026-11-04 8:12 ` Andreas Grapentin
2026-11-03 16:37 ` [PATCH 2/3] KVM: s390: arm64: Declare enum vcpu_sysreg Andreas Grapentin
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Andreas Grapentin @ 2026-11-03 16:37 UTC (permalink / raw)
To: Steffen Eiden, Marc Zyngier, Christian Borntraeger,
Janosch Frank, Claudio Imbrenda, David Hildenbrand,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle
Cc: kvm, linux-s390, linux-kernel, Andreas Grapentin
From: Steffen Eiden <seiden@linux.ibm.com>
The s390 arm64 vcpu struct mirrors arm64's kvm_vcpu_arch. When commit
e64309198eda2 ("KVM: arm64: Turn vcpu->arch.pause into a counter")
changed the type of kvm_vcpu_arch.pause from bool to atomic_t, the merge
into this tree missed the s390 copy, leaving it out of sync.
Nothing on the s390 side accesses vcpu->arch.pause yet, so this has
no functional effect. Align the type to keep the mirror identical to
its arm64 counterpart.
Fixes: e6c329180d1d ("KVM: s390: arm64: Introduce host definitions")
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
---
arch/s390/include/asm/kvm_host_arm64.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/s390/include/asm/kvm_host_arm64.h b/arch/s390/include/asm/kvm_host_arm64.h
index 82343e723ebf..a3e40650d75d 100644
--- a/arch/s390/include/asm/kvm_host_arm64.h
+++ b/arch/s390/include/asm/kvm_host_arm64.h
@@ -63,11 +63,10 @@ struct kvm_vcpu_arch {
/*
* Don't run the guest (internal implementation need).
*
- * Contrary to the flags above, this is set/cleared outside of
- * a vcpu context, and thus cannot be mixed with the flags
- * themselves (or the flag accesses need to be made atomic).
+ * Contrary to the flags above, this is updated outside of
+ * a vcpu context, and thus cannot be mixed with the flags.
*/
- bool pause;
+ atomic_t pause;
/* vcpu power state */
struct kvm_mp_state mp_state;
--
2.55.0
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 1/3] KVM: s390: arm64: Turn vcpu->arch.pause into a counter
2026-11-03 16:37 ` [PATCH 1/3] KVM: s390: arm64: Turn vcpu->arch.pause into a counter Andreas Grapentin
@ 2026-11-04 8:12 ` Andreas Grapentin
0 siblings, 0 replies; 11+ messages in thread
From: Andreas Grapentin @ 2026-11-04 8:12 UTC (permalink / raw)
To: Steffen Eiden, Marc Zyngier, Christian Borntraeger,
Janosch Frank, Claudio Imbrenda, David Hildenbrand,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle
Cc: kvm, linux-s390, linux-kernel
On Nov 03 26, Andreas Grapentin wrote:
> From: Steffen Eiden <seiden@linux.ibm.com>
>
> The s390 arm64 vcpu struct mirrors arm64's kvm_vcpu_arch. When commit
> e64309198eda2 ("KVM: arm64: Turn vcpu->arch.pause into a counter")
> changed the type of kvm_vcpu_arch.pause from bool to atomic_t, the merge
> into this tree missed the s390 copy, leaving it out of sync.
>
> Nothing on the s390 side accesses vcpu->arch.pause yet, so this has
> no functional effect. Align the type to keep the mirror identical to
> its arm64 counterpart.
>
> Fixes: e6c329180d1d ("KVM: s390: arm64: Introduce host definitions")
> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
> Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
> ---
> arch/s390/include/asm/kvm_host_arm64.h | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/s390/include/asm/kvm_host_arm64.h b/arch/s390/include/asm/kvm_host_arm64.h
> index 82343e723ebf..a3e40650d75d 100644
> --- a/arch/s390/include/asm/kvm_host_arm64.h
> +++ b/arch/s390/include/asm/kvm_host_arm64.h
> @@ -63,11 +63,10 @@ struct kvm_vcpu_arch {
> /*
> * Don't run the guest (internal implementation need).
> *
> - * Contrary to the flags above, this is set/cleared outside of
> - * a vcpu context, and thus cannot be mixed with the flags
> - * themselves (or the flag accesses need to be made atomic).
> + * Contrary to the flags above, this is updated outside of
> + * a vcpu context, and thus cannot be mixed with the flags.
> */
> - bool pause;
> + atomic_t pause;
>
> /* vcpu power state */
> struct kvm_mp_state mp_state;
>
> --
> 2.55.0
>
Reviewed-by: Andreas Grapentin <gra@linux.ibm.com>
Best,
-A
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/3] KVM: s390: arm64: Declare enum vcpu_sysreg
2026-11-03 16:37 [PATCH 0/3] KVM: s390: arm64: Fixes for arm64 KVM support Andreas Grapentin
2026-11-03 16:37 ` [PATCH 1/3] KVM: s390: arm64: Turn vcpu->arch.pause into a counter Andreas Grapentin
@ 2026-11-03 16:37 ` Andreas Grapentin
2026-11-04 8:01 ` Steffen Eiden
2026-11-04 9:20 ` Christian Borntraeger
2026-11-03 16:37 ` [PATCH 3/3] KVM: s390: arm64: Fix kvm_arm64 module naming consistency Andreas Grapentin
2026-11-03 18:31 ` [PATCH 0/3] KVM: s390: arm64: Fixes for arm64 KVM support Marc Zyngier
3 siblings, 2 replies; 11+ messages in thread
From: Andreas Grapentin @ 2026-11-03 16:37 UTC (permalink / raw)
To: Steffen Eiden, Marc Zyngier, Christian Borntraeger,
Janosch Frank, Claudio Imbrenda, David Hildenbrand,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle
Cc: kvm, linux-s390, linux-kernel, Andreas Grapentin
Forward-declare enum vcpu_sysreg in kvm_host_arm64.h. This should have
been included in the first iteration of the header, since we will need
it to talk about system registers.
Since the definition of enum vcpu_sysreg is not shared yet, and not used
on the s390 side, this should not cause any functional changes.
Fixes: e6c329180d1d ("KVM: s390: arm64: Introduce host definitions")
Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
---
arch/s390/include/asm/kvm_host_arm64.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/s390/include/asm/kvm_host_arm64.h b/arch/s390/include/asm/kvm_host_arm64.h
index a3e40650d75d..3e69724f17c9 100644
--- a/arch/s390/include/asm/kvm_host_arm64.h
+++ b/arch/s390/include/asm/kvm_host_arm64.h
@@ -8,6 +8,7 @@
#include <asm/debug.h>
#define vcpu_gp_regs(v) ((v)->arch.sae_block.gpr)
+enum vcpu_sysreg;
#include <arm64/kvm_host.h>
#include <arm64/ptrace.h>
--
2.55.0
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 2/3] KVM: s390: arm64: Declare enum vcpu_sysreg
2026-11-03 16:37 ` [PATCH 2/3] KVM: s390: arm64: Declare enum vcpu_sysreg Andreas Grapentin
@ 2026-11-04 8:01 ` Steffen Eiden
2026-11-04 9:20 ` Christian Borntraeger
1 sibling, 0 replies; 11+ messages in thread
From: Steffen Eiden @ 2026-11-04 8:01 UTC (permalink / raw)
To: Andreas Grapentin
Cc: Marc Zyngier, Christian Borntraeger, Janosch Frank,
Claudio Imbrenda, David Hildenbrand, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle, kvm, linux-s390,
linux-kernel
On Tue, Nov 03, 2026 at 05:37:03PM +0100, Andreas Grapentin wrote:
> Forward-declare enum vcpu_sysreg in kvm_host_arm64.h. This should have
> been included in the first iteration of the header, since we will need
> it to talk about system registers.
>
> Since the definition of enum vcpu_sysreg is not shared yet, and not used
> on the s390 side, this should not cause any functional changes.
>
> Fixes: e6c329180d1d ("KVM: s390: arm64: Introduce host definitions")
> Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 2/3] KVM: s390: arm64: Declare enum vcpu_sysreg
2026-11-03 16:37 ` [PATCH 2/3] KVM: s390: arm64: Declare enum vcpu_sysreg Andreas Grapentin
2026-11-04 8:01 ` Steffen Eiden
@ 2026-11-04 9:20 ` Christian Borntraeger
1 sibling, 0 replies; 11+ messages in thread
From: Christian Borntraeger @ 2026-11-04 9:20 UTC (permalink / raw)
To: Andreas Grapentin, Steffen Eiden, Marc Zyngier, Janosch Frank,
Claudio Imbrenda, David Hildenbrand, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle
Cc: kvm, linux-s390, linux-kernel
Am 03.11.26 um 17:37 schrieb Andreas Grapentin:
> Forward-declare enum vcpu_sysreg in kvm_host_arm64.h. This should have
> been included in the first iteration of the header, since we will need
> it to talk about system registers.
>
> Since the definition of enum vcpu_sysreg is not shared yet, and not used
> on the s390 side, this should not cause any functional changes.
>
> Fixes: e6c329180d1d ("KVM: s390: arm64: Introduce host definitions")
> Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
> ---
> arch/s390/include/asm/kvm_host_arm64.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/s390/include/asm/kvm_host_arm64.h b/arch/s390/include/asm/kvm_host_arm64.h
> index a3e40650d75d..3e69724f17c9 100644
> --- a/arch/s390/include/asm/kvm_host_arm64.h
> +++ b/arch/s390/include/asm/kvm_host_arm64.h
> @@ -8,6 +8,7 @@
> #include <asm/debug.h>
>
> #define vcpu_gp_regs(v) ((v)->arch.sae_block.gpr)
> +enum vcpu_sysreg;
>
> #include <arm64/kvm_host.h>
> #include <arm64/ptrace.h>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/3] KVM: s390: arm64: Fix kvm_arm64 module naming consistency
2026-11-03 16:37 [PATCH 0/3] KVM: s390: arm64: Fixes for arm64 KVM support Andreas Grapentin
2026-11-03 16:37 ` [PATCH 1/3] KVM: s390: arm64: Turn vcpu->arch.pause into a counter Andreas Grapentin
2026-11-03 16:37 ` [PATCH 2/3] KVM: s390: arm64: Declare enum vcpu_sysreg Andreas Grapentin
@ 2026-11-03 16:37 ` Andreas Grapentin
2026-11-04 8:07 ` Steffen Eiden
2026-11-04 9:16 ` Christian Borntraeger
2026-11-03 18:31 ` [PATCH 0/3] KVM: s390: arm64: Fixes for arm64 KVM support Marc Zyngier
3 siblings, 2 replies; 11+ messages in thread
From: Andreas Grapentin @ 2026-11-03 16:37 UTC (permalink / raw)
To: Steffen Eiden, Marc Zyngier, Christian Borntraeger,
Janosch Frank, Claudio Imbrenda, David Hildenbrand,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle
Cc: kvm, linux-s390, linux-kernel, Andreas Grapentin
the module build for the kvm_arm64 module produced kvm-arm64.ko, fix the
Makefile to produce kvm_arm64.ko instead, so the output file name
matches the module name.
Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
---
arch/s390/kvm/arm64/Makefile | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/s390/kvm/arm64/Makefile b/arch/s390/kvm/arm64/Makefile
index 3f0fe5c9f0a1..b48dc65b7aaa 100644
--- a/arch/s390/kvm/arm64/Makefile
+++ b/arch/s390/kvm/arm64/Makefile
@@ -29,7 +29,7 @@ $(obj)/%-arm64.o: $(src)/%.c FORCE
$(call if_changed_rule,cc_o_c)
$(call cmd,force_checksrc)
-# %-arm64.o stems don't match any kvm-arm64-y entry so Kbuild derives wrong
+# %-arm64.o stems don't match any kvm_arm64-y entry so Kbuild derives wrong
# KBUILD_MODNAME/KBUILD_MODFILE. Force include a generated header to override.
KVM_ARM64_MODNAME_H := $(obj)/generated/kvm_arm64_modname.h
ccflags-y += -include $(KVM_ARM64_MODNAME_H)
@@ -48,7 +48,7 @@ define filechk_kvm_arm64_modname
echo '#undef __KBUILD_MODNAME'; \
echo '#define __KBUILD_MODNAME $(KVM_DEV_NAME)'; \
echo '#undef KBUILD_MODFILE'; \
- echo '#define KBUILD_MODFILE "$(obj)/kvm-arm64"'; \
+ echo '#define KBUILD_MODFILE "$(obj)/kvm_arm64"'; \
echo '#endif /* __KVM_ARM64_MODNAME_H */'
endef
@@ -60,7 +60,7 @@ $(addprefix $(obj)/,$(kvm-arm64-obj)): private part-of-builtin := y
ifeq ($(CONFIG_KVM),m)
-kvm-arm64-y = $(kvm-arm64-obj)
+kvm_arm64-y = $(kvm-arm64-obj)
else ifeq ($(CONFIG_KVM),y)
@@ -86,7 +86,7 @@ $(obj)/kvm_symbol_list: $(obj)/kvm-unnamespaced.o FORCE
# cmd_oc_o_o carries -DKBUILD_MODFILE so generate_builtin_ranges.awk
# can attribute kvm-namespaced.o to kvm_arm64 via its .cmd file.
-cmd_oc_o_o = $(cmd_objcopy) -DKBUILD_MODFILE='"$(obj)/kvm-arm64"'
+cmd_oc_o_o = $(cmd_objcopy) -DKBUILD_MODFILE='"$(obj)/kvm_arm64"'
define rule_oc_o_o
$(call cmd,objcopy)
@printf '%s\n' 'savedcmd_$@ := $(call make-cmd,oc_o_o)' > $(dot-target).cmd
@@ -98,7 +98,7 @@ OBJCOPYFLAGS_kvm-namespaced.o := -O $(LD_BFD) --localize-symbols=$(obj)/kvm_symb
$(obj)/kvm-namespaced.o: $(obj)/kvm-unnamespaced.o $(obj)/kvm_symbol_list FORCE
$(call if_changed_rule,oc_o_o)
-kvm-arm64-y = kvm-namespaced.o
+kvm_arm64-y = kvm-namespaced.o
targets += kvm-unnamespaced.o kvm_symbol_list kvm-namespaced.o
@@ -106,5 +106,5 @@ endif
clean-files += kvm-unnamespaced.o kvm_symbol_list kvm-namespaced.o
-obj-$(CONFIG_KVM) += kvm-arm64.o
+obj-$(CONFIG_KVM) += kvm_arm64.o
--
2.55.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] KVM: s390: arm64: Fix kvm_arm64 module naming consistency
2026-11-03 16:37 ` [PATCH 3/3] KVM: s390: arm64: Fix kvm_arm64 module naming consistency Andreas Grapentin
@ 2026-11-04 8:07 ` Steffen Eiden
2026-11-04 9:16 ` Christian Borntraeger
1 sibling, 0 replies; 11+ messages in thread
From: Steffen Eiden @ 2026-11-04 8:07 UTC (permalink / raw)
To: Andreas Grapentin
Cc: Marc Zyngier, Christian Borntraeger, Janosch Frank,
Claudio Imbrenda, David Hildenbrand, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle, kvm, linux-s390,
linux-kernel
On Tue, Nov 03, 2026 at 05:37:04PM +0100, Andreas Grapentin wrote:
> the module build for the kvm_arm64 module produced kvm-arm64.ko, fix the
Nit: start with an upper case T
> Makefile to produce kvm_arm64.ko instead, so the output file name
> matches the module name.
>
> Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] KVM: s390: arm64: Fix kvm_arm64 module naming consistency
2026-11-03 16:37 ` [PATCH 3/3] KVM: s390: arm64: Fix kvm_arm64 module naming consistency Andreas Grapentin
2026-11-04 8:07 ` Steffen Eiden
@ 2026-11-04 9:16 ` Christian Borntraeger
1 sibling, 0 replies; 11+ messages in thread
From: Christian Borntraeger @ 2026-11-04 9:16 UTC (permalink / raw)
To: Andreas Grapentin, Steffen Eiden, Marc Zyngier, Janosch Frank,
Claudio Imbrenda, David Hildenbrand, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle
Cc: kvm, linux-s390, linux-kernel
Am 03.11.26 um 17:37 schrieb Andreas Grapentin:
> the module build for the kvm_arm64 module produced kvm-arm64.ko, fix the
> Makefile to produce kvm_arm64.ko instead, so the output file name
> matches the module name.
>
> Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
Its a stretch, but maybe add
Fixes: 91b87e6eea4d0 ("KVM: s390: arm64: Integrate arm on s390")
so that any backports will not miss this.
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] KVM: s390: arm64: Fixes for arm64 KVM support
2026-11-03 16:37 [PATCH 0/3] KVM: s390: arm64: Fixes for arm64 KVM support Andreas Grapentin
` (2 preceding siblings ...)
2026-11-03 16:37 ` [PATCH 3/3] KVM: s390: arm64: Fix kvm_arm64 module naming consistency Andreas Grapentin
@ 2026-11-03 18:31 ` Marc Zyngier
2026-11-04 7:59 ` Steffen Eiden
3 siblings, 1 reply; 11+ messages in thread
From: Marc Zyngier @ 2026-11-03 18:31 UTC (permalink / raw)
To: Andreas Grapentin
Cc: Steffen Eiden, Christian Borntraeger, Janosch Frank,
Claudio Imbrenda, David Hildenbrand, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle, kvm, linux-s390,
linux-kernel
On Tue, 03 Nov 2026 16:37:01 +0000,
Andreas Grapentin <gra@linux.ibm.com> wrote:
>
> Some fixups for the previous series that introduced arm64 KVM support on
> s390. Forward-declare enum vcpu_sysreg because we are definitely going
> to need that, then make the module naming consistent and iron out an
> inconsistency in the definition of vcpu->arch.pause between s390 and
> native arm64 KVM.
It's an interesting one. Obviously, this wasn't caught by building the
upstream code. I guess this triggered with the rest of the patches?
>
> No functional changes intended on either arm64 or s390.
>
> Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
> ---
> Andreas Grapentin (2):
> KVM: s390: arm64: Declare enum vcpu_sysreg
> KVM: s390: arm64: Fix kvm_arm64 module naming consistency
>
> Steffen Eiden (1):
> KVM: s390: arm64: Turn vcpu->arch.pause into a counter
>
> arch/s390/include/asm/kvm_host_arm64.h | 8 ++++----
> arch/s390/kvm/arm64/Makefile | 12 ++++++------
> 2 files changed, 10 insertions(+), 10 deletions(-)
Looks all reasonable to me.
Acked-by: Marc Zyngier <maz@kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 0/3] KVM: s390: arm64: Fixes for arm64 KVM support
2026-11-03 18:31 ` [PATCH 0/3] KVM: s390: arm64: Fixes for arm64 KVM support Marc Zyngier
@ 2026-11-04 7:59 ` Steffen Eiden
0 siblings, 0 replies; 11+ messages in thread
From: Steffen Eiden @ 2026-11-04 7:59 UTC (permalink / raw)
To: Marc Zyngier
Cc: Andreas Grapentin, Christian Borntraeger, Janosch Frank,
Claudio Imbrenda, David Hildenbrand, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle, kvm, linux-s390,
linux-kernel
On Tue, Nov 03, 2026 at 06:31:31PM +0000, Marc Zyngier wrote:
> On Tue, 03 Nov 2026 16:37:01 +0000,
> Andreas Grapentin <gra@linux.ibm.com> wrote:
> >
> > Some fixups for the previous series that introduced arm64 KVM support on
> > s390. Forward-declare enum vcpu_sysreg because we are definitely going
> > to need that, then make the module naming consistent and iron out an
> > inconsistency in the definition of vcpu->arch.pause between s390 and
> > native arm64 KVM.
>
> It's an interesting one. Obviously, this wasn't caught by building the
> upstream code. I guess this triggered with the rest of the patches?
Yes, this was triggered by the rest of the patches. The field somehow
got in the first batch although it is not needed. We'll need it later
anyways so I did not delete it for this fixup.
>
> >
> > No functional changes intended on either arm64 or s390.
> >
> > Signed-off-by: Andreas Grapentin <gra@linux.ibm.com>
> > ---
> > Andreas Grapentin (2):
> > KVM: s390: arm64: Declare enum vcpu_sysreg
> > KVM: s390: arm64: Fix kvm_arm64 module naming consistency
> >
> > Steffen Eiden (1):
> > KVM: s390: arm64: Turn vcpu->arch.pause into a counter
> >
> > arch/s390/include/asm/kvm_host_arm64.h | 8 ++++----
> > arch/s390/kvm/arm64/Makefile | 12 ++++++------
> > 2 files changed, 10 insertions(+), 10 deletions(-)
>
> Looks all reasonable to me.
>
> Acked-by: Marc Zyngier <maz@kernel.org>
Thanks.
Steffen
^ permalink raw reply [flat|nested] 11+ messages in thread