All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] cpu-exec fixes
@ 2019-01-15 19:47 Emilio G. Cota
  2019-01-15 19:47 ` [Qemu-devel] [PATCH 1/2] cpu-exec: add assert_no_pages_locked() after longjmp Emilio G. Cota
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Emilio G. Cota @ 2019-01-15 19:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, Paolo Bonzini, Max Filippov

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH 1/2] cpu-exec: add assert_no_pages_locked() after longjmp
  2019-01-15 19:47 [Qemu-devel] [PATCH 0/2] cpu-exec fixes Emilio G. Cota
@ 2019-01-15 19:47 ` Emilio G. Cota
  2019-01-15 19:47 ` [Qemu-devel] [PATCH 2/2] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic Emilio G. Cota
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Emilio G. Cota @ 2019-01-15 19:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, Paolo Bonzini, Max Filippov

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.

Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 accel/tcg/cpu-exec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 870027d435..55e0ca41c4 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -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 */
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH 2/2] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic
  2019-01-15 19:47 [Qemu-devel] [PATCH 0/2] cpu-exec fixes Emilio G. Cota
  2019-01-15 19:47 ` [Qemu-devel] [PATCH 1/2] cpu-exec: add assert_no_pages_locked() after longjmp Emilio G. Cota
@ 2019-01-15 19:47 ` Emilio G. Cota
  2019-01-15 22:00 ` [Qemu-devel] [PATCH 0/2] cpu-exec fixes Richard Henderson
  2019-01-21  6:32 ` no-reply
  3 siblings, 0 replies; 6+ messages in thread
From: Emilio G. Cota @ 2019-01-15 19:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, Paolo Bonzini, Max Filippov

Just like we do in cpu_exec().

Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 accel/tcg/cpu-exec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 55e0ca41c4..fefd955d66 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -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();
     }
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] cpu-exec fixes
  2019-01-15 19:47 [Qemu-devel] [PATCH 0/2] cpu-exec fixes Emilio G. Cota
  2019-01-15 19:47 ` [Qemu-devel] [PATCH 1/2] cpu-exec: add assert_no_pages_locked() after longjmp Emilio G. Cota
  2019-01-15 19:47 ` [Qemu-devel] [PATCH 2/2] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic Emilio G. Cota
@ 2019-01-15 22:00 ` Richard Henderson
  2019-01-15 22:22   ` Paolo Bonzini
  2019-01-21  6:32 ` no-reply
  3 siblings, 1 reply; 6+ messages in thread
From: Richard Henderson @ 2019-01-15 22:00 UTC (permalink / raw)
  To: Emilio G. Cota, qemu-devel; +Cc: Paolo Bonzini, Max Filippov

On 1/16/19 6:47 AM, Emilio G. Cota wrote:
> 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.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] cpu-exec fixes
  2019-01-15 22:00 ` [Qemu-devel] [PATCH 0/2] cpu-exec fixes Richard Henderson
@ 2019-01-15 22:22   ` Paolo Bonzini
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2019-01-15 22:22 UTC (permalink / raw)
  To: Richard Henderson, Emilio G. Cota, qemu-devel; +Cc: Max Filippov

On 15/01/19 23:00, Richard Henderson wrote:
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

Queued, thanks.

Paolo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] cpu-exec fixes
  2019-01-15 19:47 [Qemu-devel] [PATCH 0/2] cpu-exec fixes Emilio G. Cota
                   ` (2 preceding siblings ...)
  2019-01-15 22:00 ` [Qemu-devel] [PATCH 0/2] cpu-exec fixes Richard Henderson
@ 2019-01-21  6:32 ` no-reply
  3 siblings, 0 replies; 6+ messages in thread
From: no-reply @ 2019-01-21  6:32 UTC (permalink / raw)
  To: cota; +Cc: fam, qemu-devel, pbonzini, richard.henderson, jcmvbkbc

Patchew URL: https://patchew.org/QEMU/20190115194754.7670-1-cota@braap.org/



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/20190115194754.7670-1-cota@braap.org/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-21  6:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 19:47 [Qemu-devel] [PATCH 0/2] cpu-exec fixes Emilio G. Cota
2019-01-15 19:47 ` [Qemu-devel] [PATCH 1/2] cpu-exec: add assert_no_pages_locked() after longjmp Emilio G. Cota
2019-01-15 19:47 ` [Qemu-devel] [PATCH 2/2] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic Emilio G. Cota
2019-01-15 22:00 ` [Qemu-devel] [PATCH 0/2] cpu-exec fixes Richard Henderson
2019-01-15 22:22   ` Paolo Bonzini
2019-01-21  6:32 ` no-reply

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.