From: Sebastian Ott <sebott@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
Eric Auger <eric.auger@redhat.com>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
Sebastian Ott <sebott@redhat.com>
Subject: [PATCH 2/2] target/arm/cpu64: Define cpreg migration tolerance for PMMIR_EL1
Date: Fri, 30 Oct 2026 15:34:32 +0100 [thread overview]
Message-ID: <20261030143435.57230-3-sebott@redhat.com> (raw)
In-Reply-To: <20261030143435.57230-1-sebott@redhat.com>
PMMIR_EL1 is exposed from Linux v7.3 onwards. Backward migration
to an older kernel would fail without cpreg migration tolerance
definition for this register.
Since qemu does not set KVM_ARM_VCPU_PMU_V3_STRICT the guest will
RAZ this register for both the old and new kernel.
Signed-off-by: Sebastian Ott <sebott@redhat.com>
---
target/arm/cpu64.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 96aeb6c7a0..1547ad1cd3 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -787,6 +787,14 @@ static void kvm_arm_set_cpreg_mig_tolerances(ARMCPU *cpu)
arm_register_cpreg_mig_tolerance(cpu, ARM64_SYS_REG(3, 0, 10, 2, 3),
0, 0, ToleranceNotOnBothEnds);
+ /*
+ * PMMIR_EL1 was unconditionally exposed for linux 7.3 with commit
+ * 453f6ff04b8d ("KVM: arm64: Expose PMMIR_EL1.SLOTS under strict
+ * PMUv3 UAPI"). Tolerate backward migration to an older kernel.
+ */
+ arm_register_cpreg_mig_tolerance(cpu, ARM64_SYS_REG(3, 0, 9, 14, 6),
+ 0, 0, ToleranceNotOnBothEnds);
+
/*
* KVM_REG_ARM_VENDOR_HYP_BMAP_2 pseudo FW register is exposed
* from v6.15 onwards. Backward migration from a >= v6.15 to an older
--
2.56.0
next prev parent reply other threads:[~2026-10-30 14:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 14:34 [PATCH 0/2] target/arm/cpu64: migration tolerance for PMMIR_EL1 Sebastian Ott
2026-10-30 14:34 ` [PATCH 1/2] target/arm/cpu64: fix typos in kvm_arm_set_cpreg_mig_tolerances() Sebastian Ott
2026-10-30 14:42 ` Peter Maydell
2026-10-30 14:34 ` Sebastian Ott [this message]
2026-10-30 16:15 ` [PATCH 0/2] target/arm/cpu64: migration tolerance for PMMIR_EL1 Eric Auger
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=20261030143435.57230-3-sebott@redhat.com \
--to=sebott@redhat.com \
--cc=eric.auger@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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.