[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/19] tests/tcg/aarch64: add system test for FEAT_XS
From: |
Peter Maydell |
Subject: |
[PULL 17/19] tests/tcg/aarch64: add system test for FEAT_XS |
Date: |
Tue, 17 Dec 2024 17:19:35 +0000 |
From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Add system test to make sure FEAT_XS is enabled for max cpu emulation
and that QEMU doesn't crash when encountering an NXS instruction
variant.
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20241211144440.2700268-7-peter.maydell@linaro.org
[PMM: In ISAR field test, mask with 0xf, not 0xff; use < rather
than an equality test to follow the standard ID register field
check guidelines]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
tests/tcg/aarch64/system/feat-xs.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 tests/tcg/aarch64/system/feat-xs.c
diff --git a/tests/tcg/aarch64/system/feat-xs.c
b/tests/tcg/aarch64/system/feat-xs.c
new file mode 100644
index 00000000000..f310fc837e0
--- /dev/null
+++ b/tests/tcg/aarch64/system/feat-xs.c
@@ -0,0 +1,27 @@
+/*
+ * FEAT_XS Test
+ *
+ * Copyright (c) 2024 Linaro Ltd
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include <minilib.h>
+#include <stdint.h>
+
+int main(void)
+{
+ uint64_t isar1;
+
+ asm volatile ("mrs %0, id_aa64isar1_el1" : "=r"(isar1));
+ if (((isar1 >> 56) & 0xf) < 1) {
+ ml_printf("FEAT_XS not supported by CPU");
+ return 1;
+ }
+ /* VMALLE1NXS */
+ asm volatile (".inst 0xd508971f");
+ /* VMALLE1OSNXS */
+ asm volatile (".inst 0xd508911f");
+
+ return 0;
+}
--
2.34.1
- [PULL 10/19] target/arm: Use float_status in helper_fcvtx_f64_to_f32, (continued)
- [PULL 10/19] target/arm: Use float_status in helper_fcvtx_f64_to_f32, Peter Maydell, 2024/12/17
- [PULL 08/19] target/arm: Convert vec_helper.c to use env alias, Peter Maydell, 2024/12/17
- [PULL 11/19] target/arm: Use float_status in helper_vfp_fcvt{ds,sd}, Peter Maydell, 2024/12/17
- [PULL 15/19] target/arm: Add decodetree entry for DSB nXS variant, Peter Maydell, 2024/12/17
- [PULL 18/19] hw/intc/arm_gicv3_its: Zero initialize local DTEntry etc structs, Peter Maydell, 2024/12/17
- [PULL 13/19] target/arm: Add ARM_CP_ADD_TLBI_NXS type flag for NXS insns, Peter Maydell, 2024/12/17
- [PULL 19/19] tests/functional: update sbsa-ref firmware used in test, Peter Maydell, 2024/12/17
- [PULL 14/19] target/arm: Add ARM_CP_ADD_TLBI_NXS type flag to TLBI insns, Peter Maydell, 2024/12/17
- [PULL 16/19] target/arm: Enable FEAT_XS for the max cpu, Peter Maydell, 2024/12/17
- [PULL 12/19] target/arm: Implement fine-grained-trap handling for FEAT_XS, Peter Maydell, 2024/12/17
- [PULL 17/19] tests/tcg/aarch64: add system test for FEAT_XS,
Peter Maydell <=
- Re: [PULL 00/19] target-arm queue, Stefan Hajnoczi, 2024/12/19