qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] FEAT_GCS firmware update for test_rme_*
@ 2025-10-02 18:59 Richard Henderson
  2025-10-02 18:59 ` [PATCH 1/2] Update tf-rmm to support FEAT_S1PIE Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Richard Henderson @ 2025-10-02 18:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: pierrick.bouvier

Hi Pierrick,

Here's what I need to run our RME test with FEAT_GCS enabled,
based on your

  https://github.com/pbo-linaro/qemu-linux-stack rme_release

If your can run what's needed to update the functional artifacts,
I can re-spin my FEAT_GCS series with that included.

Thanks,


r~


Richard Henderson (2):
  Update tf-rmm to support FEAT_S1PIE
  Enable firmware support for PIE and GCS

 build_arm_trusted_firmware.sh                 |  1 +
 build_tf_rmm.sh                               | 10 ++---
 ...arm-trusted-firmware-support-PIE-GCS.patch | 30 +++++++++++++
 patches/rmm-support-lower-pmu-versions.patch  | 44 -------------------
 4 files changed, 36 insertions(+), 49 deletions(-)
 create mode 100644 patches/arm-trusted-firmware-support-PIE-GCS.patch
 delete mode 100644 patches/rmm-support-lower-pmu-versions.patch

-- 
2.43.0



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

* [PATCH 1/2] Update tf-rmm to support FEAT_S1PIE
  2025-10-02 18:59 [PATCH 0/2] FEAT_GCS firmware update for test_rme_* Richard Henderson
@ 2025-10-02 18:59 ` Richard Henderson
  2025-10-02 20:59   ` Pierrick Bouvier
  2025-10-02 18:59 ` [PATCH 2/2] Enable firmware support for PIE and GCS Richard Henderson
  2025-10-02 22:01 ` [PATCH 0/2] FEAT_GCS firmware update for test_rme_* Pierrick Bouvier
  2 siblings, 1 reply; 6+ messages in thread
From: Richard Henderson @ 2025-10-02 18:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: pierrick.bouvier

There appears to be no tagged release with FEAT_S1PIE, but
it is upstream.  As is the PMU patch we were carrying.
---
 build_tf_rmm.sh                              | 10 ++---
 patches/rmm-support-lower-pmu-versions.patch | 44 --------------------
 2 files changed, 5 insertions(+), 49 deletions(-)
 delete mode 100644 patches/rmm-support-lower-pmu-versions.patch

diff --git a/build_tf_rmm.sh b/build_tf_rmm.sh
index bd1c612..009966d 100755
--- a/build_tf_rmm.sh
+++ b/build_tf_rmm.sh
@@ -11,14 +11,14 @@ fi
 clone()
 {
     rm -f tf-rmm
-    url=https://github.com/TF-RMM/tf-rmm
-    version=tf-rmm-v0.7.0
-    src=$version-support-lower-pmu-versions-release
+    url=https://git.trustedfirmware.org/TF-RMM/tf-rmm
+    version=481cb7f4e64f5c48c03a72b75b736f183f3011d5
+    src=tf-rmm-main-s1pie
     if [ ! -d $src ]; then
-        git clone $url --single-branch --branch $version --depth 1 $src
+        git clone $url $src
         pushd $src
+        git checkout $version
         git submodule update --init --depth 1
-        git am ../patches/rmm-support-lower-pmu-versions.patch
         popd
     fi
     ln -s $src tf-rmm
diff --git a/patches/rmm-support-lower-pmu-versions.patch b/patches/rmm-support-lower-pmu-versions.patch
deleted file mode 100644
index 0993edc..0000000
--- a/patches/rmm-support-lower-pmu-versions.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 2235e01874d2b51e32650b2326c94ae2285c554a Mon Sep 17 00:00:00 2001
-From: Jean-Philippe Brucker <jean-philippe@linaro.org>
-Date: Fri, 14 Jul 2023 10:54:43 +0100
-Subject: [PATCH] TMP: fix(qemu): Support lower PMU versions
-
-Although RME mandates v3p7, QEMU has v3p5 at the moment. Until we
-implement the p7 extension, which provides counter isolation for EL3,
-allow p5.
-
-Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
-Change-Id: Id1dd30486f203187e3f882c7495116b743d3883a
----
- lib/arch/include/arch.h | 1 +
- runtime/rmi/feature.c   | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/lib/arch/include/arch.h b/lib/arch/include/arch.h
-index cecdf2a5..fc64365e 100644
---- a/lib/arch/include/arch.h
-+++ b/lib/arch/include/arch.h
-@@ -493,6 +493,7 @@
- #define ID_AA64DFR0_EL1_PMUVer_WIDTH		UL(4)
- 
- /* Performance Monitors Extension version */
-+#define ID_AA64DFR0_EL1_PMUv3p5			UL(5)
- #define ID_AA64DFR0_EL1_PMUv3p7			UL(7)
- #define ID_AA64DFR0_EL1_PMUv3p8			UL(8)
- #define ID_AA64DFR0_EL1_PMUv3p9			UL(9)
-diff --git a/runtime/rmi/feature.c b/runtime/rmi/feature.c
-index 5468f137..52487c0d 100644
---- a/runtime/rmi/feature.c
-+++ b/runtime/rmi/feature.c
-@@ -35,7 +35,7 @@ unsigned long get_feature_register_0(void)
- 						RMI_FEATURE_TRUE);
- 
- 	/* RMM supports PMUv3p7+ */
--	assert(read_pmu_version() >= ID_AA64DFR0_EL1_PMUv3p7);
-+	assert(read_pmu_version() >= ID_AA64DFR0_EL1_PMUv3p5);
- 
- 	/* Set support for PMUv3 */
- 	feat_reg0 |= INPLACE(RMI_FEATURE_REGISTER_0_PMU_EN,
--- 
-GitLab
-
-- 
2.43.0



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

* [PATCH 2/2] Enable firmware support for PIE and GCS
  2025-10-02 18:59 [PATCH 0/2] FEAT_GCS firmware update for test_rme_* Richard Henderson
  2025-10-02 18:59 ` [PATCH 1/2] Update tf-rmm to support FEAT_S1PIE Richard Henderson
