cpu-exec fixes
cover cpu-exec fixes
Just a couple of small fixes.
The first adds an assert that we should have added when performing the conversion from tb_lock to per-page locks.
The second adds a missing reset of the BQL after the longjmp in cpu_exec_step_atomic returns.
Thanks,
Emilio
PATCH 1/2 cpu-exec: add assert_no_pages_locked() after longjmp
We forgot to add this check in faa9372c07 ("translate-all:
introduce assert_no_pages_locked", 2018-06-15); we only added it after returning from a longjmp in cpu_exec_step_atomic. Fix it.
--- accel/tcg/cpu-exec.c | 1 + 1 file changed, 1 insertion(+)
accel/tcg/cpu-exec.c +1 -0
@@ -699,6 +699,7 @@ int cpu_exec(CPUState *cpu)if (qemu_mutex_iothread_locked ()) {qemu_mutex_unlock_iothread (); } +assert_no_pages_locked (); }/* if an exception is pending, we execute it here */
Signature · 1 line
2.17.1
PATCH 2/2 cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic
In reply to Emilio G. CotaJust like we do in cpu_exec().
--- accel/tcg/cpu-exec.c | 3 +++ 1 file changed, 3 insertions(+)
accel/tcg/cpu-exec.c +3 -0
@@ -266,6 +266,9 @@ void cpu_exec_step_atomic(CPUState *cpu)#ifndef CONFIG_SOFTMMU tcg_debug_assert (!have_mmap_lock ());#endif +if (qemu_mutex_iothread_locked ()) { +qemu_mutex_unlock_iothread (); + }assert_no_pages_locked (); }
Signature · 1 line
2.17.1
Quoted 7 lines · Emilio G. Cota
Just a couple of small fixes.
The first adds an assert that we should have added when performing the conversion from
tb_lockto per-page locks.The second adds a missing reset of the BQL after the longjmp in
cpu_exec_step_atomicreturns.
r~
Paolo Bonzini
AppliedQuoted 1 line · Richard Henderson
Reviewed-by Richard Henderson <[email protected]>
Queued, thanks.
Paolo
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14 === TEST SCRIPT END ===
CC hw/audio/pcspk.o
CC hw/audio/wm8750.o/tmp/qemu-test/src/block/sheepdog.c: In function 'find_vdi_name':/tmp/qemu-test/src/block/sheepdog.c:1239:5: error: 'strncpy' specified bound 256 equals destination size [-Werror=stringop-truncation]
strncpy(buf + SD_MAX_VDI_LEN, tag, SD_MAX_VDI_TAG_LEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
---
CC hw/audio/pl041.o
In function 'acpi_table_install',
inlined from 'acpi_table_add' at /tmp/qemu-test/src/hw/acpi/core.c:296:5:
/tmp/qemu-test/src/hw/acpi/core.c:184:9: error: 'strncpy' specified bound 4 equals destination size [-Werror=stringop-truncation]
strncpy(ext_hdr->sig, hdrs->sig, sizeof ext_hdr->sig);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/hw/acpi/core.c:203:9: error: 'strncpy' specified bound 6 equals destination size [-Werror=stringop-truncation]
strncpy(ext_hdr->oem_id, hdrs->oem_id, sizeof ext_hdr->oem_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/hw/acpi/core.c:207:9: error: 'strncpy' specified bound 8 equals destination size [-Werror=stringop-truncation]
strncpy(ext_hdr->oem_table_id, hdrs->oem_table_id,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof ext_hdr->oem_table_id);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/hw/acpi/core.c:216:9: error: 'strncpy' specified bound 4 equals destination size [-Werror=stringop-truncation]
strncpy(ext_hdr->asl_compiler_id, hdrs->asl_compiler_id,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof ext_hdr->asl_compiler_id);---
cc1: all warnings being treated as errors
make: *** [/tmp/qemu-test/src/rules.mak:69: hw/acpi/core.o] Error 1/tmp/qemu-test/src/hw/acpi/aml-build.c: In function 'build_header':/tmp/qemu-test/src/hw/acpi/aml-build.c:1535:9: error: 'strncpy' specified bound 6 equals destination size [-Werror=stringop-truncation]
strncpy((char *)h->oem_id, oem_id, sizeof h->oem_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/hw/acpi/aml-build.c:1541:9: error: 'strncpy' specified bound 8 equals destination size [-Werror=stringop-truncation]
strncpy((char *)h->oem_table_id, oem_table_id, sizeof(h->oem_table_id));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
The full log is available at
http://patchew.org/logs/[email protected]/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]