Re: [PATCH 08/15] spapr: Add a return value to spapr_drc_attach()

2020-09-15 Thread Philippe Mathieu-Daudé
On 9/14/20 2:34 PM, Greg Kurz wrote: > As recommended in "qapi/error.h", return true on success and false on > failure. This allows to reduce error propagation overhead in the callers. > > Signed-off-by: Greg Kurz > --- > include/hw/ppc/spapr_drc.h | 2 +- > hw/ppc/spapr.c | 15

Re: [PATCH v2 2/3] s390x/pci: Honor DMA limits set by vfio

2020-09-15 Thread Thomas Huth
On 15/09/2020 00.29, Matthew Rosato wrote: > When an s390 guest is using lazy unmapping, it can result in a very > large number of oustanding DMA requests, far beyond the default > limit configured for vfio. Let's track DMA usage similar to vfio > in the host, and trigger the guest to flush their

Re: [PATCH v9 00/26] W32, W64 msys2/mingw patches

2020-09-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200915121318.247-1-luoyongg...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200915121318.247-1-luoyongg...@gmail.com Subject: [PATCH v9 00/26] W32, W64

Re: [PATCH v9 04/20] multi-process: setup a machine object for remote device process

2020-09-15 Thread Stefan Hajnoczi
On Thu, Aug 27, 2020 at 11:12:15AM -0700, elena.ufimts...@oracle.com wrote: > From: Jagannathan Raman > > remote-machine object sets up various subsystems of the remote > device process. Instantiate PCI host bridge object and initialize RAM, IO & > PCI memory regions. > > Signed-off-by: John G

Re: [PATCH v8 15/21] x86: move cpu hotplug from pc to x86

2020-09-15 Thread Igor Mammedov
On Tue, 15 Sep 2020 14:09:03 +0200 Gerd Hoffmann wrote: > The cpu hotplug code handles the initialization of coldplugged cpus > too, so it is needed even in case cpu hotplug is not supported. > > Move the code from pc to x86, so microvm can use it. > > Move both plug and unplug to keep

[PATCH] virtio: skip legacy support check on machine types less than 5.1

2020-09-15 Thread Stefano Garzarella
Commit 9b3a35ec82 ("virtio: verify that legacy support is not accidentally on") added a check that returns an error if legacy support is on, but the device is not legacy. Unfortunately some devices were wrongly declared legacy even if they were not (e.g vhost-vsock). To avoid migration issues,

Re: [PATCH] fdc: check null block pointer before blk_pwrite

2020-09-15 Thread P J P
+-- On Thu, 27 Aug 2020, P J P wrote --+ | While transferring data via fdctrl_write_data(), check that | current drive does not have a null block pointer. Avoid | null pointer dereference. | | -> https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Ffdc_nullptr1 | ==1658854==Hint:

Re: [PATCH] pci: check bus pointer before dereference

2020-09-15 Thread P J P
+-- On Thu, 27 Aug 2020, P J P wrote --+ | While mapping IRQ level in pci_change_irq_level() routine, | it does not check if pci_get_bus() returned a valid pointer. | It may lead to a NULL pointer dereference issue. Add check to | avoid it. | | ->

Re: [PATCH] qga/commands-win32: Fix problem with redundant protype declaration

2020-09-15 Thread Philippe Mathieu-Daudé
Cc'ing Marc-André On 9/15/20 1:47 PM, Thomas Huth wrote: > When compiling QEMU with MSYS2 on Windows, there is currently the > following error: > > ../qga/commands-win32.c:62:24: error: redundant redeclaration of > 'CM_Get_DevNode_PropertyW' [-Werror=redundant-decls] >62 | CMAPI CONFIGRET

Re: [PATCH 9/9] piix4: don't reserve hw resources when hotplug is off globally

2020-09-15 Thread Igor Mammedov
On Tue, 15 Sep 2020 17:40:25 +0530 Ani Sinha wrote: > On Tue, Sep 15, 2020 at 5:21 PM Igor Mammedov wrote: > > > > On Mon, 14 Sep 2020 20:20:21 +0530 > > Ani Sinha wrote: > > > > > On Mon, Sep 14, 2020 at 7:39 PM Igor Mammedov > > > wrote: > > > > > > > > On Mon, 14 Sep 2020 18:58:19

Re: [PULL 0/1] seccomp branch queue

2020-09-15 Thread Peter Maydell
are available in the Git repository at: > > git://github.com/otubo/qemu.git tags/pull-seccomp-20200915 > > for you to fetch changes up to e474e3aacf4276eb0781d11c45e2fab996f9dc56: > > seccomp: fix killing of whole process inste