@ 2025-10-02 18:59 ` Richard Henderson
  2025-10-02 20:59   ` Pierrick Bouvier
  2025-10-02 22:01 ` [PATCH 0/2] FEAT_GCS firmware update for test_rme_* Pierrick Bouvier
  2 siblings, 1 reply; 6+ messages in thread
From: Richard Henderson @ 2025-10-02 18:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: pierrick.bouvier

---
 build_arm_trusted_firmware.sh                 |  1 +
 ...arm-trusted-firmware-support-PIE-GCS.patch | 30 +++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 patches/arm-trusted-firmware-support-PIE-GCS.patch

diff --git a/build_arm_trusted_firmware.sh b/build_arm_trusted_firmware.sh
index d223142..0b148ef 100755
--- a/build_arm_trusted_firmware.sh
+++ b/build_arm_trusted_firmware.sh
@@ -18,6 +18,7 @@ clone()
         git clone $url --single-branch --branch $version --depth 1 $src
         pushd $src
         git am ../patches/arm-trusted-firmware-support-FEAT_TCR2-and-FEAT-SCTLR2.patch
+        git am ../patches/arm-trusted-firmware-support-PIE-GCS.patch
         popd
     fi
     ln -s $src arm-trusted-firmware
diff --git a/patches/arm-trusted-firmware-support-PIE-GCS.patch b/patches/arm-trusted-firmware-support-PIE-GCS.patch
new file mode 100644
index 0000000..132e939
--- /dev/null
+++ b/patches/arm-trusted-firmware-support-PIE-GCS.patch
@@ -0,0 +1,30 @@
+From 0925eadf8922bbe811ec41fb983347928f3bc63b Mon Sep 17 00:00:00 2001
+From: Richard Henderson <richard.henderson@linaro.org>
+Date: Thu, 2 Oct 2025 11:43:11 -0700
+Subject: [PATCH] plat/qemu/common/: add support for FEAT_{S1PIE,S2PIE,GCS}
+
+---
+ plat/qemu/common/common.mk | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/plat/qemu/common/common.mk b/plat/qemu/common/common.mk
+index 6bc1084..2c344b6 100644
+--- a/plat/qemu/common/common.mk
++++ b/plat/qemu/common/common.mk
+@@ -126,6 +126,13 @@ ENABLE_FEAT_HCX		:=	2
+ ENABLE_FEAT_TCR2	:=	2
+ ENABLE_FEAT_SCTLR2	:=	2
+ 
++# 8.9
++ENABLE_FEAT_S1PIE	:=	2
++ENABLE_FEAT_S2PIE	:=	2
++
++# 9.4
++ENABLE_FEAT_GCS		=	2
++
+ # SPM_MM is not compatible with ENABLE_SVE_FOR_NS (build breaks)
+ ifeq (${SPM_MM},1)
+ 	ENABLE_SVE_FOR_NS	:= 0
+-- 
+2.43.0
+
-- 
2.43.0



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

* Re: [PATCH 1/2] Update tf-rmm to support FEAT_S1PIE
  2025-10-02 18:59 ` [PATCH 1/2] Update tf-rmm to support FEAT_S1PIE Richard Henderson
@ 2025-10-02 20:59   ` Pierrick Bouvier
  0 siblings, 0 replies; 6+ messages in thread
From: Pierrick Bouvier @ 2025-10-02 20:59 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel

On 10/2/25 11:59 AM, Richard Henderson wrote:
> There appears to be no tagged release with FEAT_S1PIE, but
> it is upstream.  As is the PMU patch we were carrying.

I didn't find the PMU patch upstream, so keeping it locally.


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

* Re: [PATCH 2/2] Enable firmware support for PIE and GCS
  2025-10-02 18:59 ` [PATCH 2/2] Enable firmware support for PIE and GCS Richard Henderson
@ 2025-10-02 20:59   ` Pierrick Bouvier
  0 siblings, 0 replies; 6+ messages in thread
From: Pierrick Bouvier @ 2025-10-02 20:59 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel

On 10/2/25 11:59 AM, Richard Henderson wrote:
> ---
>   build_arm_trusted_firmware.sh                 |  1 +
>   ...arm-trusted-firmware-support-PIE-GCS.patch | 30 +++++++++++++++++++
>   2 files changed, 31 insertions(+)
>   create mode 100644 patches/arm-trusted-firmware-support-PIE-GCS.patch
> 
> diff --git a/build_arm_trusted_firmware.sh b/build_arm_trusted_firmware.sh
> index d223142..0b148ef 100755
> --- a/build_arm_trusted_firmware.sh
> +++ b/build_arm_trusted_firmware.sh
> @@ -18,6 +18,7 @@ clone()
>           git clone $url --single-branch --branch $version --depth 1 $src
>           pushd $src
>           git am ../patches/arm-trusted-firmware-support-FEAT_TCR2-and-FEAT-SCTLR2.patch
> +        git am ../patches/arm-trusted-firmware-support-PIE-GCS.patch
>           popd
>       fi
>       ln -s $src arm-trusted-firmware
> diff --git a/patches/arm-trusted-firmware-support-PIE-GCS.patch b/patches/arm-trusted-firmware-support-PIE-GCS.patch
> new file mode 100644
> index 0000000..132e939
> --- /dev/null
> +++ b/patches/arm-trusted-firmware-support-PIE-GCS.patch
> @@ -0,0 +1,30 @@
> +From 0925eadf8922bbe811ec41fb983347928f3bc63b Mon Sep 17 00:00:00 2001
> +From: Richard Henderson <richard.henderson@linaro.org>
> +Date: Thu, 2 Oct 2025 11:43:11 -0700
> +Subject: [PATCH] plat/qemu/common/: add support for FEAT_{S1PIE,S2PIE,GCS}
> +
> +---
> + plat/qemu/common/common.mk | 7 +++++++
> + 1 file changed, 7 insertions(+)
> +
> +diff --git a/plat/qemu/common/common.mk b/plat/qemu/common/common.mk
> +index 6bc1084..2c344b6 100644
> +--- a/plat/qemu/common/common.mk
> ++++ b/plat/qemu/common/common.mk
> +@@ -126,6 +126,13 @@ ENABLE_FEAT_HCX		:=	2
> + ENABLE_FEAT_TCR2	:=	2
> + ENABLE_FEAT_SCTLR2	:=	2
> +
> ++# 8.9
> ++ENABLE_FEAT_S1PIE	:=	2
> ++ENABLE_FEAT_S2PIE	:=	2
> ++
> ++# 9.4
> ++ENABLE_FEAT_GCS		=	2
> ++
> + # SPM_MM is not compatible with ENABLE_SVE_FOR_NS (build breaks)
> + ifeq (${SPM_MM},1)
> + 	ENABLE_SVE_FOR_NS	:= 0
> +--
> +2.43.0
> +

Good for me.


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

* Re: [PATCH 0/2] FEAT_GCS firmware update for test_rme_*
  2025-10-02 18:59 [PATCH 0/2] FEAT_GCS firmware update for test_rme_* Richard Henderson
  2025-10-02 18:59 ` [PATCH 1/2] Update tf-rmm to support FEAT_S1PIE Richard Henderson
  2025-10-02 18:59 ` [PATCH 2/2] Enable firmware support for PIE and GCS Richard Henderson
@ 2025-10-02 22:01 ` Pierrick Bouvier
  2 siblings, 0 replies; 6+ messages in thread
From: Pierrick Bouvier @ 2025-10-02 22:01 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

On 10/2/25 11:59 AM, Richard Henderson wrote:
> Hi Pierrick,
> 
> Here's what I need to run our RME test with FEAT_GCS enabled,
> based on your
> 
>    https://github.com/pbo-linaro/qemu-linux-stack rme_release
> 
> If your can run what's needed to update the functional artifacts,
> I can re-spin my FEAT_GCS series with that included.
> 
> Thanks,
>

Thanks for the patches Richard.

You can update concerned QEMU tests with attached patch using new artifacts.
Let me know if everything works on your side.

Regards,
Pierrick


