From: "Kristina Martšenko" <kristina.martsenko@arm.com>
To: linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org,
kvmarm@lists.linux.dev, linux-efi@vger.kernel.org
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Ryan Roberts <ryan.roberts@arm.com>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Linu Cherian <linu.cherian@arm.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Hanjun Guo <guohanjun@huawei.com>,
Sudeep Holla <sudeep.holla@kernel.org>,
Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@kernel.org>,
Fuad Tabba <fuad.tabba@linux.dev>,
Joey Gouly <joey.gouly@arm.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Ard Biesheuvel <ardb@kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>
Subject: [RFC 00/12] arm64: Add support for TLBI domains
Date: Thu, 1 Oct 2026 12:06:43 +0100 [thread overview]
Message-ID: <20261001110655.461473-1-kristina.martsenko@arm.com> (raw)
Hi,
This series allows the kernel to use TLBI domains. TLBI domains (FEAT_TLBID) is
an Arm architecture feature that enables a TLB invalidation to target a subset
of CPUs instead of the whole system. It can improve performance on systems with
many CPUs. TLBID is not yet part of the Arm Architecture Reference Manual but
some of it is described in the latest XML [1].
The goal of this series is to send TLBI commands only to the CPUs where a
process has run (i.e. where its page tables have been installed). The last
patch explains a bit about how it works. This is an RFC since I'm not familiar
with the kernel's TLB/mm code and I'd like feedback on whether the general
approach is correct.
A few notes and open questions:
* Domains are described in a new "TLBI" ACPI table. This is not yet part of
the ACPI specification. There was an initial proposal [2] but this series
uses a newer WIP version of the table that aims to be published by the end
of the year.
* There is currently no device tree binding since the feature is mainly meant
for server-class systems.
* It's also possible to use TLBI domains to limit a KVM guest's TLB
invalidations to CPUs where the guest has run. I'll try to include that in
the next version. This series only disables domains for guests.
* With this series a long-running process may eventually run on all CPUs and
just issue broadcast TLBIs. It may be worth periodically reducing the set
of CPUs but it's not clear when.
* There are currently no performance numbers since there is no hardware with
this feature yet.
* The series has been tested on an Arm FVP which supports the TLBID
architecture but does not have any domains (except domain 0).
Any feedback is welcome.
Thanks,
Kristina
[1] https://support.arm.com/architectures/a-profile-architecture#Downloads
[2] https://github.com/tianocore/edk2/issues/11999
Kristina Martšenko (12):
arm64: sysreg: Add definitions for FEAT_TLBID
arm64: Detect FEAT_TLBID
KVM: arm64: Hide TLBID from guest sysregs
KVM: arm64: Hide TLBID from guest instructions
ACPICA: Add TLBI table definition
ACPI: TLBI: Parse domains from table
arm64: tlbid: Set up CPU domain bitmaps
efi/arm: Check return value of init_new_context()
arm64: tlbid: Track the TLBI domain of a task
arm64: Support TLBIP instructions
arm64: tlbid: Pass domain to TLBI instructions
arm64: tlbid: Add documentation
Documentation/arch/arm64/booting.rst | 10 ++
arch/arm64/Kconfig | 12 ++
arch/arm64/include/asm/acpi.h | 10 ++
arch/arm64/include/asm/cpu.h | 1 +
arch/arm64/include/asm/cpufeature.h | 15 ++
arch/arm64/include/asm/el2_setup.h | 76 +++++++-
arch/arm64/include/asm/kvm_emulate.h | 5 +
arch/arm64/include/asm/mmu.h | 13 ++
arch/arm64/include/asm/mmu_context.h | 9 +-
arch/arm64/include/asm/tlbflush.h | 219 +++++++++++++++++-------
arch/arm64/kernel/cpufeature.c | 25 +++
arch/arm64/kernel/cpuinfo.c | 3 +
arch/arm64/kvm/config.c | 6 +
arch/arm64/kvm/emulate-nested.c | 1 +
arch/arm64/kvm/hyp/include/hyp/switch.h | 7 +-
arch/arm64/kvm/hyp/nvhe/tlb.c | 2 +-
arch/arm64/kvm/hyp/vhe/tlb.c | 4 +-
arch/arm64/kvm/sys_regs.c | 3 +
arch/arm64/mm/Makefile | 1 +
arch/arm64/mm/context.c | 6 +-
arch/arm64/mm/tlbid.c | 210 +++++++++++++++++++++++
arch/arm64/tools/cpucaps | 1 +
arch/arm64/tools/sysreg | 53 +++++-
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/init.c | 2 +
drivers/acpi/arm64/init.h | 1 +
drivers/acpi/arm64/tlbi.c | 196 +++++++++++++++++++++
drivers/firmware/efi/arm-runtime.c | 3 +-
include/acpi/actbl2.h | 32 ++++
30 files changed, 858 insertions(+), 72 deletions(-)
create mode 100644 arch/arm64/mm/tlbid.c
create mode 100644 drivers/acpi/arm64/tlbi.c
base-commit: 93f51579e7df248780214094418f205253383cc5
--
2.43.0
next reply other threads:[~2026-10-01 11:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 11:06 Kristina Martšenko [this message]
2026-10-01 11:06 ` [RFC 01/12] arm64: sysreg: Add definitions for FEAT_TLBID Kristina Martšenko
2026-10-01 11:06 ` [RFC 02/12] arm64: Detect FEAT_TLBID Kristina Martšenko
2026-10-01 11:06 ` [RFC 03/12] KVM: arm64: Hide TLBID from guest sysregs Kristina Martšenko
2026-10-01 11:06 ` [RFC 04/12] KVM: arm64: Hide TLBID from guest instructions Kristina Martšenko
2026-10-01 11:06 ` [RFC 05/12] ACPICA: Add TLBI table definition Kristina Martšenko
2026-10-01 11:06 ` [RFC 06/12] ACPI: TLBI: Parse domains from table Kristina Martšenko
2026-10-01 11:06 ` [RFC 07/12] arm64: tlbid: Set up CPU domain bitmaps Kristina Martšenko
2026-10-01 11:06 ` [RFC 08/12] efi/arm: Check return value of init_new_context() Kristina Martšenko
2026-10-04 8:00 ` Ard Biesheuvel
2026-10-01 11:06 ` [RFC 09/12] arm64: tlbid: Track the TLBI domain of a task Kristina Martšenko
2026-10-01 11:06 ` [RFC 10/12] arm64: Support TLBIP instructions Kristina Martšenko
2026-10-01 11:06 ` [RFC 11/12] arm64: tlbid: Pass domain to TLBI instructions Kristina Martšenko
2026-10-01 11:06 ` [RFC 12/12] arm64: tlbid: Add documentation Kristina Martšenko
2026-10-03 16:12 ` [RFC 00/12] arm64: Add support for TLBI domains Marc Zyngier
2026-10-05 8:40 ` Oliver Upton
2026-10-04 18:06 ` Zi Yan
2026-10-05 6:29 ` Will Deacon
2026-10-05 18:13 ` Zi Yan
2026-10-05 11:07 ` Catalin Marinas
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=20261001110655.461473-1-kristina.martsenko@arm.com \
--to=kristina.martsenko@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=david@kernel.org \
--cc=fuad.tabba@linux.dev \
--cc=guohanjun@huawei.com \
--cc=ilias.apalodimas@linaro.org \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linu.cherian@arm.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=seiden@linux.ibm.com \
--cc=sudeep.holla@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox