Commit 74cc1f3f9f for qemu.org

commit 74cc1f3f9f612c58203d435ed18f31e76eeb6337
Author: Brian Cain <brian.cain@oss.qualcomm.com>
Date:   Tue Sep 8 21:01:37 2026 -0700

    tests/functional: cover v81 system registers

    Reviewed-by: Marco Liebel <marco.liebel@oss.qualcomm.com>
    Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>

diff --git a/tests/functional/hexagon/test_arch_tests.py b/tests/functional/hexagon/test_arch_tests.py
index 5d7ce48743..40f76e25ae 100755
--- a/tests/functional/hexagon/test_arch_tests.py
+++ b/tests/functional/hexagon/test_arch_tests.py
@@ -24,6 +24,11 @@ class ArchTestsUart(QemuSystemTest):
         "download/v0.2.14/arch_tests_uart.tar.gz",
         "ce93cb90b9d757c1946dfe8fe6abcec8292b08a66546ac51b2dd48650b05fa91",
     )
+    ASSET_SEMIHOSTING_TARBALL = Asset(
+        "https://github.com/qualcomm/qemu-hexagon-testing/releases/"
+        "download/v0.2.9/arch_tests_semihosting.tar.gz",
+        "f0ce731dc8dc2b861792b8bd60808cb714fd1922c0dc793af65090c0ba525bb0",
+    )

     def run_uart_test(self, test_name: str,
                       machine: str = "virt") -> None:
@@ -40,6 +45,18 @@ def run_uart_test(self, test_name: str,
         self.vm.launch()
         wait_for_console_pattern(self, "PASS")

+    def run_semihosting_test(self, test_name: str,
+                             machine: str = "V81QA_1") -> None:
+        self.set_machine(machine)
+        self.archive_extract(self.ASSET_SEMIHOSTING_TARBALL)
+        target_bin = self.scratch_file('arch_tests_semihosting_package',
+                                       'bin', test_name)
+        self.vm.set_console(semihosting=True)
+        self.set_vm_arg("-display", "none")
+        self.set_vm_arg("-kernel", target_bin)
+        self.vm.launch()
+        wait_for_console_pattern(self, "PASS")
+
     def test_exceptions(self) -> None:
         """Tests exception delivery for trap instructions, privilege
         violations, and verifies SSR cause codes and ELR values.
@@ -78,6 +95,10 @@ def test_sys_regs(self) -> None:
         """Tests system registers."""
         self.run_uart_test("test_sys_regs")

+    def test_sys_regs_v81(self) -> None:
+        """Tests V81-specific system register masks."""
+        self.run_semihosting_test("test_sys_regs")
+
     def test_threads(self) -> None:
         """Tests hardware thread management: start/stop, MODECTL state,
         per-thread HTID, shared memory, wait/resume, STID priority, and