* [PULL 0/7] Trivial patches for 2023-12-25
@ 2023-12-25 8:10 Michael Tokarev
2023-12-25 8:10 ` [PULL 1/7] target/riscv/kvm: do not use non-portable strerrorname_np() Michael Tokarev
` (8 more replies)
0 siblings, 9 replies; 11+ messages in thread
From: Michael Tokarev @ 2023-12-25 8:10 UTC (permalink / raw)
To: qemu-devel; +Cc: Michael Tokarev, qemu-trivial
The following changes since commit 80f1709aa0eb4de09b4240563463f991a5b9d855:
Merge tag 'pull-loongarch-20231221' of https://gitlab.com/gaosong/qemu into staging (2023-12-21 19:44:19 -0500)
are available in the Git repository at:
https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches
for you to fetch changes up to d819fc9516a4ec71e37a6c9edfcd285b7f98c2dc:
virtio-blk: Fix potential nullpointer read access in virtio_blk_data_plane_destroy (2023-12-25 11:01:01 +0300)
----------------------------------------------------------------
trivial patches for 2023-12-25
This pullreq contains cocoa help text updates, DPRINTF=>trace
conversion in accel/kvm, a typo fix in qemu-img.rst, and
3 imprtant (yet trivial) bugfixes:
- fix for virtio-vga breakage after pixman becoming optional
- fix for potential null pointer deref in virtio_blk_data_plane_destroy()
- fix for usage of non-portable strerrorname_np()
----------------------------------------------------------------
Akihiko Odaki (2):
qemu-options: Unify the help entries for cocoa
qemu-options: Tell more for -display cocoa
Elen Avan (1):
include/ui/rect.h: fix qemu_rect_init() mis-assignment
Jai Arora (1):
accel/kvm: Turn DPRINTF macro use into tracepoints
Natanael Copa (1):
target/riscv/kvm: do not use non-portable strerrorname_np()
Samuel Tardieu (1):
docs/tools/qemu-img.rst: fix typo (sumarizes)
Stefan Weil via (1):
virtio-blk: Fix potential nullpointer read access in virtio_blk_data_plane_destroy
accel/kvm/kvm-all.c | 28 ++++++----------------------
accel/kvm/trace-events | 7 ++++++-
docs/tools/qemu-img.rst | 2 +-
hw/block/dataplane/virtio-blk.c | 3 ++-
include/ui/rect.h | 2 +-
qemu-options.hx | 21 ++++++++++++++++++---
target/riscv/kvm/kvm-cpu.c | 18 ++++++++----------
7 files changed, 42 insertions(+), 39 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PULL 1/7] target/riscv/kvm: do not use non-portable strerrorname_np()
2023-12-25 8:10 [PULL 0/7] Trivial patches for 2023-12-25 Michael Tokarev
@ 2023-12-25 8:10 ` Michael Tokarev
2023-12-25 8:10 ` [PULL 2/7] qemu-options: Unify the help entries for cocoa Michael Tokarev
` (7 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Michael Tokarev @ 2023-12-25 8:10 UTC (permalink / raw)
To: qemu-devel; +Cc: Natanael Copa, qemu-trivial, qemu-stable, Michael Tokarev
From: Natanael Copa <ncopa@alpinelinux.org>
strerrorname_np is non-portable and breaks building with musl libc.
Use strerror(errno) instead, like we do other places.
Cc: qemu-stable@nongnu.org
Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve 'init_multiext_cfg' error msg)
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2041
Buglink: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15541
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target/riscv/kvm/kvm-cpu.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c
index 45b6cf1cfa..117e33cf90 100644
--- a/target/riscv/kvm/kvm-cpu.c
+++ b/target/riscv/kvm/kvm-cpu.c
@@ -832,9 +832,8 @@ static void kvm_riscv_read_multiext_legacy(RISCVCPU *cpu,
multi_ext_cfg->supported = false;
val = false;
} else {
- error_report("Unable to read ISA_EXT KVM register %s, "
- "error code: %s", multi_ext_cfg->name,
- strerrorname_np(errno));
+ error_report("Unable to read ISA_EXT KVM register %s: %s",
+ multi_ext_cfg->name, strerror(errno));
exit(EXIT_FAILURE);
}
} else {
@@ -895,8 +894,8 @@ static void kvm_riscv_init_multiext_cfg(RISCVCPU *cpu, KVMScratchCPU *kvmcpu)
*
* Error out if we get any other errno.
*/
- error_report("Error when accessing get-reg-list, code: %s",
- strerrorname_np(errno));
+ error_report("Error when accessing get-reg-list: %s",
+ strerror(errno));
exit(EXIT_FAILURE);
}
@@ -905,8 +904,8 @@ static void kvm_riscv_init_multiext_cfg(RISCVCPU *cpu, KVMScratchCPU *kvmcpu)
reglist->n = rl_struct.n;
ret = ioctl(kvmcpu->cpufd, KVM_GET_REG_LIST, reglist);
if (ret) {
- error_report("Error when reading KVM_GET_REG_LIST, code %s ",
- strerrorname_np(errno));
+ error_report("Error when reading KVM_GET_REG_LIST: %s",
+ strerror(errno));
exit(EXIT_FAILURE);
}
@@ -927,9 +926,8 @@ static void kvm_riscv_init_multiext_cfg(RISCVCPU *cpu, KVMScratchCPU *kvmcpu)
reg.addr = (uint64_t)&val;
ret = ioctl(kvmcpu->cpufd, KVM_GET_ONE_REG, ®);
if (ret != 0) {
- error_report("Unable to read ISA_EXT KVM register %s, "
- "error code: %s", multi_ext_cfg->name,
- strerrorname_np(errno));
+ error_report("Unable to read ISA_EXT KVM register %s: %s",
+ multi_ext_cfg->name, strerror(errno));
exit(EXIT_FAILURE);
}
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 2/7] qemu-options: Unify the help entries for cocoa
2023-12-25 8:10 [PULL 0/7] Trivial patches for 2023-12-25 Michael Tokarev
2023-12-25 8:10 ` [PULL 1/7] target/riscv/kvm: do not use non-portable strerrorname_np() Michael Tokarev
@ 2023-12-25 8:10 ` Michael Tokarev
2023-12-25 8:10 ` [PULL 3/7] qemu-options: Tell more for -display cocoa Michael Tokarev
` (6 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Michael Tokarev @ 2023-12-25 8:10 UTC (permalink / raw)
To: qemu-devel; +Cc: Akihiko Odaki, qemu-trivial, Michael Tokarev
From: Akihiko Odaki <akihiko.odaki@daynix.com>
Apparently the help entries were not merged when the patches got in.
Fixes: f844cdb99714 ("ui/cocoa: capture all keys and combos when mouse is grabbed")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qemu-options.hx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index 68f2c09b00..ef49b856d6 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2087,6 +2087,7 @@ DEF("display", HAS_ARG, QEMU_OPTION_display,
#endif
#if defined(CONFIG_COCOA)
"-display cocoa[,full-grab=on|off][,swap-opt-cmd=on|off]\n"
+ " [,show-cursor=on|off][,left-command-key=on|off]\n"
#endif
#if defined(CONFIG_OPENGL)
"-display egl-headless[,rendernode=<file>]\n"
@@ -2094,9 +2095,6 @@ DEF("display", HAS_ARG, QEMU_OPTION_display,
#if defined(CONFIG_DBUS_DISPLAY)
"-display dbus[,addr=<dbusaddr>]\n"
" [,gl=on|core|es|off][,rendernode=<file>]\n"
-#endif
-#if defined(CONFIG_COCOA)
- "-display cocoa[,show-cursor=on|off][,left-command-key=on|off]\n"
#endif
"-display none\n"
" select display backend type\n"
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 3/7] qemu-options: Tell more for -display cocoa
2023-12-25 8:10 [PULL 0/7] Trivial patches for 2023-12-25 Michael Tokarev
2023-12-25 8:10 ` [PULL 1/7] target/riscv/kvm: do not use non-portable strerrorname_np() Michael Tokarev
2023-12-25 8:10 ` [PULL 2/7] qemu-options: Unify the help entries for cocoa Michael Tokarev
@ 2023-12-25 8:10 ` Michael Tokarev
2023-12-25 8:10 ` [PULL 4/7] docs/tools/qemu-img.rst: fix typo (sumarizes) Michael Tokarev
` (5 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Michael Tokarev @ 2023-12-25 8:10 UTC (permalink / raw)
To: qemu-devel; +Cc: Akihiko Odaki, qemu-trivial, Michael Tokarev
From: Akihiko Odaki <akihiko.odaki@daynix.com>
Some options for -display cocoa were not described or not listed at all.
Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
qemu-options.hx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index ef49b856d6..b66570ae00 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2088,6 +2088,7 @@ DEF("display", HAS_ARG, QEMU_OPTION_display,
#if defined(CONFIG_COCOA)
"-display cocoa[,full-grab=on|off][,swap-opt-cmd=on|off]\n"
" [,show-cursor=on|off][,left-command-key=on|off]\n"
+ " [,full-screen=on|off][,zoom-to-fit=on|off]\n"
#endif
#if defined(CONFIG_OPENGL)
"-display egl-headless[,rendernode=<file>]\n"
@@ -2189,10 +2190,26 @@ SRST
provides drop-down menus and other UI elements to configure and
control the VM during runtime. Valid parameters are:
+ ``full-grab=on|off`` : Capture all key presses, including system combos.
+ This requires accessibility permissions, since it
+ performs a global grab on key events.
+ (default: off) See
+ https://support.apple.com/en-in/guide/mac-help/mh32356/mac
+
+ ``swap-opt-cmd=on|off`` : Swap the Option and Command keys so that their
+ key codes match their position on non-Mac
+ keyboards and you can use Meta/Super and Alt
+ where you expect them. (default: off)
+
``show-cursor=on|off`` : Force showing the mouse cursor
``left-command-key=on|off`` : Disable forwarding left command key to host
+ ``full-screen=on|off`` : Start in fullscreen mode
+
+ ``zoom-to-fit=on|off`` : Expand video output to the window size,
+ defaults to "off"
+
``egl-headless[,rendernode=<file>]``
Offload all OpenGL operations to a local DRI device. For any
graphical display, this display needs to be paired with either
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 4/7] docs/tools/qemu-img.rst: fix typo (sumarizes)
2023-12-25 8:10 [PULL 0/7] Trivial patches for 2023-12-25 Michael Tokarev
` (2 preceding siblings ...)
2023-12-25 8:10 ` [PULL 3/7] qemu-options: Tell more for -display cocoa Michael Tokarev
@ 2023-12-25 8:10 ` Michael Tokarev
2023-12-25 8:10 ` [PULL 5/7] accel/kvm: Turn DPRINTF macro use into tracepoints Michael Tokarev
` (4 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Michael Tokarev @ 2023-12-25 8:10 UTC (permalink / raw)
To: qemu-devel; +Cc: Samuel Tardieu, qemu-trivial, Michael Tokarev
From: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
docs/tools/qemu-img.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst
index 4459c065f1..3653adb963 100644
--- a/docs/tools/qemu-img.rst
+++ b/docs/tools/qemu-img.rst
@@ -406,7 +406,7 @@ Command description:
Compare exits with ``0`` in case the images are equal and with ``1``
in case the images differ. Other exit codes mean an error occurred during
execution and standard error output should contain an error message.
- The following table sumarizes all exit codes of the compare subcommand:
+ The following table summarizes all exit codes of the compare subcommand:
0
Images are identical (or requested help was printed)
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 5/7] accel/kvm: Turn DPRINTF macro use into tracepoints
2023-12-25 8:10 [PULL 0/7] Trivial patches for 2023-12-25 Michael Tokarev
` (3 preceding siblings ...)
2023-12-25 8:10 ` [PULL 4/7] docs/tools/qemu-img.rst: fix typo (sumarizes) Michael Tokarev
@ 2023-12-25 8:10 ` Michael Tokarev
2023-12-25 8:10 ` [PULL 6/7] include/ui/rect.h: fix qemu_rect_init() mis-assignment Michael Tokarev
` (3 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Michael Tokarev @ 2023-12-25 8:10 UTC (permalink / raw)
To: qemu-devel; +Cc: Jai Arora, qemu-trivial, Michael Tokarev
From: Jai Arora <arorajai2798@gmail.com>
Patch removes DPRINTF macro and adds multiple tracepoints
to capture different kvm events.
We also drop the DPRINTFs that don't add any additional
information than trace_kvm_run_exit already does.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1827
Signed-off-by: Jai Arora <arorajai2798@gmail.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
accel/kvm/kvm-all.c | 28 ++++++----------------------
accel/kvm/trace-events | 7 ++++++-
2 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index f138e7fefe..eb17773f0b 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -69,16 +69,6 @@
#define KVM_GUESTDBG_BLOCKIRQ 0
#endif
-//#define DEBUG_KVM
-
-#ifdef DEBUG_KVM
-#define DPRINTF(fmt, ...) \
- do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...) \
- do { } while (0)
-#endif
-
struct KVMParkedVcpu {
unsigned long vcpu_id;
int kvm_fd;
@@ -331,7 +321,7 @@ static int do_kvm_destroy_vcpu(CPUState *cpu)
struct KVMParkedVcpu *vcpu = NULL;
int ret = 0;
- DPRINTF("kvm_destroy_vcpu\n");
+ trace_kvm_destroy_vcpu();
ret = kvm_arch_destroy_vcpu(cpu);
if (ret < 0) {
@@ -341,7 +331,7 @@ static int do_kvm_destroy_vcpu(CPUState *cpu)
mmap_size = kvm_ioctl(s, KVM_GET_VCPU_MMAP_SIZE, 0);
if (mmap_size < 0) {
ret = mmap_size;
- DPRINTF("KVM_GET_VCPU_MMAP_SIZE failed\n");
+ trace_kvm_failed_get_vcpu_mmap_size();
goto err;
}
@@ -443,7 +433,6 @@ int kvm_init_vcpu(CPUState *cpu, Error **errp)
PAGE_SIZE * KVM_DIRTY_LOG_PAGE_OFFSET);
if (cpu->kvm_dirty_gfns == MAP_FAILED) {
ret = -errno;
- DPRINTF("mmap'ing vcpu dirty gfns failed: %d\n", ret);
goto err;
}
}
@@ -2821,7 +2810,7 @@ int kvm_cpu_exec(CPUState *cpu)
struct kvm_run *run = cpu->kvm_run;
int ret, run_ret;
- DPRINTF("kvm_cpu_exec()\n");
+ trace_kvm_cpu_exec();
if (kvm_arch_process_async_events(cpu)) {
qatomic_set(&cpu->exit_request, 0);
@@ -2848,7 +2837,7 @@ int kvm_cpu_exec(CPUState *cpu)
kvm_arch_pre_run(cpu, run);
if (qatomic_read(&cpu->exit_request)) {
- DPRINTF("interrupt exit requested\n");
+ trace_kvm_interrupt_exit_request();
/*
* KVM requires us to reenter the kernel after IO exits to complete
* instruction emulation. This self-signal will ensure that we
@@ -2878,7 +2867,7 @@ int kvm_cpu_exec(CPUState *cpu)
if (run_ret < 0) {
if (run_ret == -EINTR || run_ret == -EAGAIN) {
- DPRINTF("io window exit\n");
+ trace_kvm_io_window_exit();
kvm_eat_signals(cpu);
ret = EXCP_INTERRUPT;
break;
@@ -2900,7 +2889,6 @@ int kvm_cpu_exec(CPUState *cpu)
trace_kvm_run_exit(cpu->cpu_index, run->exit_reason);
switch (run->exit_reason) {
case KVM_EXIT_IO:
- DPRINTF("handle_io\n");
/* Called outside BQL */
kvm_handle_io(run->io.port, attrs,
(uint8_t *)run + run->io.data_offset,
@@ -2910,7 +2898,6 @@ int kvm_cpu_exec(CPUState *cpu)
ret = 0;
break;
case KVM_EXIT_MMIO:
- DPRINTF("handle_mmio\n");
/* Called outside BQL */
address_space_rw(&address_space_memory,
run->mmio.phys_addr, attrs,
@@ -2920,11 +2907,9 @@ int kvm_cpu_exec(CPUState *cpu)
ret = 0;
break;
case KVM_EXIT_IRQ_WINDOW_OPEN:
- DPRINTF("irq_window_open\n");
ret = EXCP_INTERRUPT;
break;
case KVM_EXIT_SHUTDOWN:
- DPRINTF("shutdown\n");
qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
ret = EXCP_INTERRUPT;
break;
@@ -2959,6 +2944,7 @@ int kvm_cpu_exec(CPUState *cpu)
ret = 0;
break;
case KVM_EXIT_SYSTEM_EVENT:
+ trace_kvm_run_exit_system_event(cpu->cpu_index, run->system_event.type);
switch (run->system_event.type) {
case KVM_SYSTEM_EVENT_SHUTDOWN:
qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
@@ -2976,13 +2962,11 @@ int kvm_cpu_exec(CPUState *cpu)
ret = 0;
break;
default:
- DPRINTF("kvm_arch_handle_exit\n");
ret = kvm_arch_handle_exit(cpu, run);
break;
}
break;
default:
- DPRINTF("kvm_arch_handle_exit\n");
ret = kvm_arch_handle_exit(cpu, run);
break;
}
diff --git a/accel/kvm/trace-events b/accel/kvm/trace-events
index 399aaeb0ec..a25902597b 100644
--- a/accel/kvm/trace-events
+++ b/accel/kvm/trace-events
@@ -25,4 +25,9 @@ kvm_dirty_ring_reaper(const char *s) "%s"
kvm_dirty_ring_reap(uint64_t count, int64_t t) "reaped %"PRIu64" pages (took %"PRIi64" us)"
kvm_dirty_ring_reaper_kick(const char *reason) "%s"
kvm_dirty_ring_flush(int finished) "%d"
-
+kvm_destroy_vcpu(void) ""
+kvm_failed_get_vcpu_mmap_size(void) ""
+kvm_cpu_exec(void) ""
+kvm_interrupt_exit_request(void) ""
+kvm_io_window_exit(void) ""
+kvm_run_exit_system_event(int cpu_index, uint32_t event_type) "cpu_index %d, system_even_type %"PRIu32
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 6/7] include/ui/rect.h: fix qemu_rect_init() mis-assignment
2023-12-25 8:10 [PULL 0/7] Trivial patches for 2023-12-25 Michael Tokarev
` (4 preceding siblings ...)
2023-12-25 8:10 ` [PULL 5/7] accel/kvm: Turn DPRINTF macro use into tracepoints Michael Tokarev
@ 2023-12-25 8:10 ` Michael Tokarev
2023-12-25 8:10 ` [PULL 7/7] virtio-blk: Fix potential nullpointer read access in virtio_blk_data_plane_destroy Michael Tokarev
` (2 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Michael Tokarev @ 2023-12-25 8:10 UTC (permalink / raw)
To: qemu-devel; +Cc: Elen Avan, qemu-trivial, qemu-stable, Michael Tokarev
From: Elen Avan <elen.avan@bk.ru>
Signed-off-by: Elen Avan <elen.avan@bk.ru>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2051
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2050
Fixes: a200d53b1fde "virtio-gpu: replace PIXMAN for region/rect test"
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
include/ui/rect.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/ui/rect.h b/include/ui/rect.h
index 94898f92d0..68f05d78a8 100644
--- a/include/ui/rect.h
+++ b/include/ui/rect.h
@@ -19,7 +19,7 @@ static inline void qemu_rect_init(QemuRect *rect,
uint16_t width, uint16_t height)
{
rect->x = x;
- rect->y = x;
+ rect->y = y;
rect->width = width;
rect->height = height;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 7/7] virtio-blk: Fix potential nullpointer read access in virtio_blk_data_plane_destroy
2023-12-25 8:10 [PULL 0/7] Trivial patches for 2023-12-25 Michael Tokarev
` (5 preceding siblings ...)
2023-12-25 8:10 ` [PULL 6/7] include/ui/rect.h: fix qemu_rect_init() mis-assignment Michael Tokarev
@ 2023-12-25 8:10 ` Michael Tokarev
2023-12-26 14:14 ` [PULL 0/7] Trivial patches for 2023-12-25 Stefan Hajnoczi
2023-12-26 15:39 ` Philippe Mathieu-Daudé
8 siblings, 0 replies; 11+ messages in thread
From: Michael Tokarev @ 2023-12-25 8:10 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil via, Michael Tokarev
From: Stefan Weil via <qemu-trivial@nongnu.org>
Fixes: CID 1532828
Fixes: b6948ab01d ("virtio-blk: add iothread-vq-mapping parameter")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/block/dataplane/virtio-blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index 6debd4401e..97a302cf49 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -152,7 +152,7 @@ bool virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,
void virtio_blk_data_plane_destroy(VirtIOBlockDataPlane *s)
{
VirtIOBlock *vblk;
- VirtIOBlkConf *conf = s->conf;
+ VirtIOBlkConf *conf;
if (!s) {
return;
@@ -160,6 +160,7 @@ void virtio_blk_data_plane_destroy(VirtIOBlockDataPlane *s)
vblk = VIRTIO_BLK(s->vdev);
assert(!vblk->dataplane_started);
+ conf = s->conf;
if (conf->iothread_vq_mapping_list) {
IOThreadVirtQueueMappingList *node;
--
2.39.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PULL 0/7] Trivial patches for 2023-12-25
2023-12-25 8:10 [PULL 0/7] Trivial patches for 2023-12-25 Michael Tokarev
` (6 preceding siblings ...)
2023-12-25 8:10 ` [PULL 7/7] virtio-blk: Fix potential nullpointer read access in virtio_blk_data_plane_destroy Michael Tokarev
@ 2023-12-26 14:14 ` Stefan Hajnoczi
2023-12-26 15:39 ` Philippe Mathieu-Daudé
8 siblings, 0 replies; 11+ messages in thread
From: Stefan Hajnoczi @ 2023-12-26 14:14 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-devel, Michael Tokarev, qemu-trivial
[-- Attachment #1: Type: text/plain, Size: 115 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/9.0 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PULL 0/7] Trivial patches for 2023-12-25
2023-12-25 8:10 [PULL 0/7] Trivial patches for 2023-12-25 Michael Tokarev
` (7 preceding siblings ...)
2023-12-26 14:14 ` [PULL 0/7] Trivial patches for 2023-12-25 Stefan Hajnoczi
@ 2023-12-26 15:39 ` Philippe Mathieu-Daudé
2023-12-26 20:15 ` Michael Tokarev
8 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-12-26 15:39 UTC (permalink / raw)
To: Michael Tokarev, qemu-devel; +Cc: qemu-trivial
Hi,
On 25/12/23 09:10, Michael Tokarev wrote:
> ----------------------------------------------------------------
> trivial patches for 2023-12-25
> ----------------------------------------------------------------
> Akihiko Odaki (2):
> qemu-options: Unify the help entries for cocoa
> qemu-options: Tell more for -display cocoa
>
> Elen Avan (1):
> include/ui/rect.h: fix qemu_rect_init() mis-assignment
>
> Jai Arora (1):
> accel/kvm: Turn DPRINTF macro use into tracepoints
>
> Natanael Copa (1):
> target/riscv/kvm: do not use non-portable strerrorname_np()
>
> Samuel Tardieu (1):
> docs/tools/qemu-img.rst: fix typo (sumarizes)
>
> Stefan Weil via (1):
> virtio-blk: Fix potential nullpointer read access in virtio_blk_data_plane_destroy
This last patch has as author:
From: Stefan Weil via <qemu-trivial@nongnu.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PULL 0/7] Trivial patches for 2023-12-25
2023-12-26 15:39 ` Philippe Mathieu-Daudé
@ 2023-12-26 20:15 ` Michael Tokarev
0 siblings, 0 replies; 11+ messages in thread
From: Michael Tokarev @ 2023-12-26 20:15 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: qemu-trivial
26.12.2023 18:39, Philippe Mathieu-Daudé:
..
>> Stefan Weil via (1):
>> virtio-blk: Fix potential nullpointer read access in virtio_blk_data_plane_destroy
>
> This last patch has as author:
>
> From: Stefan Weil via <qemu-trivial@nongnu.org>
Ugh. It's too late. And yes, that's my mishap, - I forgot to
check for such stuff. Sigh. Will do the next time.
/mjt
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-12-26 20:15 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-25 8:10 [PULL 0/7] Trivial patches for 2023-12-25 Michael Tokarev
2023-12-25 8:10 ` [PULL 1/7] target/riscv/kvm: do not use non-portable strerrorname_np() Michael Tokarev
2023-12-25 8:10 ` [PULL 2/7] qemu-options: Unify the help entries for cocoa Michael Tokarev
2023-12-25 8:10 ` [PULL 3/7] qemu-options: Tell more for -display cocoa Michael Tokarev
2023-12-25 8:10 ` [PULL 4/7] docs/tools/qemu-img.rst: fix typo (sumarizes) Michael Tokarev
2023-12-25 8:10 ` [PULL 5/7] accel/kvm: Turn DPRINTF macro use into tracepoints Michael Tokarev
2023-12-25 8:10 ` [PULL 6/7] include/ui/rect.h: fix qemu_rect_init() mis-assignment Michael Tokarev
2023-12-25 8:10 ` [PULL 7/7] virtio-blk: Fix potential nullpointer read access in virtio_blk_data_plane_destroy Michael Tokarev
2023-12-26 14:14 ` [PULL 0/7] Trivial patches for 2023-12-25 Stefan Hajnoczi
2023-12-26 15:39 ` Philippe Mathieu-Daudé
2023-12-26 20:15 ` Michael Tokarev
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.