summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2025-04-04 10:23:17 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2025-04-04 10:23:17 -0400
commit53f3a13ac1069975ad47cf8bd05cc96b4ac09962 (patch)
treee5540b7ec7faab701fc30bfdf4638e9d6295e3be
parent0f1da6b4e86e760f4893ac8bc97d5648fc21079d (diff)
parent49551752e860f5e403cdacac11ee1d218141fd3d (diff)
downloadfocaccia-qemu-53f3a13ac1069975ad47cf8bd05cc96b4ac09962.tar.gz
focaccia-qemu-53f3a13ac1069975ad47cf8bd05cc96b4ac09962.zip
Merge tag 'pull-tcg-20250403' of https://gitlab.com/rth7680/qemu into staging
tcg: Allocate TEMP_VAL_MEM frame in temp_load()
tests/functional: Skip aarch64_replay test on macOS
hw/arm: Do not build VMapple machine by default
tests/functional/test_aarch64_rme_virt: fix sporadic failure

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmfvMOsdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+wYQf+Kfd4x/v5oZW9QAwH
# +FItVtYIJ2Mfp7BilNmSY9jmHcO46RQ8pkJv/CltlZHFCe7s8+qJKpPhQCfUMhUH
# DW5SIWXZw+bOIxDycm1XssnQDyJODzwLFi1VmWL1gmoEXhgYea0owxFBPAzBOtrj
# 1viHQOhr2iymsukD5KACajtrwYDzc2g6xZwCx1SLsFO1bolVLlcKgBsolItM+/sO
# 5IkCkEHgkZ7bADFig2Qm797H5cTVuqn00JGwU2cfYAMxMqNi0G0bv1C1OMHwShdg
# R8lfnxk8lHv58GtJcPgP50ByRTotW5HXSQN9DujWiJjLXfW9AYqOeuXFPbaLLxaG
# gwkqlA==
# =WbPO
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 03 Apr 2025 21:07:55 EDT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* tag 'pull-tcg-20250403' of https://gitlab.com/rth7680/qemu:
  hw/arm: Do not build VMapple machine by default
  tests/qtest: Skip Aarch64 VMapple machine
  tests/functional: Skip aarch64_replay test on macOS
  tests/functional: Add a decorator for skipping tests on particular OS
  tests/functional/test_aarch64_rme_virt: fix sporadic failure
  tcg: Allocate TEMP_VAL_MEM frame in temp_load()

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--configs/devices/aarch64-softmmu/default.mak1
-rw-r--r--tcg/tcg.c3
-rw-r--r--tests/functional/qemu_test/__init__.py2
-rw-r--r--tests/functional/qemu_test/decorators.py15
-rwxr-xr-xtests/functional/test_aarch64_replay.py4
-rwxr-xr-xtests/functional/test_aarch64_rme_virt.py4
-rw-r--r--tests/qtest/libqtest.c1
7 files changed, 26 insertions, 4 deletions
diff --git a/configs/devices/aarch64-softmmu/default.mak b/configs/devices/aarch64-softmmu/default.mak
index 93f4022ad6..ad8028cfd4 100644
--- a/configs/devices/aarch64-softmmu/default.mak
+++ b/configs/devices/aarch64-softmmu/default.mak
@@ -9,3 +9,4 @@ include ../arm-softmmu/default.mak
 # CONFIG_XLNX_VERSAL=n
 # CONFIG_SBSA_REF=n
 # CONFIG_NPCM8XX=n
