[PATCH v2 01/10] qga/channel-posix: Plug memory leak in ga_channel_write_all()

2020-08-31 Thread Pan Nengyuan
Missing g_error_free on error path in ga_channel_write_all(). Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Li Qiang --- Cc: Michael Roth --- - V2: no changes in v2 --- qga/channel-posix.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/q

[PATCH v2 08/10] blockdev: Fix a memleak in drive_backup_prepare()

2020-08-31 Thread Pan Nengyuan
'local_err' seems forgot to propagate in error path, it'll cause a memleak. Fix it. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Kevin Wolf Reviewed-by: Li Qiang --- Cc: Kevin Wolf Cc: Max Reitz Cc: Markus Armbruster Cc: qemu-bl...@nongnu.org --- - V2: no changes in v2.

[PATCH v2 04/10] target/i386/sev: Plug memleak in sev_read_file_base64

2020-08-31 Thread Pan Nengyuan
Missing g_error_free() in sev_read_file_base64() error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Li Qiang --- Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost --- - v2: no changes in v2 --- target/i386/sev.c | 1 + 1 file changed, 1 inserti

[PATCH v2 02/10] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init

2020-08-31 Thread Pan Nengyuan
Missing g_error_free in QEMU_Elf_init() error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Viktor Prutyanov Reviewed-by: Li Qiang --- Cc: Viktor Prutyanov --- - v2: no changes in v2 --- contrib/elf2dmp/qemu_elf.c | 1 + 1 file changed, 1 insertion(+) dif

[PATCH v2 00/10] fix some error memleaks

2020-08-31 Thread Pan Nengyuan
This series fix some Error/GError memleaks. V2: 1. remove two patches.(One has aleardy applied. The other has fixed.) 2. change patch 5/10 and 7/10. Pan Nengyuan (10): qga/channel-posix: Plug memory leak in ga_channel_write_all() elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init elf2dmp/

[PATCH v2 03/10] elf2dmp/pdb: Plug memleak in pdb_init_from_file

2020-08-31 Thread Pan Nengyuan
Missing g_error_free in pdb_init_from_file() error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Viktor Prutyanov Reviewed-by: Li Qiang --- Cc: Viktor Prutyanov --- - v2: no changes in v2 --- contrib/elf2dmp/pdb.c | 1 + 1 file changed, 1 insertion(+) dif

[PATCH v2 06/10] target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features

2020-08-31 Thread Pan Nengyuan
'err' forgot to free in x86_cpu_class_check_missing_features error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Li Qiang --- Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost --- - V2: no changes in v2. --- target/i386/cpu.c | 1 + 1 file chang

[PATCH v2 09/10] block/file-posix: fix a possible undefined behavior

