* [PULL 1/6] tcg: Allocate TEMP_VAL_MEM frame in temp_load()
2025-04-04 1:09 [PULL 0/6] tcg patch queue for 10.0-rc3 Richard Henderson
@ 2025-04-04 1:09 ` Richard Henderson
2025-04-04 1:09 ` [PULL 2/6] tests/functional/test_aarch64_rme_virt: fix sporadic failure Richard Henderson
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2025-04-04 1:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Michael Tokarev, Helge Konetzka
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Be sure to allocate the temp frame if it wasn't.
In the resolved issues, incomplete dead code elimination left a load
at the top of an unreachable loop. We simply need to allocate the
stack slot to avoid crashing.
Fixes: c896fe29d6c ("TCG code generator")
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Reported-by: Helge Konetzka <hk@zapateado.de>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2891
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2899
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250401144332.41615-1-philmd@linaro.org>
---
tcg/tcg.c | 3 +++
1 file changed, 3 insertions(+)
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);
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PULL 2/6] tests/functional/test_aarch64_rme_virt: fix sporadic failure
2025-04-04 1:09 [PULL 0/6] tcg patch queue for 10.0-rc3 Richard Henderson
2025-04-04 1:09 ` [PULL 1/6] tcg: Allocate TEMP_VAL_MEM frame in temp_load() Richard Henderson
@ 2025-04-04 1:09 ` Richard Henderson
2025-04-04 1:09 ` [PULL 3/6] tests/functional: Add a decorator for skipping tests on particular OS Richard Henderson
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2025-04-04 1:09 UTC (permalink / raw)
To: qemu-devel
Cc: Pierrick Bouvier, Alex Bennée, Philippe Mathieu-Daudé,
Michael S . Tsirkin
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
This test was randomly failing on our CI, and on dev machines,
especially with QEMU debug builds.
>From the information collected, it's related to an implementation choice
in edk2 QEMU virt support. The workaround is to disable KASLR, to avoid
accessing protected memory.
Note: this is *not* needed for the similar test_aarch64_rme_sbsaref.
More information is available on the associated GitLab issue.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2823
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250328183816.2687925-1-pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250403203241.46692-2-philmd@linaro.org>
---
tests/functional/test_aarch64_rme_virt.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 @@ def test_aarch64_rme_virt(self):
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.
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PULL 3/6] tests/functional: Add a decorator for skipping tests on particular OS
2025-04-04 1:09 [PULL 0/6] tcg patch queue for 10.0-rc3 Richard Henderson
2025-04-04 1:09 ` [PULL 1/6] tcg: Allocate TEMP_VAL_MEM frame in temp_load() Richard Henderson
2025-04-04 1:09 ` [PULL 2/6] tests/functional/test_aarch64_rme_virt: fix sporadic failure Richard Henderson
@ 2025-04-04 1:09 ` Richard Henderson
2025-04-04 1:09 ` [PULL 4/6] tests/functional: Skip aarch64_replay test on macOS Richard Henderson
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2025-04-04 1:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Michael S . Tsirkin
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Since tests might be failing on some operating systems,
introduce the skipIfOperatingSystem() decorator.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250403203241.46692-3-philmd@linaro.org>
---
tests/functional/qemu_test/__init__.py | 2 +-
tests/functional/qemu_test/decorators.py | 15 ++++++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
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 .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
@@ -26,6 +26,19 @@ def skipIfMissingCommands(*args):
return skipUnless(has_cmds, 'required command(s) "%s" not installed' %
", ".join(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
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PULL 4/6] tests/functional: Skip aarch64_replay test on macOS
2025-04-04 1:09 [PULL 0/6] tcg patch queue for 10.0-rc3 Richard Henderson
` (2 preceding siblings ...)
2025-04-04 1:09 ` [PULL 3/6] tests/functional: Add a decorator for skipping tests on particular OS Richard Henderson
@ 2025-04-04 1:09 ` Richard Henderson
2025-04-04 1:09 ` [PULL 5/6] tests/qtest: Skip Aarch64 VMapple machine Richard Henderson
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2025-04-04 1:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Michael S . Tsirkin
From: Philippe Mathieu-Daudé <philmd@linaro.org>
As of v10.0.0-rc2 this test is still failing on macos:
$ make check-functional-aarch64 V=1
...
ERROR:../../replay/replay-internal.c:235:replay_mutex_unlock: assertion failed: (replay_mutex_locked())
Bail out! ERROR:../../replay/replay-internal.c:235:replay_mutex_unlock: assertion failed: (replay_mutex_locked())
This is tracked as https://gitlab.com/qemu-project/qemu/-/issues/2907
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250403203241.46692-4-philmd@linaro.org>
---
tests/functional/test_aarch64_replay.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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'
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PULL 5/6] tests/qtest: Skip Aarch64 VMapple machine
2025-04-04 1:09 [PULL 0/6] tcg patch queue for 10.0-rc3 Richard Henderson
` (3 preceding siblings ...)
2025-04-04 1:09 ` [PULL 4/6] tests/functional: Skip aarch64_replay test on macOS Richard Henderson
@ 2025-04-04 1:09 ` Richard Henderson
2025-04-04 1:09 ` [PULL 6/6] hw/arm: Do not build VMapple machine by default Richard Henderson
2025-04-04 17:08 ` [PULL 0/6] tcg patch queue for 10.0-rc3 Stefan Hajnoczi
6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2025-04-04 1:09 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Fabiano Rosas, Michael S . Tsirkin,
Thomas Huth
From: Philippe Mathieu-Daudé <philmd@linaro.org>
First, the VMapple machine only works with the ARM 'host' CPU
type, which isn't accepted for QTest:
$ qemu-system-aarch64 -M vmapple -accel qtest
qemu-system-aarch64: The 'host' CPU type can only be used with KVM or HVF
Second, the QTest framework expects machines to be createable
without specifying optional arguments, however the VMapple
machine requires few of them:
$ qemu-system-aarch64 -M vmapple -accel qtest
qemu-system-aarch64: No firmware specified
$ qemu-system-aarch64 -M vmapple -accel qtest -bios /dev/null
qemu-system-aarch64: No AUX device. Please specify one as pflash drive.
Restrict this machine with QTest so we can at least run check-qtest,
otherwise we get:
$ make check-qtest-aarch64
qemu-system-aarch64: The 'host' CPU type can only be used with KVM or HVF
Broken pipe
../tests/qtest/libqtest.c:199: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
...
7/26 qemu:qtest+qtest-aarch64 / qtest-aarch64/test-hmp ERROR 24.71s killed by signal 6 SIGABRT
2/26 qemu:qtest+qtest-aarch64 / qtest-aarch64/qom-test ERROR 71.23s killed by signal 6 SIGABRT
Suggested-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250403203241.46692-5-philmd@linaro.org>
---
tests/qtest/libqtest.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PULL 6/6] hw/arm: Do not build VMapple machine by default
2025-04-04 1:09 [PULL 0/6] tcg patch queue for 10.0-rc3 Richard Henderson
` (4 preceding siblings ...)
2025-04-04 1:09 ` [PULL 5/6] tests/qtest: Skip Aarch64 VMapple machine Richard Henderson
@ 2025-04-04 1:09 ` Richard Henderson
2025-04-04 17:08 ` [PULL 0/6] tcg patch queue for 10.0-rc3 Stefan Hajnoczi
6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2025-04-04 1:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Unfortunately as of v10.0.0-rc2 the VMapple machine is unusable:
$ qemu-system-aarch64 -M vmapple [...]
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[PGIOSurfaceHostDeviceDescriptor setMapMemory:]: unrecognized selector sent to instance 0x600001ede820'
*** First throw call stack:
(
0 CoreFoundation 0x000000019c759df0 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x000000019c21eb60 objc_exception_throw + 88
2 CoreFoundation 0x000000019c816ce0 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x000000019c6c7efc ___forwarding___ + 1500
4 CoreFoundation 0x000000019c6c7860 _CF_forwarding_prep_0 + 96
5 qemu-system-aarch64 0x000000010486dbd0 apple_gfx_mmio_realize + 200
6 qemu-system-aarch64 0x0000000104e6ab5c device_set_realized + 352
7 qemu-system-aarch64 0x0000000104e7250c property_set_bool + 100
8 qemu-system-aarch64 0x0000000104e7023c object_property_set + 136
9 qemu-system-aarch64 0x0000000104e74870 object_property_set_qobject + 60
10 qemu-system-aarch64 0x0000000104e70748 object_property_set_bool + 60
11 qemu-system-aarch64 0x0000000104e69bd8 qdev_realize_and_unref + 20
12 qemu-system-aarch64 0x0000000104e258e0 mach_vmapple_init + 1728
13 qemu-system-aarch64 0x000000010481b0ac machine_run_board_init + 1892
14 qemu-system-aarch64 0x0000000104a4def8 qmp_x_exit_preconfig + 260
15 qemu-system-aarch64 0x0000000104a51ba8 qemu_init + 14460
16 qemu-system-aarch64 0x0000000104f7cef8 main + 36
17 dyld 0x000000019c25eb4c start + 6000
)
libc++abi: terminating due to uncaught exception of type NSException
Abort trap: 6
Disable the machine so it isn't built by default.
This is tracked as https://gitlab.com/qemu-project/qemu/-/issues/2913
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250403203241.46692-6-philmd@linaro.org>
---
configs/devices/aarch64-softmmu/default.mak | 1 +
1 file changed, 1 insertion(+)
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
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PULL 0/6] tcg patch queue for 10.0-rc3
2025-04-04 1:09 [PULL 0/6] tcg patch queue for 10.0-rc3 Richard Henderson
` (5 preceding siblings ...)
2025-04-04 1:09 ` [PULL 6/6] hw/arm: Do not build VMapple machine by default Richard Henderson
@ 2025-04-04 17:08 ` Stefan Hajnoczi
6 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2025-04-04 17:08 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread