Re: [PATCH 1/4] qdev: add DEVICE_RUNTIME_ERROR event

2022-05-25 Thread Konstantin Khlebnikov
;s easy to pass\use more. Second, add maintainers to CC:+Micheal+Eric+MarkusOn 5/19/22 17:19, Konstantin Khlebnikov wrote: This event represents device runtime errors to give time and reason why device is broken.  Signed-off-by: Konstantin Khlebnikov <khlebni...@yandex-team.ru> ---The pat

[PATCH 1/4] qdev: add DEVICE_RUNTIME_ERROR event

2022-05-19 Thread Konstantin Khlebnikov
This event represents device runtime errors to give time and reason why device is broken. Signed-off-by: Konstantin Khlebnikov --- hw/core/qdev.c |7 +++ include/hw/qdev-core.h |1 + qapi/qdev.json | 26 ++ 3 files changed, 34 insertions

[PATCH 3/4] vhost: add method vhost_set_vring_err

2022-05-19 Thread Konstantin Khlebnikov
Kernel and user vhost may report virtqueue errors via eventfd. This is only reliable way to get notification about protocol error. Signed-off-by: Konstantin Khlebnikov --- hw/virtio/vhost-backend.c |7 +++ hw/virtio/vhost-user.c|6 ++ include/hw/virtio/vhost

[PATCH 2/4] virtio: forward errors into qdev_report_runtime_error()

2022-05-19 Thread Konstantin Khlebnikov
Repalce virtio_error() with macro which forms structured Error and reports it as device runtime-error in addition to present actions. Signed-off-by: Konstantin Khlebnikov --- hw/virtio/virtio.c |9 +++-- include/hw/virtio/virtio.h | 10 +- 2 files changed, 12

[PATCH 4/4] vhost: forward vring errors into virtio device

2022-05-19 Thread Konstantin Khlebnikov
Setup eventfd for vring error notifications. Add eventfd for each virt-queue to detect which queue faced error. For example vhost-net in kernel silently stop working at first error. Now we'll see message and qmp event if guest driver did something wrong. Signed-off-by: Konstantin Khleb

Re: [PATCH] vhost: fix repeated memory unmap in error paths

2022-02-10 Thread Konstantin Khlebnikov
10.02.2022, 15:06, "Philippe Mathieu-Daudé" :On 10/2/22 12:46, Konstantin Khlebnikov wrote: Fuzzing found that on some error paths vhost_memory_unmap() is called twice or for NULL address. Let's reset pointers after unmap and ingnore unmap for NULL.  Signed-off-by: Konstantin Khle

Re: [PATCH 1/2] vhost-user-blk: handle errors in vhost_user_blk_connect

2022-02-10 Thread Konstantin Khlebnikov
  10.02.2022, 14:56, "Philippe Mathieu-Daudé" :On 10/2/22 12:46, Konstantin Khlebnikov wrote: Cleanup vhost device and update connection state when initialization fails.  Signed-off-by: Konstantin Khlebnikov <khlebni...@yandex-team.ru> ---   hw/block/vhost-user-blk.c | 10 +++

Re: [PATCH] meson: put custom CFLAGS after default CFLAGS

2022-02-10 Thread Konstantin Khlebnikov
  10.02.2022, 14:52, "Philippe Mathieu-Daudé" :Hi Konstantin,On 10/2/22 12:44, Konstantin Khlebnikov wrote: Flags passed to configure must be at the end to override defaults.  Signed-off-by: Konstantin Khlebnikov <khlebni...@yandex-team.ru> ---   meson.build | 12 ++--   1

[PATCH 2/2] vhost-user-blk: check connection state in vhost_user_blk_set_config

2022-02-10 Thread Konstantin Khlebnikov
Fuzzing found that ->set_config() could be called without connection. Signed-off-by: Konstantin Khlebnikov --- hw/block/vhost-user-blk.c |4 1 file changed, 4 insertions(+) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 35ac188ca4..9ac50443bc 100644 --- a

[PATCH] vhost: fix repeated memory unmap in error paths

