KVM: s390: arm64: Fixes for arm64 KVM support
Subsystems (4)
Andreas Grapentin
reviewercover KVM: s390: arm64: Fixes for arm64 KVM support
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.
No functional changes intended on either arm64 or s390.
---
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(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261103-s390_arm64_kvm_fixups-b285654f214c
Best regards,
Signature · 1 line
Andreas Grapentin <[email protected]>
Andreas Grapentin
reviewerPATCH 1/3 KVM: s390: arm64: Turn vcpu->arch.pause into a counter
From: Steffen Eiden <[email protected]>
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.
--- arch/s390/include/asm/kvm_host_arm64.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
arch/s390/include/asm/kvm_host_arm64.h +3 -4
@@ -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;
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH 1/3] KVM: s390: arm64: Turn vcpu->arch.pause into a counter
Sashiko has reviewed this patch and found no issues.
Quoted 7 lines
From: Steffen Eiden <[email protected]>
The s390 arm64 vcpu struct mirrors arm64's
kvm_vcpu_arch. When commite64309198eda2("KVM: arm64: Turnvcpu->arch.pauseinto a counter") changed the type of kvm_vcpu_arch.pause from bool toatomic_t, the merge into this tree missed the s390 copy, leaving it out of sync.
Quoted 7 lines
Nothing on the s390 side accesses
vcpu->arch.pauseyet, 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 <[email protected]>Signed-off-by Andreas Grapentin <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Re: [PATCH 1/3] KVM: s390: arm64: Turn vcpu->arch.pause into a counter
In reply to Andreas GrapentinQuoted 41 lines · Andreas Grapentin
From: Steffen Eiden <[email protected]>
The s390 arm64 vcpu struct mirrors arm64's
kvm_vcpu_arch. When commite64309198eda2("KVM: arm64: Turnvcpu->arch.pauseinto a counter") changed the type of kvm_vcpu_arch.pause from bool toatomic_t, the merge into this tree missed the s390 copy, leaving it out of sync.Nothing on the s390 side accesses
vcpu->arch.pauseyet, 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 <[email protected]>Signed-off-by Andreas Grapentin <[email protected]>--- arch/s390/include/asm/kvm_host_arm64.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)arch/s390/include/asm/kvm_host_arm64.h +3
-4@@ -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;Signature · 2 lines
-- 2.55.0
Best,
-A
Andreas Grapentin
reviewerPATCH 2/3 KVM: s390: arm64: Declare enum vcpu_sysreg
In reply to Andreas GrapentinForward-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.
--- arch/s390/include/asm/kvm_host_arm64.h | 1 + 1 file changed, 1 insertion(+)
arch/s390/include/asm/kvm_host_arm64.h +1 -0
@@ -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>
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH 2/3] KVM: s390: arm64: Declare enum vcpu_sysreg
Sashiko has reviewed this patch and found no issues.
Quoted 9 lines
Forward-declare enum
vcpu_sysreginkvm_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_sysregis 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 <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Re: [PATCH 2/3] KVM: s390: arm64: Declare enum vcpu_sysreg
In reply to Andreas GrapentinQuoted 9 lines · Andreas Grapentin
Forward-declare enum
vcpu_sysreginkvm_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_sysregis 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 <[email protected]>
Re: [PATCH 2/3] KVM: s390: arm64: Declare enum vcpu_sysreg
In reply to Andreas GrapentinAm 03.11.26 um 17:37 schrieb Andreas Grapentin:
Quoted 9 lines
Forward-declare enum
vcpu_sysreginkvm_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_sysregis 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 <[email protected]>
Quoted 17 lines
--- arch/s390/include/asm/kvm_host_arm64.h | 1 + 1 file changed, 1 insertion(+)arch/s390/include/asm/kvm_host_arm64.h +1
-0@@ -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>
Andreas Grapentin
reviewerPATCH 3/3 KVM: s390: arm64: Fix kvm_arm64 module naming consistency
In reply to Andreas Grapentinthe 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.
--- arch/s390/kvm/arm64/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/s390/kvm/arm64/Makefile +6 -6
@@ -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
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH 3/3] KVM: s390: arm64: Fix kvm_arm64 module naming consistency
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
the module build for the
kvm_arm64module produced kvm-arm64.ko, fix theMakefileto produce kvm_arm64.ko instead, so the output file name matches the module name.Signed-off-by Andreas Grapentin <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Re: [PATCH 3/3] KVM: s390: arm64: Fix kvm_arm64 module naming consistency
In reply to Andreas GrapentinQuoted 1 line · Andreas Grapentin
the module build for the
kvm_arm64module produced kvm-arm64.ko, fix the
Nit: start with an upper case T
Quoted 4 lines
Makefileto produce kvm_arm64.ko instead, so the output file name matches the module name.Signed-off-by Andreas Grapentin <[email protected]>
Re: [PATCH 3/3] KVM: s390: arm64: Fix kvm_arm64 module naming consistency
In reply to Andreas GrapentinAm 03.11.26 um 17:37 schrieb Andreas Grapentin:
Quoted 5 lines
the module build for the
kvm_arm64module produced kvm-arm64.ko, fix theMakefileto produce kvm_arm64.ko instead, so the output file name matches the module name.Signed-off-by Andreas Grapentin <[email protected]>
Its a stretch, but maybe add
so that any backports will not miss this.
Quoted 6 lines · Andreas Grapentin
Some fixups for the previous series that introduced arm64 KVM support on s390. Forward-declare enum
vcpu_sysregbecause we are definitely going to need that, then make the module naming consistent and iron out an inconsistency in the definition ofvcpu->arch.pausebetween 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?
Quoted 9 lines
No functional changes intended on either arm64 or s390.
Signed-off-by Andreas Grapentin <[email protected]>---
Andreas Grapentin (2):
KVM: s390: arm64: Declare enumvcpu_sysreg
KVM: s390: arm64: Fixkvm_arm64module naming consistency
Quoted 6 lines
Steffen Eiden (1):
KVM: s390: arm64: Turn vcpu->arch.pause into a counterarch/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.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Steffen Eiden
reviewerQuoted 11 lines · Marc Zyngier
Quoted 6 lines · Andreas Grapentin
Some fixups for the previous series that introduced arm64 KVM support on s390. Forward-declare enum
vcpu_sysregbecause we are definitely going to need that, then make the module naming consistent and iron out an inconsistency in the definition ofvcpu->arch.pausebetween 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.
Quoted 13 lines
Quoted 13 lines
No functional changes intended on either arm64 or s390.
Signed-off-by Andreas Grapentin <[email protected]>---
Andreas Grapentin (2):
KVM: s390: arm64: Declare enumvcpu_sysreg
KVM: s390: arm64: Fixkvm_arm64module naming consistencySteffen Eiden (1):
KVM: s390: arm64: Turn vcpu->arch.pause into a counter
Quoted 7 lines
Quoted 3 lines
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 <[email protected]>
Thanks.
Steffen
Am 03.11.26 um 17:37 schrieb Andreas Grapentin:
Quoted 17 lines
Some fixups for the previous series that introduced arm64 KVM support on s390. Forward-declare enum
vcpu_sysregbecause we are definitely going to need that, then make the module naming consistent and iron out an inconsistency in the definition ofvcpu->arch.pausebetween s390 and native arm64 KVM.No functional changes intended on either arm64 or s390.
Signed-off-by Andreas Grapentin <[email protected]>---
Andreas Grapentin (2):
KVM: s390: arm64: Declare enumvcpu_sysreg
KVM: s390: arm64: Fixkvm_arm64module naming consistencySteffen Eiden (1):
KVM: s390: arm64: Turn vcpu->arch.pause into a counter
Quoted 8 lines
arch/s390/include/asm/kvm_host_arm64.h | 8 ++++---- arch/s390/kvm/arm64/Makefile | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-)---
base-commit:6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261103-s390_arm64_kvm_fixups-b285654f214cBest regards,
Thanks applied.