From: sashiko-bot@kernel.org
To: "Steffen Eiden" <seiden@linux.ibm.com>
Cc: "Christian Borntraeger" <borntraeger@linux.ibm.com>,
linux-s390@vger.kernel.org, kvmarm@lists.linux.dev,
"Oliver Upton" <oupton@kernel.org>,
"Heiko Carstens" <hca@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Marc Zyngier" <maz@kernel.org>,
kvm@vger.kernel.org
Subject: Re: [PATCH v7 10/23] arm64: Share arm64 headers with s390
Date: Mon, 31 Aug 2026 19:03:54 +0000 [thread overview]
Message-ID: <20260831190354.B76C01F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260831144802.834315-11-seiden@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Using #ifdef ARM64_S390_COMMON as a marker for shared code hides critical macros from userspace tools, breaking their compilation.
--
commit ef8ab1698ed178bf6b33deea77a5a3895fabd918
Author: Steffen Eiden <seiden@linux.ibm.com>
arm64: Share arm64 headers with s390
This commit modifies arm64 headers to allow sharing definitions with s390 by
enclosing shared regions within an ARM64_S390_COMMON ifdef block. The
preprocessor symbol is defined for arm64 via the Makefile.
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 6b005c8fef706..12cbad460258f 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -45,6 +45,11 @@ KBUILD_CFLAGS += $(CC_FLAGS_NO_FPU) \
> KBUILD_CFLAGS += $(call cc-disable-warning, psabi)
> KBUILD_AFLAGS += $(compat_vdso)
>
> +# Enable all code shared to s390
> +KBUILD_CFLAGS += -DARM64_S390_COMMON
[Severity: Medium]
Will this break standalone compilation environments? The macro is only
injected into the core kernel build flags (KBUILD_CFLAGS) in
arch/arm64/Makefile. Standalone tools like KVM selftests or perf, as well
as out-of-tree tracing scripts that do not inherit these core flags, will
not have ARM64_S390_COMMON defined.
[ ... ]
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index 5261c21a437cc..a8ddce3921b87 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -39,6 +39,7 @@
>
> #define KVM_MAX_VCPUS VGIC_V3_MAX_CPUS
>
> +#ifdef ARM64_S390_COMMON
> #define KVM_VCPU_MAX_FEATURES 10
[Severity: Medium]
Does this code break the struct kvm_arch definition for environments where
ARM64_S390_COMMON is not defined? The KVM_VCPU_MAX_FEATURES macro in
arch/arm64/include/asm/kvm_host.h is hidden inside the ifdef block, but it
is used outside the block to define the size in
DECLARE_BITMAP(vcpu_features, KVM_VCPU_MAX_FEATURES).
[ ... ]
> diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h
> index ab205f9db94ad..1c5c4df260bea 100644
> --- a/arch/arm64/include/asm/sysreg.h
> +++ b/arch/arm64/include/asm/sysreg.h
> @@ -16,6 +16,8 @@
>
> #include <asm/gpr-num.h>
>
> +#ifdef ARM64_S390_COMMON
> +
> /*
> * ARMv8 ARM reserves the following encoding for system registers:
> * (Ref: ARMv8 ARM, Section: "System instruction class encoding overview",
> @@ -50,6 +52,8 @@
> #define sys_reg_CRm(id) (((id) >> CRm_shift) & CRm_mask)
> #define sys_reg_Op2(id) (((id) >> Op2_shift) & Op2_mask)
>
> +#endif /* ARM64_S390_COMMON */
[Severity: Medium]
Does hiding the sys_reg macro inside the ifdef block break the compilation
of all SYS_* registers for tools that sync arch/arm64/include/asm/sysreg.h?
If the tool does not define ARM64_S390_COMMON, dependent macros like
SYS_SCTLR_EL1 will become undefined.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260831144802.834315-1-seiden@linux.ibm.com?part=10
next prev parent reply other threads:[~2026-08-31 19:03 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 14:47 [PATCH v7 00/23] KVM: s390: Introduce arm64 KVM Steffen Eiden
2026-08-31 14:47 ` [PATCH v7 01/23] vfio: Use file-based reference counting for KVM Steffen Eiden
2026-08-31 18:16 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 02/23] KVM: Make device name configurable Steffen Eiden
2026-08-31 18:25 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 03/23] KVM: Allow KVM implementations to switch off MMIO independent of Kconfig Steffen Eiden
2026-08-31 18:31 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 04/23] arm64: Use proper include variant Steffen Eiden
2026-08-31 18:31 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 05/23] arm64: ptrace: Use constants for compat register numbers Steffen Eiden
2026-08-31 18:34 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 06/23] arm64: sysreg: Convert SPSR_ELx to automatic register generation Steffen Eiden
2026-08-31 18:38 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 07/23] KVM: arm64: Access elements of vcpu_gp_regs individually Steffen Eiden
2026-08-31 18:42 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 08/23] KVM: arm64: Use accessor functions for core regs Steffen Eiden
2026-08-31 18:45 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 09/23] arm64: Prepare sharing arm64 headers with s390 Steffen Eiden
2026-08-31 18:50 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 10/23] arm64: Share " Steffen Eiden
2026-08-31 19:03 ` sashiko-bot [this message]
2026-08-31 14:47 ` [PATCH v7 11/23] KVM: arm64: Share arm64 code " Steffen Eiden
2026-08-31 19:14 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 12/23] s390/tools: Use arm64 headers Steffen Eiden
2026-08-31 19:18 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 13/23] KVM: s390: Use arm64 code Steffen Eiden
2026-08-31 19:26 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 14/23] KVM: s390: Prepare KVM/s390 for a second KVM module Steffen Eiden
2026-08-31 19:47 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 15/23] s390: Introduce Start Arm Execution instruction Steffen Eiden
2026-08-31 20:00 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 16/23] KVM: s390: arm64: Introduce host definitions Steffen Eiden
2026-08-31 20:16 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 17/23] s390/hwcaps: Report SAE support as hwcap Steffen Eiden
2026-08-31 20:20 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 18/23] KVM: s390: Add basic arm64 kvm module Steffen Eiden
2026-08-31 20:56 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 19/23] KVM: s390: arm64: Implement required functions Steffen Eiden
2026-08-31 21:13 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 20/23] KVM: s390: arm64: Implement vm/vcpu create destroy Steffen Eiden
2026-08-31 21:30 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 21/23] KVM: s390: arm64: Implement vCPU IOCTLs Steffen Eiden
2026-08-31 21:47 ` sashiko-bot
2026-08-31 14:47 ` [PATCH v7 22/23] KVM: s390: arm64: Implement basic page fault handler Steffen Eiden
2026-08-31 22:00 ` sashiko-bot
2026-08-31 14:48 ` [PATCH v7 23/23] KVM: s390: arm64: Add KVM_S390_ARM64 Kconfig and Makefile Steffen Eiden
2026-08-31 22:19 ` 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=20260831190354.B76C01F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-s390@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=seiden@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