2022-02-10 Thread Konstantin Khlebnikov
Fuzzing found that on some error paths vhost_memory_unmap() is called twice or for NULL address. Let's reset pointers after unmap and ingnore unmap for NULL. Signed-off-by: Konstantin Khlebnikov --- hw/virtio/vhost.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH] virtio-net: break gracefully on packet without valid header

2022-02-10 Thread Konstantin Khlebnikov
ts from io vector helpers and checking results of copying from io vector where needed. Buglink: https://gitlab.com/qemu-project/qemu/-/issues/762 Signed-off-by: Konstantin Khlebnikov --- hw/net/virtio-net.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/virtio-

[PATCH] virtio: update memory region cache when queue size changes

2022-02-10 Thread Konstantin Khlebnikov
b.com/qemu-project/qemu/-/issues/781 Signed-off-by: Konstantin Khlebnikov --- hw/virtio/virtio.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 9e8f51dfb0..cd525a0f9a 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -2245,6 +2245

[PATCH 1/2] vhost-user-blk: handle errors in vhost_user_blk_connect

2022-02-10 Thread Konstantin Khlebnikov
Cleanup vhost device and update connection state when initialization fails. Signed-off-by: Konstantin Khlebnikov --- hw/block/vhost-user-blk.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 1a42ae9187

[PATCH] meson: put custom CFLAGS after default CFLAGS

2022-02-10 Thread Konstantin Khlebnikov
Flags passed to configure must be at the end to override defaults. Signed-off-by: Konstantin Khlebnikov --- meson.build | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 5f43355071..d94f3ee3e3 100644 --- a/meson.build +++ b

Re: [PATCH] fuzz: pass failures from child process into libfuzzer engine

2022-02-08 Thread Konstantin Khlebnikov
  06.12.2021, 19:35, "Alexander Bulekov" :On 211205 1917, Konstantin Khlebnikov wrote: Fuzzer is supposed to stop when first bug is found and report failure. Present fuzzers fork new child at each iteration to isolate side-effects. But child's exit code is ignored, i.e. libfuzzer d

Re: [PATCH] fuzz: pass failures from child process into libfuzzer engine

2021-12-06 Thread Konstantin Khlebnikov
  06.12.2021, 19:35, "Alexander Bulekov" <alx...@bu.edu>:On 211205 1917, Konstantin Khlebnikov wrote: Fuzzer is supposed to stop when first bug is found and report failure. Present fuzzers fork new child at each iteration to isolate side-effects. But child's exit code is ig

[PATCH] fuzz: pass failures from child process into libfuzzer engine

2021-12-05 Thread Konstantin Khlebnikov
dumps crash-*, but fuzzing continues and ends successfully if global timeout is set. Let's put required logic into helper function "fork_fuzzer_and_wait". Signed-off-by: Konstantin Khlebnikov --- tests/qtest/fuzz/fork_fuzz.c| 26 ++ tests/qt

Re: [Qemu-devel] [PATCH 07/17] mm: madvise MADV_USERFAULT: prepare vm_flags to allow more than 32bits

2014-11-06 Thread Konstantin Khlebnikov
On Fri, Oct 3, 2014 at 9:07 PM, Andrea Arcangeli wrote: > We run out of 32bits in vm_flags, noop change for 64bit archs. What? Again? As I see there are some free bits: 0x200, 0x1000, 0x8 I prefer to reserve 0x0200 for VM_ARCH_2 > > Signed-off-by: Andrea Arcangeli > --- > fs/proc/task

[Qemu-devel] [Bug 521994] Re: Windows 98 doesn't detect mouse on qemu and SeaBIOS.

2010-06-20 Thread Konstantin Khlebnikov
this is fix for other mouse-stuck problem, or maybe the same. ** Attachment added: "fix-mouse-handler-activation" http://launchpadlibrarian.net/50636969/fix-mouse-handler-activation -- Windows 98 doesn't detect mouse on qemu and SeaBIOS. https://bugs.launchpad.net/bugs/521994 You received thi

[Qemu-devel] [PATCH] Fix new mouse handler activation

2010-06-20 Thread Konstantin Khlebnikov
Activate newly added mouse event handles, as it was before commit 6fef28ee6e This patch will at least fix vmmouse, which was broken by that commit. Signed-off-by: Konstantin Khlebnikov --- input.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/input.c b/input.c index