All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: "Aiqun Yu (Maria)" <quic_aiquny@quicinc.com>
Cc: Arnd Bergmann <arnd@arndb.de>, <kvmarm@lists.linux.dev>,
	<linux-arm-kernel@lists.infradead.org>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Joey Gouly <joey.gouly@arm.com>, Will Deacon <will@kernel.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Linaro Kernel Functional Testing <lkft@linaro.org>
Subject: Re: [PATCH] KVM: arm64: nv: Work around lack of pauth support in old toolchains
Date: Tue, 23 Apr 2024 13:06:25 +0100	[thread overview]
Message-ID: <87o7a0tha6.wl-maz@kernel.org> (raw)
In-Reply-To: <0b970cf5-a880-469c-93ab-9a268ee4ea2b@quicinc.com>

On Tue, 23 Apr 2024 13:00:55 +0100,
"Aiqun Yu (Maria)" <quic_aiquny@quicinc.com> wrote:
> 
> 
> 
> On 4/23/2024 4:24 PM, Arnd Bergmann wrote:
> > On Tue, Apr 23, 2024, at 00:48, Marc Zyngier wrote:
> >> We still support GCC 8.x, and it appears that this toolchain
> >> does not understand "pauth" as a valid architectural extension.
> >> After all, it's only been 8 years since ARMv8.3 was released...
> > 
> > Just to clarify: I'm fairly sure that all supported toolchains
> > support ARMv8.3 and PACGA, the problem with ".arch_extension pauth\n"
> > seems to be that it was retroactively made an optional
> > feature for earlier architecture versions a few years after
> > ARMv8.3, so most binutils versions we support understand
> > pacga as an armv8.3 feature but reject the pauth name for the
> > extension.
> Kind of agree with Arnd here.
> Shall the fix just remove the ".arch_extension pauth"?
> 
> I've tried gcc 7 failed with the pauth name for the extension.
> After I remove the ".arch_extension pauth" and use "pacga" instruction
> directly pass the gcc 7 compilation.

And breaks with LLVM:

  CC      arch/arm64/kvm/pauth.o
arch/arm64/kvm/pauth.c:40:9: error: instruction requires: pauth
                     "pacga %0, %1, %2" : "=r" (pac) : "r" (ptr), "r" (mod));
                      ^
<inline asm>:2:1: note: instantiated into assembly here
pacga x19, x1, x9
^
1 error generated.


	M.

-- 
Without deviation from the norm, progress is not possible.

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: "Aiqun Yu (Maria)" <quic_aiquny@quicinc.com>
Cc: Arnd Bergmann <arnd@arndb.de>, <kvmarm@lists.linux.dev>,
	<linux-arm-kernel@lists.infradead.org>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Joey Gouly <joey.gouly@arm.com>, Will Deacon <will@kernel.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Linaro Kernel Functional Testing <lkft@linaro.org>
Subject: Re: [PATCH] KVM: arm64: nv: Work around lack of pauth support in old toolchains
Date: Tue, 23 Apr 2024 13:06:25 +0100	[thread overview]
Message-ID: <87o7a0tha6.wl-maz@kernel.org> (raw)
In-Reply-To: <0b970cf5-a880-469c-93ab-9a268ee4ea2b@quicinc.com>

On Tue, 23 Apr 2024 13:00:55 +0100,
"Aiqun Yu (Maria)" <quic_aiquny@quicinc.com> wrote:
> 
> 
> 
> On 4/23/2024 4:24 PM, Arnd Bergmann wrote:
> > On Tue, Apr 23, 2024, at 00:48, Marc Zyngier wrote:
> >> We still support GCC 8.x, and it appears that this toolchain
> >> does not understand "pauth" as a valid architectural extension.
> >> After all, it's only been 8 years since ARMv8.3 was released...
> > 
> > Just to clarify: I'm fairly sure that all supported toolchains
> > support ARMv8.3 and PACGA, the problem with ".arch_extension pauth\n"
> > seems to be that it was retroactively made an optional
> > feature for earlier architecture versions a few years after
> > ARMv8.3, so most binutils versions we support understand
> > pacga as an armv8.3 feature but reject the pauth name for the
> > extension.
> Kind of agree with Arnd here.
> Shall the fix just remove the ".arch_extension pauth"?
> 
> I've tried gcc 7 failed with the pauth name for the extension.
> After I remove the ".arch_extension pauth" and use "pacga" instruction
> directly pass the gcc 7 compilation.

And breaks with LLVM:

  CC      arch/arm64/kvm/pauth.o
arch/arm64/kvm/pauth.c:40:9: error: instruction requires: pauth
                     "pacga %0, %1, %2" : "=r" (pac) : "r" (ptr), "r" (mod));
                      ^
<inline asm>:2:1: note: instantiated into assembly here
pacga x19, x1, x9
^
1 error generated.


	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-04-23 12:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 22:48 [PATCH] KVM: arm64: nv: Work around lack of pauth support in old toolchains Marc Zyngier
2024-04-22 22:48 ` Marc Zyngier
2024-04-23  8:24 ` Arnd Bergmann
2024-04-23  8:24   ` Arnd Bergmann
2024-04-23 12:00   ` Aiqun Yu (Maria)
2024-04-23 12:00     ` Aiqun Yu (Maria)
2024-04-23 12:06     ` Marc Zyngier [this message]
2024-04-23 12:06       ` Marc Zyngier
2024-04-23 12:37       ` Arnd Bergmann
2024-04-23 12:37         ` Arnd Bergmann
2024-04-23 16:15         ` Marc Zyngier
2024-04-23 16:15           ` Marc Zyngier
2024-04-24  1:54           ` Aiqun Yu (Maria)
2024-04-24  1:54             ` Aiqun Yu (Maria)
2024-04-23  8:37 ` Mark Rutland
2024-04-23  8:37   ` Mark Rutland
2024-04-23 11:33   ` Marc Zyngier
2024-04-23 11:33     ` Marc Zyngier

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=87o7a0tha6.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=arnd@arndb.de \
    --cc=james.morse@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lkft@linaro.org \
    --cc=mark.rutland@arm.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=oliver.upton@linux.dev \
    --cc=quic_aiquny@quicinc.com \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.