[PATCH v9 26/26] block: enable libnfs on msys2/mingw in cirrus.yml

2020-09-15 Thread Yonggang Luo
At the begging libnfs are not enabled because of compiling error, now it's fixed so enable it Signed-off-by: Yonggang Luo --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml b/.cirrus.yml index 176ccba76c..9566ec0439 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@

[PATCH v9 24/26] ci: Enable msys2 ci in cirrus

2020-09-15 Thread Yonggang Luo
Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be updated. There is no need of --cross-prefix, open mingw64.exe instead of msys2.exe then we don't need the --cross-prefix, besides

[PATCH v9 21/26] tests: Fixes test-qdev-global-props.c

2020-09-15 Thread Yonggang Luo
On win32 the line ending are \r\n, so we skip the \n in function test_dynamic_globalprop Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- tests/test-qdev-global-props.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-qdev-global-props.c

[PATCH v9 23/26] meson: upgrade meson for execute custom ninjatool under msys2 properly

2020-09-15 Thread Yonggang Luo
* Bump versions to 0.55.2 for release * Tag Info: object 008d13038f95e7c7d8ad553f14e408da5b94c360 type commit tag 0.55.2 tagger Jussi Pakkanen 2020/9/11 1:24:47 Signed-off-by: Yonggang Luo --- meson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson b/meson index

[PATCH v9 20/26] tests: fix test-util-sockets.c

2020-09-15 Thread Yonggang Luo
Fixes following errors: Running test test-util-sockets ERROR test-util-sockets - missing test plan # Start of name tests ** ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion failed (fd != -1): (-1 != -1) Bail out!

[PATCH v9 18/26] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c

2020-09-15 Thread Yonggang Luo
This is a fixes for (C:\work\xemu\qemu\build\tests\test-aio-multithread.exe:19100): GLib-CRITICAL **: 23:03:24.965: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed ERROR test-aio-multithread - Bail out! GLib-FATAL-CRITICAL: g_source_remove_poll: assertion '!SOURCE_DESTROYED

[PATCH v9 15/26] cirrus: Building freebsd in a single short

2020-09-15 Thread Yonggang Luo
This reverts commit 45f7b7b9f38f5c4d1529a37c93dedfc26a231bba ("cirrus.yml: Split FreeBSD job into two parts"). freebsd 1 hour limit not hit anymore I think we going to a wrong direction, I think there is some tests a stall the test runner, please look at

[PATCH v9 14/26] vmstate: Fixes test-vmstate.c on msys2/mingw

2020-09-15 Thread Yonggang Luo
The vmstate are valid on win32, just need generate tmp path properly Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé --- tests/test-vmstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v9 13/26] meson: remove empty else and duplicated gio deps

2020-09-15 Thread Yonggang Luo
Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- meson.build | 6 -- 1 file changed, 6 deletions(-) diff --git a/meson.build b/meson.build index 690723b470..23cb1b8742 100644 --- a/meson.build +++ b/meson.build @@ -317,7 +317,6 @@ opengl = not_found if 'CONFIG_OPENGL' in

[PATCH v9 25/26] block: Fixes nfs compiling error on msys2/mingw

2020-09-15 Thread Yonggang Luo
These compiling errors are fixed: ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory 27 | #include | ^~~~ compilation terminated. ../block/nfs.c:63:5: error: unknown type name 'blkcnt_t' 63 | blkcnt_t st_blocks; | ^~~~ ../block/nfs.c:

[PATCH v9 10/26] meson: Use -b to ignore CR vs. CR-LF issues on Windows

2020-09-15 Thread Yonggang Luo
Ideally we would use the '--strip-trailing-cr' option, but not being POSIX is a portability problem (i.e. BSDs and Solaris based OSes). Instead use the '-b' option which, although doing slightly more, produce the expected result on Windows." Signed-off-by: Yonggang Luo Reviewed-by: Eric Blake

[PATCH v9 22/26] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full

2020-09-15 Thread Yonggang Luo
drain_call_rcu is necessary on win32, because under win32, if you don't close the file before remove it, the remove would be fail. Signed-off-by: Yonggang Luo --- tests/test-logging.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test-logging.c b/tests/test-logging.c index

[PATCH v9 12/26] tests: Enable crypto tests under msys2/mingw

2020-09-15 Thread Yonggang Luo
Fixes following tests on msys2/mingw 'test-crypto-tlscredsx509' test-crypto-tlssession' 'test-io-channel-tls' These tests are failure with: ERROR test-crypto-tlscredsx509 - missing test plan ERROR test-crypto-tlssession - missing test plan ERROR test-io-channel-tls - missing test plan Because on