2020-08-31 Thread Pan Nengyuan
local_err is not initialized to NULL, it will cause a assert error as below: qemu/util/error.c:59: error_setv: Assertion `*errp == NULL' failed. Fixes: c6447510690 Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Stefano Garzarella --- Cc: Kevin Wolf Cc: Max Reitz Cc: Aarushi

[PATCH v2 05/10] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()

2020-08-31 Thread Pan Nengyuan
Receiving error in local variable err, and forgot to free it. This patch check the return value of 'gdk_window_create_gl_context' and 'gdk_gl_context_realize', then free err to fix it. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan --- Cc: Gerd Hoffmann --- V2->V1: check the return value

[PATCH v2 10/10] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string

2020-08-31 Thread Pan Nengyuan
'addr' is forgot to free in vnc_socket_ip_addr_string error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Li Qiang --- Cc: Gerd Hoffmann --- - V2: no changes in v2. --- ui/vnc-auth-sasl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/vnc-auth-sasl.

Re: [PATCH v2 (BROKEN) 0/6] migration: bring improved savevm/loadvm/delvm to QMP

2020-08-31 Thread Markus Armbruster
Kevin Wolf writes: > Am 28.08.2020 um 08:20 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 27.08.2020 um 13:06 hat Markus Armbruster geschrieben: >> >> Daniel P. Berrangé writes: >> >> >> >> > On Wed, Aug 26, 2020 at 07:28:24PM +0100, Daniel P. Berrangé wrote: >> >>

Re: [PATCH v6 19/20] tests/acpi: add microvm test

2020-08-31 Thread Igor Mammedov
On Wed, 26 Aug 2020 12:52:53 +0200 Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > tests/qtest/bios-tables-test.c | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c > index 058ba3886659..883532e5

Re: [PATCH v7 1/8] Introduce yank feature

2020-08-31 Thread Markus Armbruster
Lukas Straub writes: > On Thu, 27 Aug 2020 14:37:00 +0200 > Markus Armbruster wrote: > >> I apologize for not reviewing this much earlier. >> >> Lukas Straub writes: >> >> > The yank feature allows to recover from hanging qemu by "yanking" >> > at various parts. Other qemu systems can registe

Re: [PATCH v6 15/20] x86: move cpu hotplug from pc to x86

2020-08-31 Thread Igor Mammedov
On Wed, 26 Aug 2020 12:52:49 +0200 Gerd Hoffmann wrote: > The cpu hotplug code handles the iniu hotplug is not supported. > > Move the code from pc to x86, so microvm can use it. > > Move both plug and unplug to keep everything in one place, even > though microvm needs plug only. this will con

Re: [PATCH v7 0/8] Generalize start-powered-off property from ARM

2020-08-31 Thread David Gibson
On Wed, Aug 26, 2020 at 02:55:27AM -0300, Thiago Jung Bauermann wrote: > This version fixes `make check` failures in ppc/e500.c, mips/cps.c and > sparc/sun4m.c. This was done by moving the qdev_realize_and_unref() call as > close as possible to the object_new() call, in order to keep the CPU object

Re: [PATCH v6 14/20] x86: move acpi_dev from pc/microvm

2020-08-31 Thread Igor Mammedov
On Wed, 26 Aug 2020 12:52:48 +0200 Gerd Hoffmann wrote: > Both pc and microvm machine types have a acpi_dev field. > Move it to the common base type. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > include/hw/i386/microvm.h | 1 - > include/hw/i386/pc.h | 1 - > i

Re: [PATCH v6 13/20] x86: constify x86_machine_is_*_enabled

2020-08-31 Thread Igor Mammedov
On Wed, 26 Aug 2020 12:52:47 +0200 Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > include/hw/i386/x86.h | 4 ++-- > hw/i386/x86.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/hw/i386/x86.h b/include/hw/

Re: [PATCH 0/7] target/arm: Add vSPE support to KVM guest

2020-08-31 Thread Auger Eric
Hi Haibo, On 8/7/20 10:10 AM, Haibo Xu wrote: > This series add support for SPE(Statistical Profiling Extension)[1] > in KVM guest. It's based on Andrew Murray's kernel KVM patches V2[2], > and has been tested to ensure that guest can use SPE with valid data. > E.g. > > In host: > $ ./qemu-system

Re: [PATCH v6 08/20] microvm/acpi: add minimal acpi support

2020-08-31 Thread Igor Mammedov
On Wed, 26 Aug 2020 12:52:42 +0200 Gerd Hoffmann wrote: > $subject says all. Can be controlled using -M microvm,acpi=on/off. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > hw/i386/acpi-microvm.h| 8 ++ > include/hw/i386/microvm.h | 9 ++ > hw/i386/acpi-microvm.

Re: Meson build on macOS: undefined symbol treatment

2020-08-31 Thread Emmanuel Blot
On 30 Aug 2020, at 11:35, Paolo Bonzini wrote: This is done by "b_lundef=false". I think it was added for modules, but maybe it's not necessary. Emmanuel, can you try removing it (line 3 of meson.build) and seeing if --enable-modules still works for you? Removing this option does restore t

Re: [PATCH 2/2] gitlab: expand test coverage for crypto builds

2020-08-31 Thread Thomas Huth
On 28/08/2020 15.27, Daniel P. Berrangé wrote: > Most jobs test the latest nettle library. This adds explicit coverage > for latest gcrypt using Fedora, and old gcrypt and nettle using > CentOS-7. The latter does a minimal tools-only build, as we only need to > validate that the crypto code builds

Re: [PATCH v2 4/4] pc-bios: s390x: Go into disabled wait when encountering a PGM exception

2020-08-31 Thread Christian Borntraeger
On 27.08.20 11:31, Janosch Frank wrote: > Let's setup a PGM PSW, so we won't load 0s when a program exception > happens. Instead we'll load a disabled wait PSW. Makes sense Reviewed-by: Christian Borntraeger > > Signed-off-by: Janosch Frank > --- > pc-bios/s390-ccw/start.S | 3 +++ > 1 f

Re: [PATCH v2 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-08-31 Thread Dima Stepanov
On Thu, Aug 27, 2020 at 09:44:22PM -0400, Raphael Norwitz wrote: > Generally I’m happy with this. Some comments: > > On Mon, Aug 24, 2020 at 4:40 AM Dima Stepanov wrote: > > > > vhost-user devices can get a disconnect in the middle of the VHOST-USER > > handshake on the migration start. If discon

[PATCH 3/9] vhost-vdpa: remove the unnecessary assert(s->vhost_net)

2020-08-31 Thread Jason Wang
vhost_vdpa_add() can fail before s->vhost_net is set and net_vhost_vdpa_init() can report error. So there's no need for this assert. Let's remove it. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vd

[PATCH 2/9] vhost-vdpa: mandate vhostdev

2020-08-31 Thread Jason Wang
vhost-dev is mandatory for vhost-vdpa to be initialized otherwise net_vhost_vdpa_init will pass an uninitialized pointer to qemu_open() which will lead a SIGSEV: #0 0x55c3a640 in strstart (str=str@entry=0x0, val=val@entry=0x55dbcb65 "/dev/fdset/", ptr=ptr@entry=0x7fffdfb8) at ..

[PATCH 0/9] refine vhost-vdpa initialization

2020-08-31 Thread Jason Wang
Hi all: This series refine vhost-vdpa initialization by: - fixing SIGSEV when vhostdev is not specificed - tweak the codes for vhost-vdpa initialization - allow to accept preopen vhost-vdpa file descriptor Please review. Thanks Jason Wang (9): vhost-vdpa: remove the default devname vhost-v

[PATCH 1/9] vhost-vdpa: remove the default devname

2020-08-31 Thread Jason Wang
The code doesn't have a default vhostdev, so remove the default description in net.json. Signed-off-by: Jason Wang --- qapi/net.json | 1 - 1 file changed, 1 deletion(-) diff --git a/qapi/net.json b/qapi/net.json index ddb113e5e5..a2a94fad3e 100644 --- a/qapi/net.json +++ b/qapi/net.json @@ -43

[PATCH 5/9] vhost-vdpa: remove the unnecessary initialization

2020-08-31 Thread Jason Wang
Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 397d4d3082..bcbf49d55b 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -175,10 +175,10 @@ static NetClientInfo net_vhost_vdpa_

[PATCH 7/9] vhost-vdpa: squash net_vhost_vdpa_init() into net_init_vhost_vdpa()

2020-08-31 Thread Jason Wang
This patch squashes net_vhost_vdpa_init() into net_init_vhost_vdpa(). This will simplify adding pre open file descriptor support. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 41 +++-- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/net/vho

[PATCH 4/9] vhost-vdpa: refine info string

2020-08-31 Thread Jason Wang
We use "vhost-vdpa" as nic info string which is not useful, let's add the vhostdev path. before: info network v0: index=0,type=vhost-vdpa,vhost-vdpa after: info network v0: index=0,type=vhost-vdpa,vhostdev=/dev/vhost-vdpa-0 Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 2 +- 1 file changed,

[PATCH 6/9] vhost-vdpa: remove the unnecessary queue index assignment

2020-08-31 Thread Jason Wang
The nc is allocated through g_malloc0(), so no need to assign its queue_index to zero. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index bcbf49d55b..1d3ac89135 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-

[PULL 08/18] hw/usb: Add U2F key base class implementation

2020-08-31 Thread Gerd Hoffmann
From: César Belley This patch adds the U2F key base class implementation. The U2F key base mainly takes care of the HID interfacing with guest. On the one hand, it retrieves the guest U2FHID packets and transmits them to the variant associated according to the mode: pass-through or emulated. On

[PULL 04/18] ehci: drop pointless warn_report for guest bugs.

2020-08-31 Thread Gerd Hoffmann
We have a tracepoint at the same place which can be enabled if needed. Buglink: https://bugzilla.redhat.com//show_bug.cgi?id=1859236 Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200722072613.10390-1-kra...@redhat.com> --- hw/usb/hcd-ehci.c | 1 - 1 file change

[PATCH 8/9] vhost-vdpa: add accurate error string when fail to open vhost vDPA device

2020-08-31 Thread Jason Wang
This patch adds more accurate error string when fail to open vhost vDPA device. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index f5cc4e8326..9a6f0b63d3 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c

[PULL 02/18] hw: ehci: destroy sglist in error path

2020-08-31 Thread Gerd Hoffmann
From: Li Qiang This may cause resource leak. Signed-off-by: Li Qiang Message-Id: <20200812161712.29361-1-liq...@163.com> Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 1495e8f7fab1..58cceacbf83

[PULL 03/18] hw: ehci: check return value of 'usb_packet_map'

2020-08-31 Thread Gerd Hoffmann
From: Li Qiang If 'usb_packet_map' fails, we should stop to process the usb request. Signed-off-by: Li Qiang Message-Id: <20200812161727.29412-1-liq...@163.com> Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw

[PULL 16/18] hw/usb: Add U2F device autoscan to passthru mode

2020-08-31 Thread Gerd Hoffmann
From: César Belley This patch adds an autoscan to let u2f-passthru choose the first U2F device it finds. The autoscan is performed using libudev with an enumeration of all the hidraw devices present on the host. The first device which happens to be a U2F device is taken to do the passtru. Sign

[PULL 07/18] hw/usb: Add U2F key base class

2020-08-31 Thread Gerd Hoffmann
From: César Belley This patch adds the specification for the U2F key base class. Used to group the common characteristics, this device class will be inherited by its two variants, corresponding to the two modes: passthrough and emulated This prepares the U2F devices hierarchy which is as follow:

[PATCH 9/9] vhost-vdpa: allow pre-opend file descriptor

2020-08-31 Thread Jason Wang
This patch allows to initialize vhost-vdpa network backend with pre opened vhost-vdpa file descriptor. This is useful for running unprivileged qemu through libvirt. Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 24 +++- qapi/net.json

[PULL 18/18] usb: fix setup_len init (CVE-2020-14364)

2020-08-31 Thread Gerd Hoffmann
Store calculated setup_len in a local variable, verify it, and only write it to the struct (USBDevice->setup_len) in case it passed the sanity checks. This prevents other code (do_token_{in,out} functions specifically) from working with invalid USBDevice->setup_len values and overrunning the USBDe

[PULL 17/18] usb-host: workaround libusb bug

2020-08-31 Thread Gerd Hoffmann
libusb_get_device_speed() does not work for libusb_wrap_sys_device() devices in v1.0.23. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1871090 Signed-off-by: Gerd Hoffmann Message-id: 20200824110057.32089-1-kra...@redhat.com --- hw/usb/host-libusb.c | 37 ++

[PULL 10/18] hw/usb: Add U2F key emulated mode

2020-08-31 Thread Gerd Hoffmann
From: César Belley This patch adds the U2F key emulated mode. The emulated mode consists of completely emulating the behavior of a U2F device through software part. Libu2f-emu is used for that. The emulated mode is associated with a device inheriting from u2f-key base. To work, an emulated U2F

Re: [PULL 00/18] Usb 20200828 patches

2020-08-31 Thread Gerd Hoffmann
On Fri, Aug 28, 2020 at 04:33:04PM +0200, Paolo Bonzini wrote: > Il ven 28 ago 2020, 16:14 Peter Maydell ha > scritto: > > > Why is Meson trying to use CMake here? I don't think we want > > to bring in another build tool dependency... > > > > It's asking cmake if it knows about the package, if p

[PULL 15/18] hw/usb: Add U2F device check to passthru mode

2020-08-31 Thread Gerd Hoffmann
From: César Belley This patchs adds a check to verify that the device passed through the hidraw property is a U2F device. The check is done by ensuring that the first values of the report descriptor (USAGE PAGE and USAGE) correspond to those of a U2F device. Signed-off-by: César Belley Message

[PULL 13/18] docs/qdev-device-use.txt: Add USB U2F key to the QDEV devices examples

2020-08-31 Thread Gerd Hoffmann
From: César Belley Signed-off-by: César Belley Message-id: 20200826114209.28821-10-cesar.bel...@lse.epita.fr Signed-off-by: Gerd Hoffmann --- docs/qdev-device-use.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt index f8d0d2fe297a..988

[PULL 01/18] hw: xhci: check return value of 'usb_packet_map'

2020-08-31 Thread Gerd Hoffmann
From: Li Qiang Currently we don't check the return value of 'usb_packet_map', this will cause an UAF issue. This is LP#1891341. Following is the reproducer provided in: -->https://bugs.launchpad.net/qemu/+bug/1891341 cat << EOF | ./i386-softmmu/qemu-system-i386 -device nec-usb-xhci \ -trace usb\

[PULL 11/18] meson: Add U2F key to meson

2020-08-31 Thread Gerd Hoffmann
From: César Belley Signed-off-by: César Belley Message-id: 20200826114209.28821-8-cesar.bel...@lse.epita.fr [ fixes suggested by paolo ] Signed-off-by: Gerd Hoffmann --- configure | 8 +++- meson_options.txt | 1 + hw/usb/Kconfig | 5 + hw/usb/meson.build | 7 +++ m

Re: [PATCH] block: always link with zlib

2020-08-31 Thread Thomas Huth
On 28/08/2020 19.32, Paolo Bonzini wrote: > The qcow2 driver needs the zlib dependency. While emulators > provided it through the migration code, this is not true of > the tools. Move the dependency from the qcow1 rule directly > into block_ss so that it is included unconditionally. > > Fixes bu

[PULL 12/18] docs/system: Add U2F key to the USB devices examples

2020-08-31 Thread Gerd Hoffmann
From: César Belley Signed-off-by: César Belley Message-id: 20200826114209.28821-9-cesar.bel...@lse.epita.fr Signed-off-by: Gerd Hoffmann --- docs/system/usb.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/system/usb.rst b/docs/system/usb.rst index ddfa828d74ae..9a2f1927c451 100

[PULL 00/18] Usb 20200831 patches

2020-08-31 Thread Gerd Hoffmann
The following changes since commit 39335fab59e11cfda9b7cf63929825db2dd3a3e0: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.2-pull-= request' into staging (2020-08-28 22:30:11 +0100) are available in the Git repository at: git://git.kraxel.org/qemu tags/us

Re: [PATCH v2 05/10] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()

2020-08-31 Thread Gerd Hoffmann
On Mon, Aug 31, 2020 at 09:43:10AM -0400, Pan Nengyuan wrote: > Receiving error in local variable err, and forgot to free it. > This patch check the return value of 'gdk_window_create_gl_context' > and 'gdk_gl_context_realize', then free err to fix it. > > Reported-by: Euler Robot > Signed-off-by

[PULL 05/18] hw/usb: Regroup USB HID protocol values

2020-08-31 Thread Gerd Hoffmann
From: César Belley Group some HID values that are used pretty much everywhere when dealing with HID devices. Signed-off-by: César Belley Message-id: 20200812094135.20550-2-cesar.bel...@lse.epita.fr Signed-off-by: Gerd Hoffmann --- include/hw/usb/hid.h | 17 + hw/usb/dev-hid.c

[PULL 09/18] hw/usb: Add U2F key passthru mode

2020-08-31 Thread Gerd Hoffmann
From: César Belley This patch adds the U2F key pass-through mode. The pass-through mode consists of passing all requests made from the guest to the physical security key connected to the host machine and vice versa. In addition, the dedicated pass-through allows to have a U2F security key share

Re: [PATCH v2 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-08-31 Thread Dima Stepanov
On Thu, Aug 27, 2020 at 09:46:03PM -0400, Raphael Norwitz wrote: > On Mon, Aug 24, 2020 at 4:41 AM Dima Stepanov wrote: > > > > If the vhost-user-blk daemon provides only one virtqueue, but device was > > added with several queues, then QEMU will send more VHOST-USER command > > than expected by d

[PULL 14/18] scripts: Add u2f-setup-gen script

2020-08-31 Thread Gerd Hoffmann
From: César Belley This patch adds the script used to generate setup directories, needed for the device u2f-emulated configuration in directory mode: python u2f-setup-gen.py $DIR qemu -usb -device u2f-emulated,dir=$DIR Signed-off-by: César Belley Message-id: 20200826114209.28821-11-ces

[PULL 06/18] docs: Add USB U2F key device documentation

2020-08-31 Thread Gerd Hoffmann
From: César Belley Add USB U2F key device documentation: - USB U2F key device - Building - Using u2f-emulated - Using u2f-passthru - Libu2f-emu Signed-off-by: César Belley Message-id: 20200826114209.28821-3-cesar.bel...@lse.epita.fr Signed-off-by: Gerd Hoffmann --- docs/u2f.txt | 101

Re: [PATCH v2 10/10] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string

2020-08-31 Thread Gerd Hoffmann
On Mon, Aug 31, 2020 at 09:43:15AM -0400, Pan Nengyuan wrote: > 'addr' is forgot to free in vnc_socket_ip_addr_string error path. Fix that. > > Reported-by: Euler Robot > Signed-off-by: Pan Nengyuan > Reviewed-by: Li Qiang > --- > Cc: Gerd Hoffmann added to UI queue. thanks, Gerd

[Bug 1893010] Re: qemu linux-user doesn't support OFD fcntl locks

2020-08-31 Thread Thomas Huth
** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1893010 Title: qemu linux-user doesn't support OFD fcntl locks Status in QEMU: Fix Released

Re: [PATCH] ui: Add more mouse buttons to SPICE

2020-08-31 Thread Gerd Hoffmann
> +[INPUT_BUTTON_SIDE]= 0x40, > +[INPUT_BUTTON_EXTRA] = 0x80, Added to UI patch queue. thanks, Gerd

Re: [PATCH] ui/gtk: Update refresh interval after widget is realized

2020-08-31 Thread Gerd Hoffmann
On Mon, Aug 17, 2020 at 07:23:31PM +0200, Philippe Mathieu-Daudé wrote: > Nikola reported on Windows when gd_vc_gfx_init() is called, the > window is not yet realized, so we run gd_refresh_rate_millihz(NULL) > which returns 0 milli-Hertz. > When a Widget is realized, it fires a 'realized' event. W

[PATCH] configure: do not include ${prefix} in firmwarepath

2020-08-31 Thread Paolo Bonzini
Left out in commit 22a87800e6 ("configure: expand path variables for meson configure", 2020-08-21), do it now. Signed-off-by: Paolo Bonzini --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 56ceca2f68..d15ecbee46 100755 --- a/configure

Re: [PATCH v6 01/12] migration/dirtyrate: setup up query-dirtyrate framwork

2020-08-31 Thread David Edmondson
On Saturday, 2020-08-29 at 10:52:46 +08, Chuan Zheng wrote: > Add get_dirtyrate_thread() functions to setup query-dirtyrate > framework. > > Signed-off-by: Chuan Zheng > Signed-off-by: YanYing Zhuang > Reviewed-by: Dr. David Alan Gilbert Modulo the question below... Reviewed-by: David Edmonds

Re: [PATCH v6 00/12] *** A Method for evaluating dirty page rate ***

2020-08-31 Thread David Edmondson
Trying to think like a control plane developer and user (of which I am neither) raised some questions about the overall interface provided here. If everyone else is happy with the current interface, then I'll shut up :-) It seems like it should be possible to query the last measured dirty rate at

Re: [PATCH v6 03/12] migration/dirtyrate: Add RamblockDirtyInfo to store sampled page info

2020-08-31 Thread David Edmondson
On Saturday, 2020-08-29 at 10:52:48 +08, Chuan Zheng wrote: > Add RamblockDirtyInfo to store sampled page info of each ramblock. > > Signed-off-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson > --- > migration/dirtyrate.h | 18 ++ > 1 file c

Re: [PATCH v6 05/12] migration/dirtyrate: move RAMBLOCK_FOREACH_MIGRATABLE into ram.h

2020-08-31 Thread David Edmondson
On Saturday, 2020-08-29 at 10:52:50 +08, Chuan Zheng wrote: > RAMBLOCK_FOREACH_MIGRATABLE is need in dirtyrate measure, > move the existing definition up into migration/ram.h > > Signed-off-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson > --- > migration/d

Re: [PATCH v6 03/12] migration/dirtyrate: Add RamblockDirtyInfo to store sampled page info

2020-08-31 Thread David Edmondson
On Saturday, 2020-08-29 at 10:52:48 +08, Chuan Zheng wrote: > Add RamblockDirtyInfo to store sampled page info of each ramblock. > > Signed-off-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson > --- > migration/dirtyrate.h | 18 ++ > 1 file c

Re: [PATCH v6 06/12] migration/dirtyrate: Record hash results for each sampled page

2020-08-31 Thread David Edmondson
On Saturday, 2020-08-29 at 10:52:51 +08, Chuan Zheng wrote: > Record hash results for each sampled page, crc32 is taken to calculate > hash results for each sampled length in TARGET_PAGE_SIZE. > > Signed-off-by: Chuan Zheng > Signed-off-by: YanYing Zhuang Reviewed-by: David Edmondson > --- >

Re: [PATCH v6 07/12] migration/dirtyrate: Compare page hash results for recorded sampled page

2020-08-31 Thread David Edmondson
On Saturday, 2020-08-29 at 10:52:52 +08, Chuan Zheng wrote: > Compare page hash results for recorded sampled page. > > Signed-off-by: Chuan Zheng > Signed-off-by: YanYing Zhuang > --- > migration/dirtyrate.c | 63 > +++ > 1 file changed, 63 inser

Re: [PATCH v6 09/12] migration/dirtyrate: Implement set_sample_page_period() and get_sample_page_period()

2020-08-31 Thread David Edmondson
On Saturday, 2020-08-29 at 10:52:54 +08, Chuan Zheng wrote: > Implement set_sample_page_period()/get_sample_page_period() to sleep > specific time between sample actions. > > Signed-off-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson > --- > migration/dirty

Re: [PATCH v6 10/12] migration/dirtyrate: Implement calculate_dirtyrate() function

2020-08-31 Thread David Edmondson
On Saturday, 2020-08-29 at 10:52:55 +08, Chuan Zheng wrote: > Implement calculate_dirtyrate() function. > > Signed-off-by: Chuan Zheng > Signed-off-by: YanYing Zhuang > --- > migration/dirtyrate.c | 45 +++-- > 1 file changed, 43 insertions(+), 2 deletion

Re: [PATCH v6 08/12] migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE

2020-08-31 Thread David Edmondson
On Saturday, 2020-08-29 at 10:52:53 +08, Chuan Zheng wrote: > In order to sample real RAM, skip ramblock with size below MIN_RAMBLOCK_SIZE > which is set as 128M. > > Signed-off-by: Chuan Zheng Minor wordsmithing below, but... Reviewed-by: David Edmondson > --- > migration/dirtyrate.c | 19 +

Re: [PATCH v6 12/12] migration/dirtyrate: Add trace_calls to make it easier to debug

2020-08-31 Thread David Edmondson
On Saturday, 2020-08-29 at 10:52:57 +08, Chuan Zheng wrote: > Add trace_calls to make it easier to debug > > Signed-off-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson > --- > migration/dirtyrate.c | 9 + > migration/trace-events | 8 > 2

[PATCH v3 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-08-31 Thread Dima Stepanov
If the vhost-user-blk daemon provides only one virtqueue, but device was added with several queues, then QEMU will send more VHOST-USER command than expected by daemon side. The vhost_virtqueue_start() routine handles such case by checking the return value from the virtio_queue_get_desc_addr() func

[PATCH v3 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-08-31 Thread Dima Stepanov
vhost-user devices can get a disconnect in the middle of the VHOST-USER handshake on the migration start. If disconnect event happened right before sending next VHOST-USER command, then the vhost_dev_set_log() call in the vhost_migration_log() function will return error. This error will lead to the

[PATCH v3 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-08-31 Thread Dima Stepanov
v2 -> v3: - update commit message for the "vhost: recheck dev state in the vhost_migration_log routine" commit - rename "started" field of the VhostUserBlk structure to "started_vu", so there will be no confustion with the VHOST started field - update vhost-user-test.c to always

[PATCH v3 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class

2020-08-31 Thread Dima Stepanov
For now only vhost-user-net device is supported by the test. Other vhost-user devices are not tested. As a first step make source code refactoring so new devices can reuse the same test routines. To make this provide a new vhost_user_ops structure with the methods to initialize device, its command

[PATCH v3 7/7] tests/qtest/vhost-user-test: enable the reconnect tests

2020-08-31 Thread Dima Stepanov
For now a QTEST_VHOST_USER_FIXME environment variable is used to separate reconnect tests for the vhost-user-net device. Looks like the reconnect functionality is pretty stable, so this separation is deprecated. Remove it and enable these tests for the default run. Signed-off-by: Dima Stepanov --

[PATCH v3 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-08-31 Thread Dima Stepanov
Add support for the vhost-user-blk-pci device. This node can be used by the vhost-user-blk tests. Tests for the vhost-user-blk device are added in the following patches. Signed-off-by: Dima Stepanov --- tests/qtest/libqos/virtio-blk.c | 14 ++ 1 file changed, 14 insertions(+) diff -

[PATCH v3 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device

2020-08-31 Thread Dima Stepanov
Add vhost_user_ops structure for the vhost-user-blk device class. Add the test_reconnect and test_migrate tests for this device. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 139 +- 1 file changed, 137 insertions(+), 2 deletions(-) dif

[PATCH v3 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test

2020-08-31 Thread Dima Stepanov
Add new migrate_reconnect test for the vhost-user-blk device. Perform a disconnect after sending response for the VHOST_USER_SET_LOG_BASE command. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/q

Re: [PATCH 2/2] hw/virtio-pci Added AER capability.

2020-08-31 Thread Yan Vugenfirer
Ping. > On 13 Aug 2020, at 10:19 AM, and...@daynix.com wrote: > > From: Andrew > > Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1857668 > Added AER capability for virtio-pci devices. > Also added property for devices, by default AER is enabled. > > Signed-off-by: Andrew Melnychenko >

Re: [PATCH v6 19/20] tests/acpi: add microvm test

2020-08-31 Thread Gerd Hoffmann
Hi, > > +test_acpi_one(" -machine microvm,acpi=on,rtc=off", > I'm just curious, why rtc is off? Just want to have it set explicitly in the testcase instead of depending on the default. The rtc is listed in the dsdt if present so the switch has an effect on the expected dsdt content. take

Re: [PATCH v6 00/12] *** A Method for evaluating dirty page rate ***

2020-08-31 Thread Zheng Chuan
On 2020/8/31 17:05, David Edmondson wrote: > Trying to think like a control plane developer and user (of which I am > neither) raised some questions about the overall interface provided > here. If everyone else is happy with the current interface, then I'll > shut up :-) > > It seems like it sh

Re: Meson build on macOS: undefined symbol treatment

2020-08-31 Thread Paolo Bonzini
On 31/08/20 10:12, Emmanuel Blot wrote: > >> This is done by "b_lundef=false".  I think it was added for modules, but >> maybe it's not necessary.  Emmanuel, can you try removing it (line 3 of >> meson.build) and seeing if --enable-modules still works for you? > > Removing this option does restor

Re: [PATCH v6 00/12] *** A Method for evaluating dirty page rate ***

2020-08-31 Thread David Edmondson
On Monday, 2020-08-31 at 17:55:39 +08, Zheng Chuan wrote: > On 2020/8/31 17:05, David Edmondson wrote: >> Trying to think like a control plane developer and user (of which I am >> neither) raised some questions about the overall interface provided >> here. If everyone else is happy with the curren

[PATCH] meson: use pkg-config method to find dependencies

2020-08-31 Thread Paolo Bonzini
We do not need to ask cmake for the dependencies, so just use the pkg-config mechanism. Keep "auto" for SDL so that it tries using sdl-config too. Signed-off-by: Paolo Bonzini --- docs/devel/build-system.rst | 6 +++--- meson.build | 8 2 files changed, 7 insertions(+),

[Bug 1893634] [NEW] blk_get_max_transfer() works only with sg

2020-08-31 Thread Tom Yan
Public bug reported: blk_get_max_transfer() is supposed to be able to get the max_sectors queue limit of the scsi device on the host side and is used in both scsi-generic.c (for scsi-generic and scsi-block) and scsi-disk.c (for scsi-hd) to set/change the max_xfer_len (and opt_xfer_len in the case

Re: [PATCH] configure: do not include ${prefix} in firmwarepath

2020-08-31 Thread Marc-André Lureau
On Mon, Aug 31, 2020 at 12:50 PM Paolo Bonzini wrote: > Left out in commit 22a87800e6 ("configure: expand path variables for > meson configure", 2020-08-21), do it now. > > Signed-off-by: Paolo Bonzini > lgtm Reviewed-by: Marc-André Lureau --- > configure | 2 +- > 1 file changed, 1 insert

Re: [PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt()

2020-08-31 Thread Michael S. Tsirkin
On Thu, Aug 13, 2020 at 03:37:02PM +0800, Chen Qun wrote: > Clang static code analyzer show warning: > hw/arm/virt-acpi-build.c:641:5: warning: Value stored to 'madt' is never read > madt = acpi_data_push(table_data, sizeof *madt); > ^ > > Repo

Re: [PATCH 05/11] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions()

2020-08-31 Thread Michael S. Tsirkin
On Thu, Aug 13, 2020 at 03:37:06PM +0800, Chen Qun wrote: > Clang static code analyzer show warning: > hw/virtio/vhost-user.c:606:9: warning: Value stored to 'mr' is never read > mr = vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd); > ^~

Re: [PATCH 06/11] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check()

2020-08-31 Thread Michael S. Tsirkin
On Thu, Aug 13, 2020 at 03:37:07PM +0800, Chen Qun wrote: > Clang static code analyzer show warning: > hw/net/virtio-net.c:2077:5: warning: Value stored to 'tcp_flag' is never read > tcp_flag &= VIRTIO_NET_TCP_FLAG; > ^ ~~~ > > The 'VIRTIO_NET_TCP_FLAG' is '0x3F'.

[PULL 0/5] Ui 20200831 patches

2020-08-31 Thread Gerd Hoffmann
The following changes since commit 39335fab59e11cfda9b7cf63929825db2dd3a3e0: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.2-pull-= request' into staging (2020-08-28 22:30:11 +0100) are available in the Git repository at: git://git.kraxel.org/qemu tags/ui-202

[PULL 4/5] ui: Add more mouse buttons to SPICE

2020-08-31 Thread Gerd Hoffmann
From: Frediano Ziglio Add support for SIDE and EXTRA buttons. The constants for buttons in both SPICE and QEMU are defined as LEFT MIDDLE RIGHT UP DOWN SIDE EXTRA (same order). "button_mask" contains for each bit the state of a button. Qemu currently uses bits 0, 1, 2 respectively

[PULL 2/5] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string

2020-08-31 Thread Gerd Hoffmann
From: Pan Nengyuan 'addr' is forgot to free in vnc_socket_ip_addr_string error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Li Qiang Message-Id: <20200831134315.1221-11-pannengy...@huawei.com> Signed-off-by: Gerd Hoffmann --- ui/vnc-auth-sasl.c | 1 + 1

[PULL 5/5] ui/gtk: Update refresh interval after widget is realized

2020-08-31 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé Nikola reported on Windows when gd_vc_gfx_init() is called, the window is not yet realized, so we run gd_refresh_rate_millihz(NULL) which returns 0 milli-Hertz. When a Widget is realized, it fires a 'realized' event. We already have the gd_draw_event() handler registe

[PULL 1/5] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()

2020-08-31 Thread Gerd Hoffmann
From: Pan Nengyuan Receiving error in local variable err, and forgot to free it. This patch check the return value of 'gdk_window_create_gl_context' and 'gdk_gl_context_realize', then free err to fix it. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Message-Id: <20200831134315.1221-6-pa

[PULL 0/8] Linux user for 5.2 patches

2020-08-31 Thread Laurent Vivier
The following changes since commit 39335fab59e11cfda9b7cf63929825db2dd3a3e0: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.2-pull-= request' into staging (2020-08-28 22:30:11 +0100) are available in the Git repository at: git://github.com/vivier/qemu.git tags/linux-user

[PULL 3/5] meson: fix keymaps witout qemu-keymap

2020-08-31 Thread Gerd Hoffmann
In case the qemu-keymap tool generating them is neither installed on the system nor built from sources (due to xkbcommon not being available) qemu will not find the keymaps when started directly from the build tree, This happens because commit ddcf607fa3d6 ("meson: drop keymaps symlink") removed t

[PULL 1/8] linux-user: Add support for a group of btrfs ioctls used for subvolumes

2020-08-31 Thread Laurent Vivier
From: Filip Bozuta This patch implements functionality of following ioctls: BTRFS_IOC_SUBVOL_CREATE - Creating a btrfs subvolume Create a btrfs subvolume. The subvolume is created using the ioctl's third argument which represents a pointer to a following structure type: struct

Re: [PATCH] meson: use pkg-config method to find dependencies

2020-08-31 Thread Gerd Hoffmann
Hi, > Keep "auto" for SDL so that it tries using > sdl-config too. > - sdl = dependency('sdl2', > - required: get_option('sdl'), > + sdl = dependency('sdl2', required: get_option('sdl'), > + method: 'pkg-config', code and commit message mismatch here. tak

  1   2   3   4   5   >