[-- Attachment #2: 0001-tests-functional-update-tests-using-TF-A-TF-RMM-to-s.patch --]
[-- Type: text/x-patch, Size: 3271 bytes --]

From b7cceb7815be5bb3ff6363294f2bc87c2681d718 Mon Sep 17 00:00:00 2001
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Date: Thu, 2 Oct 2025 14:59:19 -0700
Subject: [PATCH] tests/functional: update tests using TF-A/TF-RMM to support
 FEAT_GCS

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 tests/functional/aarch64/test_device_passthrough.py | 4 ++--
 tests/functional/aarch64/test_rme_sbsaref.py        | 4 ++--
 tests/functional/aarch64/test_rme_virt.py           | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/functional/aarch64/test_device_passthrough.py b/tests/functional/aarch64/test_device_passthrough.py
index 17437784bbe..05a3f52d5e2 100755
--- a/tests/functional/aarch64/test_device_passthrough.py
+++ b/tests/functional/aarch64/test_device_passthrough.py
@@ -85,8 +85,8 @@ class Aarch64DevicePassthrough(QemuSystemTest):
     # https://docs.kernel.org/driver-api/vfio.html#vfio-device-cde
     ASSET_DEVICE_PASSTHROUGH_STACK = Asset(
         ('https://github.com/pbo-linaro/qemu-linux-stack/'
-         'releases/download/build/device_passthrough-c3fb84a.tar.xz'),
-         '15ac2b02bed0c0ea8e3e007de0bcfdaf6fd51c1ba98213f841dc7d01d6f72f04')
+         'releases/download/build/device_passthrough-a9612a2.tar.xz'),
+         'f7d2f70912e7231986e6e293e1a2c4786dd02bec113a7acb6bfc619e96155455')
 
     # This tests the device passthrough implementation, by booting a VM
     # supporting it with two nvme disks attached, and launching a nested VM
diff --git a/tests/functional/aarch64/test_rme_sbsaref.py b/tests/functional/aarch64/test_rme_sbsaref.py
index ca892e0a8c9..6f92858397a 100755
--- a/tests/functional/aarch64/test_rme_sbsaref.py
+++ b/tests/functional/aarch64/test_rme_sbsaref.py
@@ -25,8 +25,8 @@ class Aarch64RMESbsaRefMachine(QemuSystemTest):
     # ./build.sh && ./archive_artifacts.sh out.tar.xz
     ASSET_RME_STACK_SBSA = Asset(
         ('https://github.com/pbo-linaro/qemu-linux-stack/'
-         'releases/download/build/rme_sbsa_release-a7f02cf.tar.xz'),
-         '27d8400b11befb828d6db0cab97e7ae102d0992c928d3dfbf38b24b6cf6c324c')
+         'releases/download/build/rme_sbsa_release-6a2dfc5.tar.xz'),
+         '5adba482aa069912292a8da746c6b21268224d9d81c97fe7c0bed690579ebdcb')
 
     # This tests the FEAT_RME cpu implementation, by booting a VM supporting it,
     # and launching a nested VM using it.
diff --git a/tests/functional/aarch64/test_rme_virt.py b/tests/functional/aarch64/test_rme_virt.py
index bb603aaa26c..5e23773f93d 100755
--- a/tests/functional/aarch64/test_rme_virt.py
+++ b/tests/functional/aarch64/test_rme_virt.py
@@ -23,8 +23,8 @@ class Aarch64RMEVirtMachine(QemuSystemTest):
     # ./build.sh && ./archive_artifacts.sh out.tar.xz
     ASSET_RME_STACK_VIRT = Asset(
         ('https://github.com/pbo-linaro/qemu-linux-stack/'
-         'releases/download/build/rme_release-86101e5.tar.xz'),
-         'e42fef8439badb52a071ac446fc33cff4cb7d61314c7a28fdbe61a11e1faad3a')
+         'releases/download/build/rme_release-56bc99e.tar.xz'),
+         '0e3dc6b8a4b828dbae09c951a40dcb710eded084b32432b50c69cf4173ffa4be')
 
     # This tests the FEAT_RME cpu implementation, by booting a VM supporting it,
     # and launching a nested VM using it.
-- 
2.47.3


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

end of thread, other threads:[~2025-10-02 22:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-02 18:59 [PATCH 0/2] FEAT_GCS firmware update for test_rme_* Richard Henderson
2025-10-02 18:59 ` [PATCH 1/2] Update tf-rmm to support FEAT_S1PIE Richard Henderson
2025-10-02 20:59   ` Pierrick Bouvier
2025-10-02 18:59 ` [PATCH 2/2] Enable firmware support for PIE and GCS Richard Henderson
2025-10-02 20:59   ` Pierrick Bouvier
2025-10-02 22:01 ` [PATCH 0/2] FEAT_GCS firmware update for test_rme_* Pierrick Bouvier

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).