+CONFIG_VMAPPLE=n
diff --git a/tcg/tcg.c b/tcg/tcg.c
index e8950df2ad..dfd48b8264 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -4671,6 +4671,9 @@ static void temp_load(TCGContext *s, TCGTemp *ts, TCGRegSet desired_regs,
         ts->mem_coherent = 0;
         break;
     case TEMP_VAL_MEM:
+        if (!ts->mem_allocated) {
+            temp_allocate_frame(s, ts);
+        }
         reg = tcg_reg_alloc(s, desired_regs, allocated_regs,
                             preferred_regs, ts->indirect_base);
         tcg_out_ld(s, ts->type, reg, ts->mem_base->reg, ts->mem_offset);
diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu_test/__init__.py
index 45f7befa37..af41c2c6a2 100644
--- a/tests/functional/qemu_test/__init__.py
+++ b/tests/functional/qemu_test/__init__.py
@@ -15,6 +15,6 @@ from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest
 from .linuxkernel import LinuxKernelTest
 from .decorators import skipIfMissingCommands, skipIfNotMachine, \
     skipFlakyTest, skipUntrustedTest, skipBigDataTest, skipSlowTest, \
-    skipIfMissingImports
+    skipIfMissingImports, skipIfOperatingSystem
 from .archive import archive_extract
 from .uncompress import uncompress
diff --git a/tests/functional/qemu_test/decorators.py b/tests/functional/qemu_test/decorators.py
index 1651eb739a..50d29de533 100644
--- a/tests/functional/qemu_test/decorators.py
+++ b/tests/functional/qemu_test/decorators.py
@@ -5,7 +5,7 @@
 import importlib
 import os
 import platform
-from unittest import skipUnless
+from unittest import skipIf, skipUnless
 
 from .cmd import which
 
@@ -28,6 +28,19 @@ def skipIfMissingCommands(*args):
 
 '''
 Decorator to skip execution of a test if the current
+host operating system does match one of the prohibited
+ones.
+Example
+
+  @skipIfOperatingSystem("Linux", "Darwin")
+'''
+def skipIfOperatingSystem(*args):
+    return skipIf(platform.system() in args,
+                  'running on an OS (%s) that is not able to run this test' %
+                  ", ".join(args))
+
+'''
+Decorator to skip execution of a test if the current
 host machine does not match one of the permitted
 machines.
 Example
diff --git a/tests/functional/test_aarch64_replay.py b/tests/functional/test_aarch64_replay.py
index 04cde433bc..029fef3cbf 100755
--- a/tests/functional/test_aarch64_replay.py
+++ b/tests/functional/test_aarch64_replay.py
@@ -5,7 +5,7 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-from qemu_test import Asset
+from qemu_test import Asset, skipIfOperatingSystem
 from replay_kernel import ReplayKernelBase
 
 
@@ -16,6 +16,8 @@ class Aarch64Replay(ReplayKernelBase):
          'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz'),
         '7e1430b81c26bdd0da025eeb8fbd77b5dc961da4364af26e771bd39f379cbbf7')
 
+    # Failing on Darwin: https://gitlab.com/qemu-project/qemu/-/issues/2907
+    @skipIfOperatingSystem('Darwin')
     def test_aarch64_virt(self):
         self.set_machine('virt')
         self.cpu = 'cortex-a53'
diff --git a/tests/functional/test_aarch64_rme_virt.py b/tests/functional/test_aarch64_rme_virt.py
index f4ad4d33d5..a1abf584f0 100755
--- a/tests/functional/test_aarch64_rme_virt.py
+++ b/tests/functional/test_aarch64_rme_virt.py
@@ -87,7 +87,9 @@ class Aarch64RMEVirtMachine(QemuSystemTest):
         self.vm.add_args('-fsdev', f'local,security_model=none,path={rme_stack},id=shr0')
         self.vm.add_args('-device', 'virtio-net-pci,netdev=net0')
         self.vm.add_args('-netdev', 'user,id=net0')
-        self.vm.add_args('-append', 'root=/dev/vda')
+        # We need to add nokaslr to avoid triggering this sporadic bug:
+        # https://gitlab.com/qemu-project/qemu/-/issues/2823
+        self.vm.add_args('-append', 'root=/dev/vda nokaslr')
 
         self.vm.launch()
         # Wait for host VM boot to complete.
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 2750067861..fad307d125 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -1788,6 +1788,7 @@ void qtest_cb_for_every_machine(void (*cb)(const char *machine),
         if (!strncmp("xenfv", machines[i].name, 5) ||
             g_str_equal("xenpv", machines[i].name) ||
             g_str_equal("xenpvh", machines[i].name) ||
+            g_str_equal("vmapple", machines[i].name) ||
             g_str_equal("nitro-enclave", machines[i].name)) {
             continue;
         }