All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] target/arm/cpu64: migration tolerance for PMMIR_EL1
@ 2026-10-30 14:34 Sebastian Ott
  2026-10-30 14:34 ` [PATCH 1/2] target/arm/cpu64: fix typos in kvm_arm_set_cpreg_mig_tolerances() Sebastian Ott
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sebastian Ott @ 2026-10-30 14:34 UTC (permalink / raw)
  To: Peter Maydell, Eric Auger; +Cc: qemu-arm, qemu-devel, Sebastian Ott

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. Fix a couple of typos while at it.

Sebastian Ott (2):
  target/arm/cpu64: fix typos in kvm_arm_set_cpreg_mig_tolerances()
  target/arm/cpu64: Define cpreg migration tolerance for PMMIR_EL1

 target/arm/cpu64.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

-- 
2.56.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] target/arm/cpu64: fix typos in kvm_arm_set_cpreg_mig_tolerances()
  2026-10-30 14:34 [PATCH 0/2] target/arm/cpu64: migration tolerance for PMMIR_EL1 Sebastian Ott
@ 2026-10-30 14:34 ` Sebastian Ott
  2026-10-30 14:42   ` Peter Maydell
  2026-10-30 14:34 ` [PATCH 2/2] target/arm/cpu64: Define cpreg migration tolerance for PMMIR_EL1 Sebastian Ott
  2026-10-30 16:15 ` [PATCH 0/2] target/arm/cpu64: " Eric Auger
  2 siblings, 1 reply; 5+ messages in thread
From: Sebastian Ott @ 2026-10-30 14:34 UTC (permalink / raw)
  To: Peter Maydell, Eric Auger; +Cc: qemu-arm, qemu-devel, Sebastian Ott

Fix a couple of typos and a #xa0 space.

Signed-off-by: Sebastian Ott <sebott@redhat.com>
---
 target/arm/cpu64.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index dcd0d698b3..96aeb6c7a0 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -771,15 +771,15 @@ static void kvm_arm_set_cpreg_mig_tolerances(ARMCPU *cpu)
      */
 
     /*
-     * TCR_EL1 was erroneously unconditionnally exposed before linux v6.13.
+     * TCR_EL1 was erroneously unconditionally exposed before linux v6.13.
      * See commit 0fcb4eea5345 ("KVM: arm64: Hide TCR2_EL1 from userspace
      * when disabled for guests")
      */
     arm_register_cpreg_mig_tolerance(cpu, ARM64_SYS_REG(3, 0, 2, 0, 3),
                                      0, 0, ToleranceNotOnBothEnds);
     /*
-     * PIRE0_EL1 and PIR_EL1 were erroneously unconditionnally exposed
-     * before linux v6.13. See commit a68cddbe47ef ("KVM: arm64: Hide
+     * PIRE0_EL1 and PIR_EL1 were erroneously unconditionally exposed
+     * before linux v6.13. See commit a68cddbe47ef ("KVM: arm64: Hide
      * S1PIE registers from userspace when disabled for guests")
      */
     arm_register_cpreg_mig_tolerance(cpu, ARM64_SYS_REG(3, 0, 10, 2, 2),
-- 
2.56.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] target/arm/cpu64: Define cpreg migration tolerance for PMMIR_EL1
  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:34 ` Sebastian Ott
  2026-10-30 16:15 ` [PATCH 0/2] target/arm/cpu64: " Eric Auger
  2 siblings, 0 replies; 5+ messages in thread
From: Sebastian Ott @ 2026-10-30 14:34 UTC (permalink / raw)
  To: Peter Maydell, Eric Auger; +Cc: qemu-arm, qemu-devel, Sebastian Ott

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] target/arm/cpu64: fix typos in kvm_arm_set_cpreg_mig_tolerances()
  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
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2026-10-30 14:42 UTC (permalink / raw)
  To: Sebastian Ott; +Cc: Eric Auger, qemu-arm, qemu-devel

On Fri, 30 Oct 2026 at 14:34, Sebastian Ott <sebott@redhat.com> wrote:
>
> Fix a couple of typos and a #xa0 space.
>
> Signed-off-by: Sebastian Ott <sebott@redhat.com>
> ---
>  target/arm/cpu64.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] target/arm/cpu64: migration tolerance for PMMIR_EL1
  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:34 ` [PATCH 2/2] target/arm/cpu64: Define cpreg migration tolerance for PMMIR_EL1 Sebastian Ott
@ 2026-10-30 16:15 ` Eric Auger
  2 siblings, 0 replies; 5+ messages in thread
From: Eric Auger @ 2026-10-30 16:15 UTC (permalink / raw)
  To: Sebastian Ott, Peter Maydell, Eric Auger; +Cc: qemu-arm, qemu-devel

Hi,

On 10/30/26 3:34 PM, Sebastian Ott wrote:
> 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. Fix a couple of typos while at it.
> 
> Sebastian Ott (2):
>   target/arm/cpu64: fix typos in kvm_arm_set_cpreg_mig_tolerances()
>   target/arm/cpu64: Define cpreg migration tolerance for PMMIR_EL1
> 
>  target/arm/cpu64.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
For the series:
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Thanks

Eric



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-30 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/2] target/arm/cpu64: Define cpreg migration tolerance for PMMIR_EL1 Sebastian Ott
2026-10-30 16:15 ` [PATCH 0/2] target/arm/cpu64: " Eric Auger

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.