From: Marc Zyngier <maz@kernel.org>
To: Liao Chang <liaochang1@huawei.com>
Cc: <corbet@lwn.net>, <catalin.marinas@arm.com>, <will@kernel.org>,
<akpm@linux-foundation.org>, <paulmck@kernel.org>,
<pawan.kumar.gupta@linux.intel.com>, <mingo@kernel.org>,
<bp@alien8.de>, <kees@kernel.org>, <arnd@arndb.de>,
<fvdl@google.com>, <broonie@kernel.org>, <oliver.upton@linux.dev>,
<yeoreum.yun@arm.com>, <yangyicong@hisilicon.com>,
<james.morse@arm.com>, <ardb@kernel.org>,
<hardevsinh.palaniya@siliconsignals.io>,
<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm64: Add kernel parameter to disable trap EL0 accesses to IMPDEF regs
Date: Tue, 21 Oct 2025 13:25:00 +0100 [thread overview]
Message-ID: <86ecqwwig3.wl-maz@kernel.org> (raw)
In-Reply-To: <20251021115428.557084-1-liaochang1@huawei.com>
On Tue, 21 Oct 2025 12:54:28 +0100,
Liao Chang <liaochang1@huawei.com> wrote:
>
> Add kernel parameter to allow system-wide EL0 access to IMPDEF system
> regregisters and instructions without trapping to EL1/EL2. Since trap
> overhead will compromises benefits, and it's even worse in
> virtualization on CPU where certain IMPDEF registers and instructions
> are designed for EL0 performance use.
Since you mention virtualisation, I want to be clear: there is no way
I will consider anything like this for KVM. KVM will always trap and
UNDEF such register accesses, no matter where they come from (EL0 or
EL1).
Allowing such registers to be accessed from within a guest would make
it impossible to context-switch or save/restore the guest correctly.
You can of course do what you want in your downstream kernel or your
own hypervisor, but I wanted to set the expectations on the upstream
side.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2025-10-21 12:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 11:54 [PATCH] arm64: Add kernel parameter to disable trap EL0 accesses to IMPDEF regs Liao Chang
2025-10-21 12:25 ` Marc Zyngier [this message]
2025-10-22 1:35 ` Liao, Chang
2025-10-22 8:05 ` Marc Zyngier
2025-10-22 8:35 ` Liao, Chang
2025-10-22 2:37 ` Liao, Chang
2025-10-22 8:44 ` Marc Zyngier
2025-10-22 5:26 ` Yicong Yang
2025-10-22 9:25 ` Liao, Chang
2025-10-22 10:15 ` Yicong Yang
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=86ecqwwig3.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=fvdl@google.com \
--cc=hardevsinh.palaniya@siliconsignals.io \
--cc=james.morse@arm.com \
--cc=kees@kernel.org \
--cc=liaochang1@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=paulmck@kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=will@kernel.org \
--cc=yangyicong@hisilicon.com \
--cc=yeoreum.yun@arm.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;
as well as URLs for NNTP newsgroup(s).