From: sashiko-bot@kernel.org
To: "Tomohiro Misono" <misono.tomohiro@fujitsu.com>
Cc: linux-perf-users@vger.kernel.org, kvmarm@lists.linux.dev,
"Oliver Upton" <oupton@kernel.org>,
"Marc Zyngier" <maz@kernel.org>
Subject: Re: [PATCH v3 2/5] arm64: tlb: Add tlbi workaround for FUJITSU-MONAKA Erratum E#030001
Date: Thu, 19 Nov 2026 09:30:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-222837@kernel.org> (raw)
In-Reply-To: <20261119-monaka-fix-for-upstream-v3-2-057df4d2ca3c@fujitsu.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] KVM: arm64: pvm_calc_id_reg() exposes FEAT_TLBIRANGE on
FUJITSU-MONAKA
- [Low] KVM: arm64: __kvm_read_sanitised_id_reg() elevates
ID_AA64ISAR0_EL1.TLB to OS
--
commit 913abeb45fc613951715127a954e31a80a0e00cf
Author: Tomohiro Misono <misono.tomohiro@fujitsu.com>
arm64: tlb: Add tlbi workaround for FUJITSU-MONAKA Erratum E#030001
This commit adds a workaround for FUJITSU-MONAKA Erratum E#030001 by
disabling ARM64_HAS_TLB_RANGE on the host and downgrading
ID_AA64ISAR0_EL1.TLB to OS for KVM guests.
> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
> index c7d91138a6d49..2e8965b7702e1 100644
> --- a/arch/arm64/kvm/sys_regs.c
> +++ b/arch/arm64/kvm/sys_regs.c
> @@ -1949,6 +1949,14 @@ static u64 __kvm_read_sanitised_id_reg(const struct kvm_vcpu *vcpu,
> case SYS_ID_AA64PFR2_EL1:
> val = sanitise_id_aa64pfr2_el1(vcpu, val);
> break;
> + case SYS_ID_AA64ISAR0_EL1:
> + if (cpus_have_final_cap(ARM64_WORKAROUND_FUJITSU_030001)) {
> + /* disable TLBI range operatoins on guest */
> + val &= ~ID_AA64ISAR0_EL1_TLB_MASK;
> + val |= SYS_FIELD_PREP(ID_AA64ISAR0_EL1, TLB,
> + ID_AA64ISAR0_EL1_TLB_OS);
> + }
> + break;
> case SYS_ID_AA64ISAR1_EL1:
> if (!vcpu_has_ptrauth(vcpu))
> val &= ~(ID_AA64ISAR1_EL1_APA |
[Severity: Medium]
Does this leave FEAT_TLBIRANGE exposed to protected VMs under pKVM?
has_tlb_range() disables ARM64_HAS_TLB_RANGE on the host without modifying
the sanitised feature register value returned by
read_sanitised_ftr_reg(SYS_ID_AA64ISAR0_EL1). For protected VMs
(kvm_arm.mode=protected), guest ID registers do not go through
__kvm_read_sanitised_id_reg(): kvm_hyp_init_symbols() copies
read_sanitised_ftr_reg(SYS_ID_AA64ISAR0_EL1) into id_aa64isar0_el1_sys_val,
and kvm_init_pvm_id_regs() -> pvm_calc_id_reg() returns
id_aa64isar0_el1_sys_val unchanged for SYS_ID_AA64ISAR0_EL1. A protected
guest on FUJITSU-MONAKA will still observe ID_AA64ISAR0_EL1.TLB == RANGE and
issue the affected RVA[L]E1* and RVAA[L]E1* instructions, leaving stale TLB
entries when invalidating an affected 512MB mapping.
[Severity: Low]
Can overwriting ID_AA64ISAR0_EL1.TLB with ID_AA64ISAR0_EL1_TLB_OS elevate
the field from NI (0) to OS (1)?
If an L1 KVM host on FUJITSU-MONAKA had ID_AA64ISAR0_EL1.TLB downgraded to
NI by its L0 VMM, setting ID_AA64ISAR0_EL1_TLB_OS unconditionally advertises
FEAT_TLBIOS to L2 guests when the host does not have it, causing L0 to
inject an UNDEFINED exception on outer-shareable TLBI instructions. Using
ID_REG_LIMIT_FIELD_ENUM(val, ID_AA64ISAR0_EL1, TLB, OS) would clamp the
field with min() instead of elevating it.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119-monaka-fix-for-upstream-v3-0-057df4d2ca3c@fujitsu.com?part=2
next prev parent reply other threads:[~2026-11-19 9:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 9:04 [PATCH v3 0/5] arm64: Add workarounds for FUJITSU-MONAKA CPU Tomohiro Misono
2026-11-19 9:04 ` [PATCH v3 1/5] arm64: cputype: Add FUJITSU MONAKA definition Tomohiro Misono
2026-11-19 9:09 ` sashiko-bot
2026-11-19 9:04 ` [PATCH v3 2/5] arm64: tlb: Add tlbi workaround for FUJITSU-MONAKA Erratum E#030001 Tomohiro Misono
2026-11-19 9:30 ` sashiko-bot [this message]
2026-11-19 9:04 ` [PATCH v3 3/5] perf: arm_pmu: Add workaround for FUJITSU-MONAKA Erratum E#030002 Tomohiro Misono
2026-11-19 9:16 ` sashiko-bot
2026-11-19 9:04 ` [PATCH v3 4/5] irqchip/gicv3: Add workaround for FUJITSU-MONAKA Erratum E#030003 Tomohiro Misono
2026-11-19 9:21 ` sashiko-bot
2026-11-19 9:04 ` [PATCH v3 5/5] arm64: Add workaround to replace WFE with NOP for FUJITSU-MONAKA Erratum E#030004 Tomohiro Misono
2026-11-19 9:19 ` sashiko-bot
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=sashiko-outbox-222837@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-perf-users@vger.kernel.org \
--cc=maz@kernel.org \
--cc=misono.tomohiro@fujitsu.com \
--cc=oupton@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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