From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA104606A31F for ; Sat, 5 Dec 2026 18:30:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Z3exzgca; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=R0fzZzl2 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Subject:Cc:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=pQ2PC4ylopudT0KLGzyQ45F0uYVLflVG+ICqz+yEBUg=; b=Z3exzgcaFB9q41My18+2SYJxIY XW/d3mvMpLOF6tQg9buwazAuglWWnlO9ky0YJBi7ULNjhQOXSpsnJ8Do0rpdpwyD8yWb44XOBslz1 x69AZU/nAEfISI8KvJ0SPoZ6mZC5H7u9zWkZ5Bu/+nI0RpF5M108EWkZlU7MNMg45KgsTtH3cMC/f LBOhiiWBoGLwry7zAdhfGPr8wfdpim8UtS5ixuUVDCuwvMNbRJNu7XOFQv8h/Bue8csgvNl4MpUgt wXIphWCGREnIasOsO9KPhKdJoQ+YIuKWBS8EtjA0ismye3TTKvd3pcoquFglthUo/NPKNdwK0pcZW gue0py6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZuX6-00000002m0D-3G9C; Sat, 05 Dec 2026 18:30:52 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZuX4-00000002m02-3sS6 for linux-arm-kernel@lists.infradead.org; Sat, 05 Dec 2026 18:30:51 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 49EB560DEA; Sat, 5 Dec 2026 18:30:49 +0000 (UTC) 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-Archived-By: 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 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-16.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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.