From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796495449; b=e+ZAC8zOLxbzDtGHXcLjKDDTpExXbRv1E1M3dWuYzmArv5AO5AcOkflwVUTO1KUUcmWm e9CfPwP9NPoJFjUTCaKkwXDA0zjmQ+cbFhXLoxVoy8RWMekDJZvSs6U9A7YXV2rQQWDCG lQvFhlO0VRqHwW+vPB2Tqvev1ZnckWs4aNHDm4UYFu6gWOKTgvMmcnOq+TY/+M35Cadvm nIv2faBooaow/2CcDtxONWL1Vh7KBmWroAdAow6uUgj70WGvz77cT+YHeZ5zul9oBPCZ3 BP9rY1MqOMyEiYcbC80RHGYzx6aBGAUf13cHmsYQueDigssq+x766S/xcQVtiQm1SyQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796495449; h=Received:DKIM-Signature:Received:Date:Message-ID:From:To:Cc:Subject: In-Reply-To:References:User-Agent:MIME-Version:Content-Type: Content-Transfer-Encoding:X-SA-Exim-Connect-IP:X-SA-Exim-Rcpt-To: X-SA-Exim-Mail-From:X-SA-Exim-Scanned; bh=pQ2PC4ylopudT0KLGzyQ45F0uYVLflVG+ICqz+yEBUg=; b=Mo0uRMA+62VYwJO//LQYxZSur+EkEemSH4FGxghbgJLGHXuKRuxmkPh4VS1eezvhoD5O KoBEVwyISErLq5j0rNkI+0GxmSDo0FFNavgvZhzB+4nXamaX3w6VNhbFV1Y+pEba5p722 Rfypk84VMOQZMehA1WlOx1Gl1FcXcfACty/xOb1CPpQ1ZUI/Y4L6AS3UfwK9WXaIt4rWk MXF/p3JeVfVNm8aJ7CI2WmVwUlH6IJ4VnXFzcv0cLWGOq/oIqNGfVZAUjesaFjJMCAeP4 z+LzCYtjGe1bc5RBc3tWVxYTfOrFiwluxde37pgiGPeia4XbAyQG3JChdMARTZh1Y0Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=R0fzZzl2; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25291606A31F; Sat, 5 Dec 2026 18:30:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=R0fzZzl2 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF21F1F00936; Sat, 5 Dec 2026 18:30:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796495449; bh=pQ2PC4ylopudT0KLGzyQ45F0uYVLflVG+ICqz+yEBUg=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=R0fzZzl2Oha/bWp39gcIT0Q8tS+yckHHccjngMCT1q1UWvvAXq49lwktXw0hz+Pv5 3i1zlAjW13bA0CUFVYrYf9OQVAg0i19PaciW5WoE3qtcM0B7mD8On2OoXUANLZg3+L 8UPM+rhrdERasHRo/16nboJmBCjp80bqFV4D/XNCPUu20GAcJvvarqnGvOXZioklaz nN1V7z7NjWUAAbMj5XgsOKDg3lpRXPvIiOQDrElzb83sgs2pDlfod2Mc1FTUFm+z0R 8PJKdAH3TmGDd88OynGHkwNzMwBRqRDwbzoiphvnejZ92K7ym+1v45g3RzJYaHp+Bz 2dnmDaUnG2fXw== Received: from sofa.misterjones.org ([185.219.108.64] helo=lobster-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xZuX0-00000007a1U-2SeU; Sat, 05 Dec 2026 18:30:46 +0000 Date: Sat, 05 Dec 2026 18:34:39 +0000 Message-ID: <87fqwbo9ts.wl-maz@kernel.org> From: Marc Zyngier To: Andreas Grapentin Cc: Steffen Eiden , Oliver Upton , Fuad Tabba , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Sven Schnelle , Friedrich Welter , Gautam Gala , Hariharan Mari , Hendrik Brueckner , Nico Boehr , Ulrich Weigand , Arnd Bergmann , Paolo Bonzini , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH 01/12] arm64: Prepare for sharing with s390 In-Reply-To: References: <20261202-smccc-v1-0-48340e2737b6@linux.ibm.com> <20261202-smccc-v1-1-48340e2737b6@linux.ibm.com> <86y0a5wb3y.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: gra@linux.ibm.com, seiden@linux.ibm.com, oupton@kernel.org, fuad.tabba@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, borntraeger@linux.ibm.com, frankja@linux.ibm.com, imbrenda@linux.ibm.com, david@kernel.org, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, svens@linux.ibm.com, fritz@linux.ibm.com, ggala@linux.ibm.com, hari55@linux.ibm.com, brueckner@linux.ibm.com, nrb@linux.ibm.com, Ulrich.Weigand@de.ibm.com, arnd@arndb.de, pbonzini@redhat.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Fri, 04 Dec 2026 11:27:55 +0000, Andreas Grapentin wrote: >=20 > On Dec 04 26, Marc Zyngier wrote: > > On Wed, 02 Dec 2026 14:11:39 +0000, > > Steffen Eiden wrote: > > >=20 > > > Add s390 guards for arm headers which reside in include/kvm. This all= ows > > > s390 to use headers placed in its arch include/arm64/ . > >=20 > > As I said in my reply to another patch, this isn't an acceptable > > outcome. If you are taking the full include file, you take it all, > > without s390 stuff in it. > >=20 > > > diff --git a/include/kvm/arm_hypercalls.h b/include/kvm/arm_hypercall= s.h > > > index 2df152207ccd..5ce4c2d43f9a 100644 > > > --- a/include/kvm/arm_hypercalls.h > > > +++ b/include/kvm/arm_hypercalls.h > > > @@ -4,7 +4,10 @@ > > > #ifndef __KVM_ARM_HYPERCALLS_H > > > #define __KVM_ARM_HYPERCALLS_H> > > > > > > +/* s390 provides its own header view */ > > > +#ifndef __s390__ > > > #include > > > +#endif // !__s390__ > > > > > > int kvm_smccc_call_handler(struct kvm_vcpu *vcpu); > > =20 > > The real question really is: why can't this directly target your own > > version of kvm_emulate.h? My hunch is that the problem is in the > > generated path: > >=20 > > $ find . -name kvm_emulate.h | grep arm64 > > ./arch/s390/include/arm64/kvm_emulate.h > > ./arch/arm64/include/asm/kvm_emulate.h > >=20 > > Shouldn't the s390 path be arch/s390/include/arm64/asm/kvm_emulate.h > > so that reaches the correct file? >=20 > We tried this initially, but there were examples where a header with the > path ./arch/s390/include/asm/foo.h already exists, which would shadow > the generated header during compile time. >=20 > We tried to solve this with a bunch of unholy trickery in the include > paths, but in the end we settled for rewriting all the asm/ includes to > arm64/ during processing of the shared headers to separate the > namespaces cleanly. >=20 > The fallout of this decision is that actually verbatim shared headers > now disagree in their view of the include path. There seem to be a pretty simple solution to this conundrum, in the form of a symbolic link. See the hack below, which allows me to build the kvms390/sea branch without any __s390__ horror. Or is there another set of nasty stuff lurking somewhere else? Thanks, M. =46rom cf64943fbd34b626d748b1fd101dbaf872bd1bb9 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Sat, 5 Dec 2026 18:12:31 +0000 Subject: [PATCH] KVM: s390: arm64: Allow asm/foo.h directives in inherited arm64 code Make sure that: - arch/arm64/include/arm64 is in include path for code inherited from arm64 - asm/foo.h can be located in arch/arm64/include/arm64 by having an "asm" symlink pointing to that same directory This ensures that any foo.h include file that has is present in arch/arm64/include/arm64 can be reached using , and avoids other unsavoury methods. Signed-off-by: Marc Zyngier --- arch/s390/include/arm64/asm | 1 + arch/s390/kvm/arm64/Makefile | 1 + 2 files changed, 2 insertions(+) create mode 120000 arch/s390/include/arm64/asm diff --git a/arch/s390/include/arm64/asm b/arch/s390/include/arm64/asm new file mode 120000 index 0000000000000..945c9b46d684f --- /dev/null +++ b/arch/s390/include/arm64/asm @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/arch/s390/kvm/arm64/Makefile b/arch/s390/kvm/arm64/Makefile index e22037a7c498f..bfe3605d7cec3 100644 --- a/arch/s390/kvm/arm64/Makefile +++ b/arch/s390/kvm/arm64/Makefile @@ -7,6 +7,7 @@ include $(srctree)/virt/kvm/Makefile.kvm include $(srctree)/arch/$(SRCARCH)/kvm/gmap/Makefile include $(src)/Makefile.gen =20 +ccflags-y +=3D -I$(srctree)/arch/$(SRCARCH)/include/arm64 ccflags-y +=3D -I $(src) -I $(objtree)/$(obj) -I$(srctree)/arch/$(SRCARCH)= /kvm/gmap -DKVM_S390_ARM64 =20 kvm-arm64-local :=3D \ --=20 2.47.3 --=20 Jazz isn't dead. It just smells funny.