[PATCH v9 08/26] tests: test-replication disable /replication/secondary/* on msys2/mingw.

2020-09-15 Thread Yonggang Luo
They caused failure on msys2/mingw, that's because file-win32.c not implement .bdrv_reopen_prepare/commit/abort yet. This is the error message: > $ ./tests/test-replication.exe > # random seed: R02S3f4d1c01af2b0a046990e0235c481faf > 1..13 > # Start of replication tests > # Start of primary tests

[PATCH v9 07/26] tests: Fixes test-replication.c on msys2/mingw.

2020-09-15 Thread Yonggang Luo
On Windows there is no path like /tmp/s_local_disk.XX Use g_get_tmp_dir instead of /tmp. Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- tests/test-replication.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/test-replication.c

[PATCH v9 11/26] gcrypt: test_tls_psk_init should write binary file instead text file.

2020-09-15 Thread Yonggang Luo
On windows, if open file with "w", it's will automatically convert "\n" to "\r\n" when writing to file. Signed-off-by: Yonggang Luo --- tests/crypto-tls-psk-helpers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/crypto-tls-psk-helpers.c

[PATCH v9 02/26] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-15 Thread Yonggang Luo
The currently random version capstone have the following compiling issue: CC /c/work/xemu/qemu/build/slirp/src/arp_table.o make[1]: *** No rule to make target “/c/work/xemu/qemu/build/capstone/capstone.lib”。 Stop. Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 are the tagged

[PATCH v9 06/26] tests: disable /char/stdio/* tests in test-char.c on win32

2020-09-15 Thread Yonggang Luo
These tests are blocking test-char to be finished. Disable them by using variable is_win32, so we doesn't need macro to open it. and easy recover those function latter. Signed-off-by: Yonggang Luo --- tests/test-char.c | 26 -- 1 file changed, 16 insertions(+), 10

[PATCH v9 09/26] osdep: file locking functions are not available on Win32

2020-09-15 Thread Yonggang Luo
Do not declare the following locking functions on Win32: int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void);

[PATCH v8 07/21] microvm: make virtio irq base runtime configurable

2020-09-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez Reviewed-by: Igor Mammedov --- include/hw/i386/microvm.h | 2 +- hw/i386/microvm.c | 11 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h index

[PATCH v8 04/21] acpi: ged: add control regs

2020-09-15 Thread Gerd Hoffmann
Add control regs (sleep, reset) for hw-reduced acpi. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- include/hw/acpi/generic_event_device.h | 12 +++ hw/acpi/generic_event_device.c | 44 ++ 2 files changed, 56 insertions(+) diff --git

[PATCH v9 19/26] tests: Fixes test-io-channel-file by mask only owner file state mask bits

2020-09-15 Thread Yonggang Luo
This is the error on msys2/mingw Running test test-io-channel-file ** ERROR:../tests/test-io-channel-file.c:59:test_io_channel_file_helper: assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438) ERROR test-io-channel-file - Bail out!

[PATCH v8 15/21] x86: move cpu hotplug from pc to x86

2020-09-15 Thread Gerd Hoffmann
The cpu hotplug code handles the initialization of coldplugged cpus too, so it is needed even in case cpu 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. Signed-off-by:

[PATCH v9 04/26] win32: Simplify gmtime_r detection direct base on _POSIX_THREAD_SAFE_FUNCTIONS.

2020-09-15 Thread Yonggang Luo
First, this reduce the size of configure, configure are tending to removal in future, and this didn't introduce any new feature or remove any exist feature. Second, the current localtime_r detection are conflict with ncursesw detection in mingw, when ncursesw detected, it will provide the

[PATCH v8 09/21] microvm/acpi: add acpi_dsdt_add_virtio() for x86

2020-09-15 Thread Gerd Hoffmann
Makes x86 linux kernel find virtio-mmio devices automatically. Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez Reviewed-by: Igor Mammedov --- hw/i386/acpi-microvm.c | 52 ++ 1 file changed, 52 insertions(+) diff --git a/hw/i386/acpi-microvm.c

[PATCH v9 17/26] tests: Fixes test-io-channel-socket.c tests under msys2/mingw

2020-09-15 Thread Yonggang Luo
Currently test-io-channel-socket doesn't init with qemu_init_main_loop and that's cause the qemu_aio_context not inited, and the following is the stack when null pointer accessed: qemu_fd_register (c:\work\xemu\qemu\util\main-loop.c:336) qemu_try_set_nonblock

[PATCH v8 16/21] microvm: wire up hotplug

2020-09-15 Thread Gerd Hoffmann
The cpu hotplug code handles the initialization of coldplugged cpus too, so it is needed even in case cpu hotplug is not supported. Wire cpu hotplug up for microvm. Without this we get a broken MADT table. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Reviewed-by: Sergio Lopez ---

[PATCH v9 03/26] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-15 Thread Yonggang Luo
The mingw pkg-config are showing following absolute path and contains : as the separator, so we must not use : as path separator. and we know the command line parameter are not likely contains newline, we could use newline as path command line parameter separator -D_XOPEN_SOURCE=600

[PATCH v8 06/21] acpi: move acpi_dsdt_add_power_button() to ged

2020-09-15 Thread Gerd Hoffmann
Allow reuse for microvm. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov --- include/hw/acpi/generic_event_device.h | 1 + hw/acpi/generic_event_device.c | 8 hw/arm/virt-acpi-build.c | 8 3 files changed, 9

[PATCH v9 16/26] tests: Convert g_free to g_autofree macro in test-logging.c

2020-09-15 Thread Yonggang Luo
g_autofree are prefer than g_free when possible. Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- tests/test-logging.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index

[PATCH v8 00/21] microvm: add acpi support

2020-09-15 Thread Gerd Hoffmann
I know that not supporting ACPI in microvm is intentional. If you still don't want ACPI this is perfectly fine, you can use the usual -no-acpi switch to toggle ACPI support. These are the advantages you are going to loose then: (1) virtio-mmio device discovery without command line hacks

[PATCH v8 08/21] microvm/acpi: add minimal acpi support

2020-09-15 Thread Gerd Hoffmann
$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.c| 187 ++ hw/i386/microvm.c

[PATCH v8 14/21] x86: move acpi_dev from pc/microvm

2020-09-15 Thread Gerd Hoffmann
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: Sergio Lopez Reviewed-by: Igor Mammedov --- include/hw/i386/microvm.h | 1 - include/hw/i386/pc.h | 1 - include/hw/i386/x86.h | 1 +

[PATCH v9 05/26] curses: Fixes curses compiling errors.

2020-09-15 Thread Yonggang Luo
This is the compiling error: ../ui/curses.c: In function 'curses_refresh': ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) |

Re: [PATCH 9/9] piix4: don't reserve hw resources when hotplug is off globally

2020-09-15 Thread Ani Sinha
On Tue, Sep 15, 2020 at 5:21 PM Igor Mammedov wrote: > > On Mon, 14 Sep 2020 20:20:21 +0530 > Ani Sinha wrote: > > > On Mon, Sep 14, 2020 at 7:39 PM Igor Mammedov wrote: > > > > > > On Mon, 14 Sep 2020 18:58:19 +0530 > > > Ani Sinha wrote: > > > > > > > On Mon, Sep 14, 2020 at 6:40 PM Ani

[PATCH v8 13/21] x86: constify x86_machine_is_*_enabled

2020-09-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- 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

[PATCH v8 05/21] acpi: ged: add x86 device variant.

2020-09-15 Thread Gerd Hoffmann
Set AcpiDeviceIfClass->madt_cpu, otherwise identical to TYPE_ACPI_GED. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- include/hw/acpi/generic_event_device.h | 4 +++ hw/i386/generic_event_device_x86.c | 36 ++ hw/i386/meson.build|

[PATCH v9 01/26] rcu: Implement drain_call_rcu

2020-09-15 Thread Yonggang Luo
From: Maxim Levitsky This will allow is to preserve the semantics of hmp_device_del, that the device is deleted immediatly which was changed by previos patch that delayed this to RCU callback Signed-off-by: Maxim Levitsky Suggested-by: Stefan Hajnoczi Reviewed-by: Stefan Hajnoczi ---

[PATCH v8 18/21] tests/acpi: allow override blkdev

2020-09-15 Thread Gerd Hoffmann
microvm needs virtio-blk instead of ide. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Reviewed-by: Sergio Lopez --- tests/qtest/bios-tables-test.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c

[PATCH v8 03/21] seabios: add bios-microvm.bin binary

2020-09-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez --- pc-bios/bios-microvm.bin | Bin 0 -> 131072 bytes pc-bios/meson.build | 1 + 2 files changed, 1 insertion(+) create mode 100644 pc-bios/bios-microvm.bin diff --git a/pc-bios/bios-microvm.bin b/pc-bios/bios-microvm.bin new file

[PATCH v8 02/21] seabios: add microvm config, update build rules

2020-09-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez --- roms/Makefile | 5 - roms/config.seabios-microvm | 26 ++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 roms/config.seabios-microvm diff --git a/roms/Makefile

[PATCH v9 00/26] W32, W64 msys2/mingw patches

2020-09-15 Thread Yonggang Luo
V8-V9 * ci: Enable msys2 ci in cirrus do not install libnfs, libcapstone and jemalloc ident lines properly Do not install libnfs when the add the msys2 ci, * Revert "configure: add --ninja option" Skip this revision * block: Fixes nfs compiling error on msys2/mingw Use typedef long

[PATCH v8 10/21] microvm/acpi: use GSI 16-23 for virtio

2020-09-15 Thread Gerd Hoffmann
With ACPI enabled and IO-APIC being properly declared in the ACPI tables we can use interrupt lines 16-23 for virtio and avoid shared interrupts. With acpi disabled we continue to use lines 5-12. Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez Reviewed-by: Igor Mammedov ---

[PATCH v8 19/21] tests/acpi: add microvm test

2020-09-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- 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 1779af1cc889..a9c8d478aee3 100644 ---

[PATCH v8 11/21] microvm/acpi: use seabios with acpi=on

2020-09-15 Thread Gerd Hoffmann
With acpi=off continue to use qboot. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Reviewed-by: Sergio Lopez --- hw/i386/microvm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index ca0c9983f137..54510a03f754 100644

[PATCH v8 17/21] tests/acpi: allow microvm test data updates.

2020-09-15 Thread Gerd Hoffmann
Also add empty test data files. Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/data/acpi/microvm/APIC| 0 tests/data/acpi/microvm/DSDT| 0 tests/data/acpi/microvm/FACP| 0 4 files changed, 3

[PATCH v8 01/21] microvm: name qboot binary qboot.rom

2020-09-15 Thread Gerd Hoffmann
qboot isn't a bios and shouldnt be named that way. Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/microvm.c | 4 ++-- pc-bios/meson.build | 2 +- pc-bios/{bios-microvm.bin => qboot.rom} | Bin

[PATCH v8 20/21] tests/acpi: update expected data files for microvm

2020-09-15 Thread Gerd Hoffmann
Also clear tests/qtest/bios-tables-test-allowed-diff.h Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 3 --- tests/data/acpi/microvm/APIC| Bin 0 -> 70 bytes tests/data/acpi/microvm/DSDT| Bin 0 -> 365 bytes

[PATCH v8 21/21] microvm: enable ramfb

2020-09-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/i386/microvm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 8de8ca864963..60d32722301f 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -39,6 +39,7 @@ #include "hw/timer/i8254.h" #include

[PATCH v8 12/21] microvm/acpi: disable virtio-mmio cmdline hack

2020-09-15 Thread Gerd Hoffmann
... in case we are using ACPI. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Reviewed-by: Sergio Lopez --- hw/i386/microvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 54510a03f754..04209eb38fbe 100644 ---

Re: [PATCH 14/15] spapr: Simplify error handling in spapr_memory_plug()

2020-09-15 Thread Greg Kurz
I've dropped the SPAM mentions from the subject this time :) On Tue, 15 Sep 2020 14:53:53 +0300 Vladimir Sementsov-Ogievskiy wrote: > 15.09.2020 14:43, Greg Kurz wrote: > > On Tue, 15 Sep 2020 13:58:53 +0300 > > Vladimir Sementsov-Ogievskiy wrote: > > > >> 14.09.2020 15:35, Greg Kurz wrote: >

[PATCH v3] cphp: remove deprecated cpu-add command(s)

2020-09-15 Thread Igor Mammedov
These were deprecated since 4.0, remove both HMP and QMP variants. Users should use device_add command instead. To get list of possible CPUs and options, use 'info hotpluggable-cpus' HMP or query-hotpluggable-cpus QMP command. Signed-off-by: Igor Mammedov Reviewed-by: Thomas Huth Acked-by: Dr.

Re: [PULL 00/22] Block patches

2020-09-15 Thread Peter Maydell
On Tue, 15 Sep 2020 at 11:46, Max Reitz wrote: > > The following changes since commit 2d2c73d0e3d504a61f868e46e6abd5643f38091b: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20200914-1' into staging (2020-09-14 > 16:03:08 +0100) > > are available in the Git

[PATCH v2 1/2] fdmon-poll: reset npfd when upgrading to fdmon-epoll

2020-09-15 Thread Stefan Hajnoczi
npfd keeps track of how many pollfds are currently being monitored. It must be reset to 0 when fdmon_poll_wait() returns. When npfd reaches a treshold we switch to fdmon-epoll because it scales better. This patch resets npfd in the case where we switch to fdmon-epoll. Forgetting to do so results

[PATCH v2 0/2] fdmon-poll: reset npfd when upgrading to fdmon-epoll

2020-09-15 Thread Stefan Hajnoczi
v2: * Rebased onto qemu.git/master for meson Fix an assertion failure when aio_poll() is called in a aio_disable_external() region. The failure happens when fdmon-poll is first upgraded to fdmon-epoll and then downgraded again due to aio_disable_external(). Stefan Hajnoczi (2): fdmon-poll:

[PATCH v2 2/2] tests: add test-fdmon-epoll

2020-09-15 Thread Stefan Hajnoczi
Test aio_disable_external(), which switches from fdmon-epoll back to fdmon-poll. This resulted in an assertion failure that was fixed in the previous patch. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 1 + tests/test-fdmon-epoll.c | 73

Re: [PATCH v8 27/27] Revert "configure: add --ninja option"

2020-09-15 Thread Yonggang Luo
On Tue, Sep 15, 2020 at 7:44 PM Thomas Huth wrote: > On 13/09/2020 16.08, Paolo Bonzini wrote: > > On 13/09/20 00:44, Yonggang Luo wrote: > >> This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41. > >> > >> The --ninja option doesn't need anymore because of upgrade meson to > 0.55.2 > >>

Re: [SPAM] Re: [PATCH 14/15] spapr: Simplify error handling in spapr_memory_plug()

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
15.09.2020 14:43, Greg Kurz wrote: On Tue, 15 Sep 2020 13:58:53 +0300 Vladimir Sementsov-Ogievskiy wrote: 14.09.2020 15:35, Greg Kurz wrote: As recommended in "qapi/error.h", add a bool return value to spapr_add_lmbs() and spapr_add_nvdimm(), and use them instead of local_err in

Re: Potential regression in 'qemu-img convert' to LVM

2020-09-15 Thread Stefan Reiter
On 9/15/20 11:08 AM, Nir Soffer wrote: On Mon, Sep 14, 2020 at 3:25 PM Stefan Reiter wrote: Hi list, following command fails since 5.1 (tested on kernel 5.4.60): # qemu-img convert -p -f raw -O raw /dev/zvol/pool/disk-1 /dev/vg/disk-1 qemu-img: error while writing at byte 2157968896: Device

Re: [PATCH 9/9] piix4: don't reserve hw resources when hotplug is off globally

2020-09-15 Thread Igor Mammedov
On Mon, 14 Sep 2020 20:20:21 +0530 Ani Sinha wrote: > On Mon, Sep 14, 2020 at 7:39 PM Igor Mammedov wrote: > > > > On Mon, 14 Sep 2020 18:58:19 +0530 > > Ani Sinha wrote: > > > > > On Mon, Sep 14, 2020 at 6:40 PM Ani Sinha wrote: > > > > > > > > On Mon, Sep 14, 2020 at 6:36 PM Igor

[PATCH] qga/commands-win32: Fix problem with redundant protype declaration

2020-09-15 Thread Thomas Huth
When compiling QEMU with MSYS2 on Windows, there is currently the following error: ../qga/commands-win32.c:62:24: error: redundant redeclaration of 'CM_Get_DevNode_PropertyW' [-Werror=redundant-decls] 62 | CMAPI CONFIGRET WINAPI CM_Get_DevNode_PropertyW( |

Re: [PATCH v8 27/27] Revert "configure: add --ninja option"

2020-09-15 Thread Thomas Huth
On 13/09/2020 16.08, Paolo Bonzini wrote: > On 13/09/20 00:44, Yonggang Luo wrote: >> This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41. >> >> The --ninja option doesn't need anymore because of upgrade meson to 0.55.2 >> At that version we can use ninjatool > > We might actually get

[PATCH v4 9/9] migration: introduce snapshot-{save, load, delete} QMP commands

2020-09-15 Thread Daniel P . Berrangé
savevm, loadvm and delvm are some of the few HMP commands that have never been converted to use QMP. The reasons for the lack of conversion are that they blocked execution of the event thread, and the semantics around choice of disks were ill-defined. Despite this downside, however, libvirt and

Re: [SPAM] Re: [PATCH 14/15] spapr: Simplify error handling in spapr_memory_plug()

2020-09-15 Thread Greg Kurz
On Tue, 15 Sep 2020 13:58:53 +0300 Vladimir Sementsov-Ogievskiy wrote: > 14.09.2020 15:35, Greg Kurz wrote: > > As recommended in "qapi/error.h", add a bool return value to > > spapr_add_lmbs() and spapr_add_nvdimm(), and use them instead > > of local_err in spapr_memory_plug(). > > > > Since

[PATCH v4 7/9] migration: introduce a delete_snapshot wrapper

2020-09-15 Thread Daniel P . Berrangé
Make snapshot deletion consistent with the snapshot save and load commands by using a wrapper around the blockdev layer. The main difference is that we get upfront validation of the passed in device list (if any). Signed-off-by: Daniel P. Berrangé --- include/migration/snapshot.h | 4 +++-

[PATCH v4 5/9] migration: control whether snapshots are ovewritten

2020-09-15 Thread Daniel P . Berrangé
The traditional HMP "savevm" command will overwrite an existing snapshot if it already exists with the requested name. This new flag allows this to be controlled allowing for safer behaviour with a future QMP command. Signed-off-by: Daniel P. Berrangé --- include/migration/snapshot.h | 2 +-

[PATCH v4 6/9] migration: wire up support for snapshot device selection

2020-09-15 Thread Daniel P . Berrangé
Modify load_snapshot/save_snapshot to accept the device list and vmstate node name parameters previously added to the block layer. Signed-off-by: Daniel P. Berrangé --- include/migration/snapshot.h | 12 ++-- migration/savevm.c | 24 ++-- monitor/hmp-cmds.c

[PATCH v4 8/9] iotests: add support for capturing and matching QMP events

2020-09-15 Thread Daniel P . Berrangé
When using the _launch_qemu and _send_qemu_cmd functions from common.qemu, any QMP events get mixed in with the output from the commands and responses. This makes it difficult to write a test case as the ordering of events in the output is not stable. This introduces a variable 'capture_events'

[PATCH v4 1/9] block: push error reporting into bdrv_all_*_snapshot functions

2020-09-15 Thread Daniel P . Berrangé
The bdrv_all_*_snapshot functions return a BlockDriverState pointer for the invalid backend, which the callers then use to report an error message. In some cases multiple callers are reporting the same error message, but with slightly different text. In the future there will be more error

[PATCH v4 3/9] block: add ability to specify list of blockdevs during snapshot

2020-09-15 Thread Daniel P . Berrangé
When running snapshot operations, there are various rules for which blockdevs are included/excluded. While this provides reasonable default behaviour, there are scenarios that are not well handled by the default logic. Some of the conditions do not have a single correct answer. Thus there needs

[PATCH v4 0/9] migration: bring improved savevm/loadvm/delvm to QMP

2020-09-15 Thread Daniel P . Berrangé
v1: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg00866.html v2: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg07523.html v3: https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg07076.html This series aims to provide a better designed replacement for the

[PATCH v4 2/9] migration: stop returning errno from load_snapshot()

2020-09-15 Thread Daniel P . Berrangé
None of the callers care about the errno value since there is a full Error object populated. This gives consistency with save_snapshot() which already just returns -1. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé --- migration/savevm.c | 17 - 1 file

[PATCH v4 4/9] block: allow specifying name of block device for vmstate storage

2020-09-15 Thread Daniel P . Berrangé
Currently the vmstate will be stored in the first block device that supports snapshots. Historically this would have usually been the root device, but with UEFI it might be the variable store. There needs to be a way to override the choice of block device to store the state in. Signed-off-by:

Re: [PATCH v2 2/3] s390x/pci: Honor DMA limits set by vfio

2020-09-15 Thread Cornelia Huck
On Mon, 14 Sep 2020 18:29:29 -0400 Matthew Rosato wrote: > When an s390 guest is using lazy unmapping, it can result in a very > large number of oustanding DMA requests, far beyond the default > limit configured for vfio. Let's track DMA usage similar to vfio > in the host, and trigger the

Re: [PATCH 0/3] configure: add missing CONFIG_FOO variables

2020-09-15 Thread Stefan Hajnoczi
On Mon, Sep 14, 2020 at 12:50:23PM +0200, Paolo Bonzini wrote: > On 14/09/20 11:52, Stefan Hajnoczi wrote: > > The meson.build feature summary checks the presence of CONFIG_FOO variables. > > Several of these variables are never emitted by ./configure so the feature > > summary always shows these

Re: [PATCH 13/15] spapr: Add a return value to spapr_check_pagesize()

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
14.09.2020 15:35, Greg Kurz wrote: As recommended in "qapi/error.h", return true on success and false on failure. This allows to reduce error propagation overhead in the callers. Signed-off-by: Greg Kurz Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [SPAM] Re: [PATCH 05/15] spapr: Get rid of cas_check_pvr() error reporting

2020-09-15 Thread Greg Kurz
On Tue, 15 Sep 2020 13:03:13 +0300 Vladimir Sementsov-Ogievskiy wrote: > 14.09.2020 15:34, Greg Kurz wrote: > > The cas_check_pvr() function has two purposes: > > - finding the "best" logical PVR, ie. the most recent one supported by > >the guest for this CPU type > > - checking if the guest

[PULL 22/22] block/rbd: add 'namespace' to qemu_rbd_strong_runtime_opts[]

2020-09-15 Thread Max Reitz
From: Stefano Garzarella Commit 19ae9ae014 ("block/rbd: Add support for ceph namespaces") introduced namespace support for RBD, but we forgot to add the new 'namespace' options to qemu_rbd_strong_runtime_opts[]. The 'namespace' is used to identify the image, so it is a strong option since it

[PULL 20/22] qcow2: Make preallocate_co() resize the image to the correct size

2020-09-15 Thread Max Reitz
From: Alberto Garcia This function preallocates metadata structures and then extends the image to its new size, but that new size calculation is wrong because it doesn't take into account that the host_offset variable is always cluster-aligned. This problem can be reproduced with

Re: [PATCH 14/15] spapr: Simplify error handling in spapr_memory_plug()

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
14.09.2020 15:35, Greg Kurz wrote: As recommended in "qapi/error.h", add a bool return value to spapr_add_lmbs() and spapr_add_nvdimm(), and use them instead of local_err in spapr_memory_plug(). Since object_property_get_uint() only returns 0 on failure, use that as well. Why are you sure?

[PULL 15/22] qcow2: Handle QCowL2Meta on error in preallocate_co()

2020-09-15 Thread Max Reitz
From: Alberto Garcia If qcow2_alloc_cluster_offset() or qcow2_alloc_cluster_link_l2() fail then this function simply returns the error code, potentially leaking the QCowL2Meta structure and leaving stale items in s->cluster_allocs. A second problem is that this function calls

Re: About 'qemu-security' mailing list

2020-09-15 Thread P J P
Hello, +-- On Fri, 11 Sep 2020, Peter Maydell wrote --+ | Way way back, the idea of a qemu-security list was proposed, and it was | decided against because there wasn't a clear way that people could send | encrypted mail to the security team if it was just a mailing list. So that's | why we

[PULL 21/22] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset()

2020-09-15 Thread Max Reitz
From: Alberto Garcia qcow2_alloc_cluster_offset() takes an (unaligned) guest offset and returns the (aligned) offset of the corresponding cluster in the qcow2 image. In practice none of the callers need to know where the cluster starts so this patch makes the function calculate and return the

[PULL 12/22] qemu-img: Explicit number replaced by a constant

2020-09-15 Thread Max Reitz
From: Yi Li Signed-off-by: Yi Li Message-Id: <20200819013607.32280-1-y...@winhong.com> Reviewed-by: Alberto Garcia Reviewed-by: Stefano Garzarella Signed-off-by: Max Reitz --- qemu-img.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c

[PULL 10/22] qcow2: Don't check nb_clusters when removing l2meta from the list

2020-09-15 Thread Max Reitz
From: Alberto Garcia In the past, when a new cluster was allocated the l2meta structure was a variable in the stack so it was necessary to have a way to tell whether it had been initialized and contained valid data or not. The nb_clusters field was used for this purpose. Since commit f50f88b9fe

[PULL 18/22] block/rbd: remove runtime_opts

2020-09-15 Thread Max Reitz
From: John Snow This saw its last use in 4bfb274165ba. Signed-off-by: John Snow Message-Id: <20200806211345.2925343-2-js...@redhat.com> Signed-off-by: Max Reitz --- block/rbd.c | 42 -- 1 file changed, 42 deletions(-) diff --git a/block/rbd.c

[PULL 08/22] qcow2: Use macros for the L1, refcount and bitmap table entry sizes

2020-09-15 Thread Max Reitz
From: Alberto Garcia This patch replaces instances of sizeof(uint64_t) in the qcow2 driver with macros that indicate what those sizes are actually referring to. Signed-off-by: Alberto Garcia Message-Id: <20200828110828.13833-1-be...@igalia.com> Signed-off-by: Max Reitz --- block/qcow2.h

Re: [qemu-web PATCH] Add virtio-blk and virtio-scsi configuration post

2020-09-15 Thread Daniel P . Berrangé
On Tue, Sep 15, 2020 at 11:34:06AM +0100, Stefan Hajnoczi wrote: > The second post in the storage series covers virtio-blk and virtio-scsi. > It compares the two and offers recommendations that users and tools > using QEMU can use as a starting point. Graphs are included comparing > the

[PULL 13/22] iotests: Skip test_stream_parallel in test 030 when doing "make check"

2020-09-15 Thread Max Reitz
From: Thomas Huth The test_stream_parallel test still occasionally fails in the CI. Thus let's disable it during "make check" for now so that it does not cause trouble during merge tests. We can enable it again once the problem has been resolved. Signed-off-by: Thomas Huth Message-Id:

<    1   2   3   4   5   >