Re: [PULL v4 30/83] virtio: core: vq reset feature negotation support

2022-11-21 Thread Stefano Garzarella
On Mon, Nov 21, 2022 at 02:07:41AM -0500, Michael S. Tsirkin wrote: On Mon, Nov 21, 2022 at 02:17:02PM +0800, Jason Wang wrote: On Sun, Nov 20, 2022 at 1:19 AM Michael S. Tsirkin wrote: > > On Fri, Nov 18, 2022 at 03:32:56PM +0100, Stefano Garzarella wrote: > > Hi, > > starting from this commit

Re: [PATCH v4 01/11] block-copy: add missing coroutine_fn annotations

2022-11-21 Thread Emanuele Giuseppe Esposito
Am 18/11/2022 um 20:05 schrieb Kevin Wolf: > Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: >> These functions end up calling bdrv_common_block_status_above(), a >> generated_co_wrapper function. >> In addition, they also happen to be always called in coroutine context, >> me

Re: [PATCH 1/2] qga:/qga-win: adding a empty PCI address creation function

2022-11-21 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Sun, Nov 20, 2022 at 4:09 PM Kfir Manor wrote: > Refactoring code to avoid duplication of creating an empty PCI address > code. > > Signed-off-by: Kfir Manor > --- > qga/commands-win32.c | 20 +--- > 1 file changed, 13 insertions(+), 7 deleti

Re: [PATCH 2/2] qga:/qga-win: skip getting pci info for USB disks

2022-11-21 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Sun, Nov 20, 2022 at 4:01 PM Kfir Manor wrote: > Skip getting PCI info from disks type USB and give them an empty PCI > address instead. > > Signed-off-by: Kfir Manor > --- > qga/commands-win32.c | 12 > 1 file changed, 8 insertions(+), 4 deleti

[PATCH 00/10] Cleanups around error_propagate() and ERRP_GUARD()

2022-11-21 Thread Markus Armbruster
Markus Armbruster (10): error: Drop some obviously superfluous error_propagate() error: Drop a few superfluous ERRP_GUARD() error: Move ERRP_GUARD() to the beginning of the function monitor: Simplify monitor_fd_param()'s error handling monitor: Use ERRP_GUARD() in monitor_init() qemu-co

[PATCH 05/10] monitor: Use ERRP_GUARD() in monitor_init()

2022-11-21 Thread Markus Armbruster
Cc: Dr. David Alan Gilbert Signed-off-by: Markus Armbruster --- monitor/monitor.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/monitor/monitor.c b/monitor/monitor.c index 86949024f6..7ed7bd5342 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -711,8 +

[PATCH 03/10] error: Move ERRP_GUARD() to the beginning of the function

2022-11-21 Thread Markus Armbruster
include/qapi/error.h advises to put ERRP_GUARD() right at the beginning of the function, because only then can it guard the whole function. Clean up the few spots disregarding the advice. Signed-off-by: Markus Armbruster --- hw/arm/armsse.c| 3 +-- hw/core/machine.c | 3 +-- hw/vir

[PATCH 07/10] qemu-config: Use ERRP_GUARD() where obviously appropriate

2022-11-21 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- util/qemu-config.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/util/qemu-config.c b/util/qemu-config.c index e983607b46..8c907fa83b 100644 --- a/util/qemu-config.c +++ b/util/qemu-config.c @@ -318,9 +318,9 @@ void qemu_add_opts(Q

[PATCH 02/10] error: Drop a few superfluous ERRP_GUARD()

2022-11-21 Thread Markus Armbruster
include/qapi/error.h on ERRP_GUARD(): * It must be used when the function dereferences @errp or passes * @errp to error_prepend(), error_vprepend(), or error_append_hint(). * It is safe to use even when it's not needed, but please avoid * cluttering the source with useless code. Clean up some

[PATCH 06/10] qemu-config: Make config_parse_qdict() return bool

2022-11-21 Thread Markus Armbruster
This simplifies error checking. Cc: Hanna Reitz Signed-off-by: Markus Armbruster --- include/qemu/config-file.h | 2 +- block/blkdebug.c | 4 +--- util/qemu-config.c | 39 ++ 3 files changed, 20 insertions(+), 25 deletions(-) diff --git a

[PATCH 08/10] sockets: Use ERRP_GUARD() where obviously appropriate

2022-11-21 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- util/qemu-sockets.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index d185245023..6538859b87 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -210,7 +21

Re: [PATCH v4 01/11] block-copy: add missing coroutine_fn annotations

2022-11-21 Thread Emanuele Giuseppe Esposito
Am 21/11/2022 um 09:32 schrieb Emanuele Giuseppe Esposito: > > > Am 18/11/2022 um 20:05 schrieb Kevin Wolf: >> Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: >>> These functions end up calling bdrv_common_block_status_above(), a >>> generated_co_wrapper function. >>> In add

[PATCH 10/10] io: Tidy up fat-fingered parameter name

2022-11-21 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/io/channel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/io/channel.h b/include/io/channel.h index c680ee7480..f1b7e05f81 100644 --- a/include/io/channel.h +++ b/include/io/channel.h @@ -350,7 +350,7 @@ int qio_channel_r

[PATCH 04/10] monitor: Simplify monitor_fd_param()'s error handling

2022-11-21 Thread Markus Armbruster
Cc: Dr. David Alan Gilbert Signed-off-by: Markus Armbruster --- monitor/misc.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/monitor/misc.c b/monitor/misc.c index 205487e2b9..83d7f4ffde 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -1086,6 +1086,7 @@ i

[PATCH 09/10] qapi: Use returned bool to check for failure (again)

2022-11-21 Thread Markus Armbruster
Commit 012d4c96e2 changed the visitor functions taking Error ** to return bool instead of void, and the commits following it used the new return value to simplify error checking. Since then a few more uses in need of the same treatment crept in. Do that. All pretty mechanical except for * ballo

[PATCH 01/10] error: Drop some obviously superfluous error_propagate()

2022-11-21 Thread Markus Armbruster
When error_propagate(errp, local_err) is the only reader of @local_err, we can just as well change its writers to write @errp directly, and drop the error_propagate() along with @local_err. Signed-off-by: Markus Armbruster --- hw/arm/virt.c| 14 +- hw/hyperv/vmbus.c| 8 +

Re: [PATCH for-8.0 1/7] qemu/main-loop: Introduce QEMU_IOTHREAD_LOCK_GUARD

2022-11-21 Thread Alex Bennée
Richard Henderson writes: > On 11/18/22 05:30, Alex Bennée wrote: >> Richard Henderson writes: >> >>> Create a wrapper for locking/unlocking the iothread lock. >>> >>> Signed-off-by: Richard Henderson >>> --- >>> Cc: Paolo Bonzini (maintainer:Main loop) >> You might want to review Paolo's c

[PATCH] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

2022-11-21 Thread Stefano Garzarella
Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support") enabled VIRTIO_F_RING_RESET by default for all virtio devices. This feature is not currently emulated by QEMU, so for vhost and vhost-user devices we need to make sure it is supported by the offloaded device emulation (in-kern

[PATCH] tests/avocado: Update the URLs of the advent calendar images

2022-11-21 Thread Thomas Huth
The qemu-advent-calendar.org server will be decommissioned soon. I've mirrored the images that we use for the QEMU CI to gitlab, so update their URLs to point to the new location. Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 4 +-- tests/avocado/machine_arm_canona110

[PATCH 1/4] better kvm detection

2022-11-21 Thread Gerd Hoffmann
In case kvm emulates features of another hypervisor (for example hyperv) two VMM CPUID blocks will be present, one for the emulated hypervisor and one for kvm itself. This patch makes seabios loop over the VMM CPUID blocks to make sure it will properly detect kvm when multiple blocks are present.

[PATCH 2/4] detect physical address space size

2022-11-21 Thread Gerd Hoffmann
Check for pae and long mode using cpuid. If present also read the physical address bits. Apply some qemu sanity checks (see below). Record results in PhysBits and LongMode variables. In case we are not sure what the address space size is leave the PhysBits variable unset. On qemu we have the pr

[PATCH 4/4] be less conservative with the 64bit pci io window

2022-11-21 Thread Gerd Hoffmann
Current seabios code will only enable and use the 64bit pci io window in case it runs out of space in the 32bit pci mmio window below 4G. This patch will also enable the 64bit pci io window when (a) RAM above 4G is present, and (b) the physical address space size is known, and (c) seabios is

[PATCH 0/4] misc tweaks for kvm and the 64bit pci window

2022-11-21 Thread Gerd Hoffmann
Gerd Hoffmann (4): better kvm detection detect physical address space size move 64bit pci window to end of address space be less conservative with the 64bit pci io window src/fw/paravirt.h | 2 ++ src/fw/paravirt.c | 87 ++- src/fw/pciinit.c

[PATCH 3/4] move 64bit pci window to end of address space

2022-11-21 Thread Gerd Hoffmann
When the size of the physical address space is known (PhysBits is not zero) move the 64bit pci io window to the end of the address space. Signed-off-by: Gerd Hoffmann --- src/fw/pciinit.c | 8 1 file changed, 8 insertions(+) diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index badf13

Re: [PATCH for-8.0 3/7] target/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in ppc_maybe_interrupt

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:18, Richard Henderson wrote: Signed-off-by: Richard Henderson --- Cc: qemu-...@nongnu.org --- target/ppc/excp_helper.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH for-8.0 2/7] hw/mips: Use QEMU_IOTHREAD_LOCK_GUARD in cpu_mips_irq_request

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:18, Richard Henderson wrote: Signed-off-by: Richard Henderson --- Cc: Philippe Mathieu-Daudé Cc: Jiaxun Yang --- hw/mips/mips_int.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c index 2db5e10fe0..73437c

Re: [PATCH for-8.0 5/7] target/riscv: Use QEMU_IOTHREAD_LOCK_GUARD in riscv_cpu_update_mip

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:18, Richard Henderson wrote: Signed-off-by: Richard Henderson --- Cc: Alistair Francis Cc: Bin Meng Cc: qemu-ri...@nongnu.org --- target/riscv/cpu_helper.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH for-8.0 4/7] target/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in cpu_interrupt_exittb

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:18, Richard Henderson wrote: In addition, use tcg_enabled instead of !kvm_enabled. Signed-off-by: Richard Henderson --- Cc: qemu-...@nongnu.org --- target/ppc/helper_regs.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) Reviewed-by: Philippe Mathieu-Da

Re: [SeaBIOS] [PATCH 3/4] move 64bit pci window to end of address space

2022-11-21 Thread Paul Menzel
Dear Gerd, Thank you for the patch. Am 21.11.22 um 11:32 schrieb Gerd Hoffmann: When the size of the physical address space is known (PhysBits is not zero) move the 64bit pci io window to the end of the address space. It’d be great, if you elaborated, why this is an improvement. Kind regar

Re: [PATCH for-8.0 6/7] hw/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in ppc_set_irq

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:18, Richard Henderson wrote: Signed-off-by: Richard Henderson --- Cc: qemu-...@nongnu.org --- hw/ppc/ppc.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] target/arm: build smbios 19 table

2022-11-21 Thread Peter Maydell
On Sun, 20 Nov 2022 at 17:53, Mihai Carabas wrote: > > La 18.11.2022 21:11, Peter Maydell a scris: > > On Fri, 18 Nov 2022 at 17:37, Mihai Carabas > > wrote: > >> Use the base_memmap to build the SMBIOS 19 table which provides the address > >> mapping for a Physical Memory Array (from spec [1] c

Re: [PATCH for-8.0 7/7] accel/tcg: Use QEMU_IOTHREAD_LOCK_GUARD in io_readx/io_writex

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:18, Richard Henderson wrote: Narrow the scope of the lock to the actual read/write, moving the cpu_transation_failed call outside the lock. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-)

Re: [PATCH 2/3] i386: kvm: disable KVM_CAP_PMU_CAPABILITY if "pmu" is disabled

2022-11-21 Thread Greg Kurz
On Sat, 19 Nov 2022 04:29:00 -0800 Dongli Zhang wrote: > The "perf stat" at the VM side still works even we set "-cpu host,-pmu" in > the QEMU command line. That is, neither "-cpu host,-pmu" nor "-cpu EPYC" > could disable the pmu virtualization in an AMD environment. > > We still see below at V

[PATCH] multifd: Updated QAPI format for 'migrate' qemu monitor command

2022-11-21 Thread Het Gala
To prevent double data encoding of uris, instead of passing transport mechanisms, host address and port all together in form of a single string and writing different parsing functions, we intend the user to explicitly mention most of the parameters through the medium of qmp command itself. The cur

Re: [PATCH for-8.0 1/7] qemu/main-loop: Introduce QEMU_IOTHREAD_LOCK_GUARD

2022-11-21 Thread Philippe Mathieu-Daudé
On 21/11/22 10:55, Alex Bennée wrote: Richard Henderson writes: On 11/18/22 05:30, Alex Bennée wrote: Richard Henderson writes: Create a wrapper for locking/unlocking the iothread lock. Signed-off-by: Richard Henderson --- Cc: Paolo Bonzini (maintainer:Main loop) You might want to rev

Re: [PATCH] tests/avocado: Update the URLs of the advent calendar images

2022-11-21 Thread Philippe Mathieu-Daudé
On 21/11/22 11:24, Thomas Huth wrote: The qemu-advent-calendar.org server will be decommissioned soon. I've mirrored the images that we use for the QEMU CI to gitlab, so update their URLs to point to the new location. Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 4

Re: [PATCH 01/10] error: Drop some obviously superfluous error_propagate()

2022-11-21 Thread Philippe Mathieu-Daudé
On 21/11/22 09:50, Markus Armbruster wrote: When error_propagate(errp, local_err) is the only reader of @local_err, we can just as well change its writers to write @errp directly, and drop the error_propagate() along with @local_err. Signed-off-by: Markus Armbruster --- hw/arm/virt.c|

Re: [PATCH 03/10] error: Move ERRP_GUARD() to the beginning of the function

2022-11-21 Thread Philippe Mathieu-Daudé
On 21/11/22 09:50, Markus Armbruster wrote: include/qapi/error.h advises to put ERRP_GUARD() right at the beginning of the function, because only then can it guard the whole function. Clean up the few spots disregarding the advice. Signed-off-by: Markus Armbruster --- hw/arm/armsse.c

Re: [PATCH 10/10] io: Tidy up fat-fingered parameter name

2022-11-21 Thread Philippe Mathieu-Daudé
On 21/11/22 09:50, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- include/io/channel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 09/10] qapi: Use returned bool to check for failure (again)

2022-11-21 Thread Philippe Mathieu-Daudé
On 21/11/22 09:50, Markus Armbruster wrote: Commit 012d4c96e2 changed the visitor functions taking Error ** to return bool instead of void, and the commits following it used the new return value to simplify error checking. Since then a few more uses in need of the same treatment crept in. Do th

Re: [PATCH] gtk: disable GTK Clipboard with a new option 'gtk_clipboard'

2022-11-21 Thread Claudio Fontana
On 11/18/22 23:26, Jim Fehlig wrote: > I should make myself useful around here on occasion when items are within my > skill set. But I already struggle to find time for that in the libvirt > community > :-). Thanks for taking a look, > > On 11/8/22 09:23, Claudio Fontana wrote: >> The GTK Clip

Re: [PATCH] target/arm: build smbios 19 table

2022-11-21 Thread Mihai Carabas
La 21.11.2022 13:02, Peter Maydell a scris: On Sun, 20 Nov 2022 at 17:53, Mihai Carabas wrote: La 18.11.2022 21:11, Peter Maydell a scris: On Fri, 18 Nov 2022 at 17:37, Mihai Carabas wrote: Use the base_memmap to build the SMBIOS 19 table which provides the address mapping for a Physical Mem

Re: [RFC PATCH 1/1] Dirty quota-based throttling of vcpus

2022-11-21 Thread Philippe Mathieu-Daudé
Hi, On 20/11/22 23:54, Shivam Kumar wrote: Introduces a (new) throttling scheme where QEMU defines a limit on the dirty rate of each vcpu of the VM. This limit is enfored on the vcpus in small intervals (dirty quota intervals) by allowing the vcpus to dirty only as many pages in these intervals

Re: [PATCH] target/arm: build smbios 19 table

2022-11-21 Thread Peter Maydell
On Mon, 21 Nov 2022 at 11:24, Mihai Carabas wrote: > > La 21.11.2022 13:02, Peter Maydell a scris: > > On Sun, 20 Nov 2022 at 17:53, Mihai Carabas > > wrote: > >> La 18.11.2022 21:11, Peter Maydell a scris: > >>> On Fri, 18 Nov 2022 at 17:37, Mihai Carabas > >>> wrote: > Use the base_memm

Re: [PATCH v4 01/11] block-copy: add missing coroutine_fn annotations

2022-11-21 Thread Kevin Wolf
Am 21.11.2022 um 09:51 hat Emanuele Giuseppe Esposito geschrieben: > > > Am 21/11/2022 um 09:32 schrieb Emanuele Giuseppe Esposito: > > > > > > Am 18/11/2022 um 20:05 schrieb Kevin Wolf: > >> Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: > >>> These functions end up calling

Re: [PATCH for-8.0 01/29] include/qemu/cpuid: Introduce xgetbv_low

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: Replace the two uses of asm to expand xgetbv with an inline function. Since one of the two has been using the mnemonic, assume that the comment about "older versions of the assember" is obsolete, as even that is 4 years old. Signed-off-by: Richard Hend

Re: [PATCH] tests/avocado: Update the URLs of the advent calendar images

2022-11-21 Thread Thomas Huth
On 21/11/2022 12.12, Philippe Mathieu-Daudé wrote: On 21/11/22 11:24, Thomas Huth wrote: The qemu-advent-calendar.org server will be decommissioned soon. I've mirrored the images that we use for the QEMU CI to gitlab, so update their URLs to point to the new location. Signed-off-by: Thomas Huth

Re: [PATCH v4 04/11] block-coroutine-wrapper.py: introduce generated_co_wrapper_simple

2022-11-21 Thread Kevin Wolf
Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: > This new annotation creates just a function wrapper that creates > a new coroutine. It assumes the caller is not a coroutine. > > This is much better as g_c_w, because it is clear if the caller > is a coroutine or not, and provid

Re: [PATCH for-8.0 04/29] accel/tcg: Introduce tlb_read_idx

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: Instead of playing with offsetof in various places, use MMUAccessType to index an array. This is easily defined instead of the previous dummy padding array in the union. Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 7 ++- inclu

Re: [PATCH v2 2/7] multifd: modifying 'migrate' qmp command to add multifd socket on particular src and dest pair

2022-11-21 Thread Juan Quintela
Markus Armbruster wrote: > Het Gala writes: Hi # Example: # -# -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } +# -> { "execute": "migrate", +# "arguments": { +# "uri": "tcp:0:4446", +# "multi-fd-uri-list": [ { "s

Re: [PATCH 1/3] Revert "usbredir: avoid queuing hello packet on snapshot restore"

2022-11-21 Thread Ján Tomko
On a Friday in 2022, Joelle van Dyne wrote: Run state is also in RUN_STATE_PRELAUNCH while "-S" is used. This reverts commit 12d182898a4866e4be418e2abac286b497cfa1b2. Signed-off-by: Joelle van Dyne --- hw/usb/redirect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Ján

Re: [PATCH for-7.2 v3 1/3] rtl8139: avoid clobbering tx descriptor bits

2022-11-21 Thread Stefan Hajnoczi
On Sun, 20 Nov 2022 at 23:17, Jason Wang wrote: > > On Fri, Nov 18, 2022 at 12:56 AM Stefan Hajnoczi wrote: > > > > The device turns the Tx Descriptor into a Tx Status descriptor after > > fully reading the descriptor. This involves clearing Tx Own (bit 31) to > > indicate that the driver has own

Re: [PATCH for-8.0 09/29] tcg/tci: Use cpu_{ld,st}_mmu

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: Unify the softmmu and the user-only paths by using the official memory interface. Avoid double logging of memory operations to plugins by relying on the ones within the cpu_*_mmu functions. Signed-off-by: Richard Henderson --- tcg/tcg-op.c | 9 ++

Re: [PATCH] multifd: Updated QAPI format for 'migrate' qemu monitor command

2022-11-21 Thread Juan Quintela
Het Gala wrote: > To prevent double data encoding of uris, instead of passing transport > mechanisms, host address and port all together in form of a single string > and writing different parsing functions, we intend the user to explicitly > mention most of the parameters through the medium of qmp

Re: [PATCH for-8.0 10/29] tcg: Unify helper_{be,le}_{ld,st}*

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: With the current structure of cputlb.c, there is no difference between the little-endian and big-endian entry points, aside from the assert. Unify the pairs of functions. Signed-off-by: Richard Henderson --- include/tcg/tcg-ldst.h | 60 +

[PULL 1/8] migration/channel-block: fix return value for qio_channel_block_{readv, writev}

2022-11-21 Thread Juan Quintela
From: Fiona Ebner in the error case. The documentation in include/io/channel.h states that -1 or QIO_CHANNEL_ERR_BLOCK should be returned upon error. Simply passing along the return value from the bdrv-functions has the potential to confuse the call sides. Non-blocking mode is not implemented cur

[PULL 4/8] migration: Fix race on qemu_file_shutdown()

2022-11-21 Thread Juan Quintela
From: Peter Xu In qemu_file_shutdown(), there's a possible race if with current order of operation. There're two major things to do: (1) Do real shutdown() (e.g. shutdown() syscall on socket) (2) Update qemufile's last_error We must do (2) before (1) otherwise there can be a race condition

[PULL 5/8] migration: Disallow postcopy preempt to be used with compress

2022-11-21 Thread Juan Quintela
From: Peter Xu The preempt mode requires the capability to assign channel for each of the page, while the compression logic will currently assign pages to different compress thread/local-channel so potentially they're incompatible. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Re

[PULL 3/8] migration: Fix possible infinite loop of ram save process

2022-11-21 Thread Juan Quintela
From: Peter Xu When starting ram saving procedure (especially at the completion phase), always set last_seen_block to non-NULL to make sure we can always correctly detect the case where "we've migrated all the dirty pages". Then we'll guarantee both last_seen_block and pss.block will be valid al

[PULL 6/8] migration: Use non-atomic ops for clear log bitmap

2022-11-21 Thread Juan Quintela
From: Peter Xu Since we already have bitmap_mutex to protect either the dirty bitmap or the clear log bitmap, we don't need atomic operations to set/clear/test on the clear log bitmap. Switching all ops from atomic to non-atomic versions, meanwhile touch up the comments to show which lock is in

[PULL 7/8] migration: Disable multifd explicitly with compression

2022-11-21 Thread Juan Quintela
From: Peter Xu Multifd thread model does not work for compression, explicitly disable it. Note that previuosly even we can enable both of them, nothing will go wrong, because the compression code has higher priority so multifd feature will just be ignored. Now we'll fail even earlier at config

[PULL 8/8] migration: Block migration comment or code is wrong

2022-11-21 Thread Juan Quintela
And it appears that what is wrong is the code. During bulk stage we need to make sure that some block is dirty, but no games with max_size at all. Signed-off-by: Juan Quintela Reviewed-by: Stefan Hajnoczi --- migration/block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PULL 4/5] tests/avocado/boot_linux.py: Bump aarch64 virt test timeout to 720s

2022-11-21 Thread Peter Maydell
The two tests tests/avocado/boot_linux.py:BootLinuxAarch64.test_virt_tcg_gicv2 tests/avocado/boot_linux.py:BootLinuxAarch64.test_virt_tcg_gicv3 take quite a long time to run, and the current timeout of 240s is not enough for the tests to complete on slow machines: we've seen these tests time out i

[PULL 2/8] migration/multifd/zero-copy: Create helper function for flushing

2022-11-21 Thread Juan Quintela
From: Leonardo Bras Move flushing code from multifd_send_sync_main() to a new helper, and call it in multifd_send_sync_main(). Signed-off-by: Leonardo Bras Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/multifd.c | 30 +++--- 1 file changed, 19

[PULL 3/5] hw/intc: add implementation of GICD_IIDR to Arm GIC

2022-11-21 Thread Peter Maydell
From: Alex Bennée a66a24585f (hw/intc/arm_gic: Implement read of GICC_IIDR) implemented this for the CPU interface register. The fact we don't implement it shows up when running Xen with -d guest_error which is definitely wrong because the guest is perfectly entitled to read it. Signed-off-by: A

[PULL 1/5] hw/sd: Fix sun4i allwinner-sdhost for U-Boot

2022-11-21 Thread Peter Maydell
From: Strahinja Jankovic Trying to run U-Boot for Cubieboard (Allwinner A10) fails because it cannot access SD card. The problem is that FIFO register in current allwinner-sdhost implementation is at the address corresponding to Allwinner H3, but not A10. Linux kernel is not affected since Linux

[PULL 2/5] hw/intc: clean-up access to GIC multi-byte registers

2022-11-21 Thread Peter Maydell
From: Alex Bennée gic_dist_readb was returning a word value which just happened to work as a result of the way we OR the data together. Lets fix it so only the explicit byte is returned for each part of GICD_TYPER. I've changed the return type to uint8_t although the overflow is only detected wit

[PULL 0/8] Next patches

2022-11-21 Thread Juan Quintela
The following changes since commit a082fab9d259473a9d5d53307cf83b1223301181: Merge tag 'pull-ppc-20221117' of https://gitlab.com/danielhb/qemu into staging (2022-11-17 12:39:38 -0500) are available in the Git repository at: https://gitlab.com/juan.quintela/qemu.git tags/next-pull-request f

[PULL 5/5] target/arm: Limit LPA2 effective output address when TCR.DS == 0

2022-11-21 Thread Peter Maydell
From: Ard Biesheuvel With LPA2, the effective output address size is at most 48 bits when TCR.DS == 0. This case is currently unhandled in the page table walker, where we happily assume LVA/64k granule when outputsize > 48 and param.ds == 0, resulting in the wrong conversion to be used from a pag

[PULL 0/5] target-arm queue

2022-11-21 Thread Peter Maydell
t repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20221121 for you to fetch changes up to 312b71abce3005ca7294dc0db7d548dc7cc41fbf: target/arm: Limit LPA2 effective output address when TCR.DS == 0 (2022-11-21

Re: [PATCH v4 01/11] block-copy: add missing coroutine_fn annotations

2022-11-21 Thread Emanuele Giuseppe Esposito
Am 21/11/2022 um 12:50 schrieb Kevin Wolf: > Am 21.11.2022 um 09:51 hat Emanuele Giuseppe Esposito geschrieben: >> >> >> Am 21/11/2022 um 09:32 schrieb Emanuele Giuseppe Esposito: >>> >>> >>> Am 18/11/2022 um 20:05 schrieb Kevin Wolf: Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito ge

[PATCH 07/19] migration: Cleanup xbzrle zero page cache update logic

2022-11-21 Thread Juan Quintela
From: Peter Xu The major change is to replace "!save_page_use_compression()" with "xbzrle_enabled" to make it clear. Reasonings: (1) When compression enabled, "!save_page_use_compression()" is exactly the same as checking "xbzrle_enabled". (2) When compression disabled, "!save_page_use_com

[PATCH 10/19] migration: Yield bitmap_mutex properly when sending/sleeping

2022-11-21 Thread Juan Quintela
From: Peter Xu Don't take the bitmap mutex when sending pages, or when being throttled by migration_rate_limit() (which is a bit tricky to call it here in ram code, but seems still helpful). It prepares for the possibility of concurrently sending pages in >1 threads using the function ram_save_h

[PATCH 16/19] migration: Move last_sent_block into PageSearchStatus

2022-11-21 Thread Juan Quintela
From: Peter Xu Since we use PageSearchStatus to represent a channel, it makes perfect sense to keep last_sent_block (aka, leverage RAM_SAVE_FLAG_CONTINUE) to be per-channel rather than global because each channel can be sending different pages on ramblocks. Hence move it from RAMState into PageS

[PATCH 04/19] migration: Export ram_release_page()

2022-11-21 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Leonardo Bras --- migration/ram.h | 1 + migration/ram.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/ram.h b/migration/ram.h index e844966f69..038d52f49f 100644 --- a/migration/ram.h +++ b/migration/ram.h @@ -66,6 +66,

[PATCH 14/19] migration: Add pss_init()

2022-11-21 Thread Juan Quintela
From: Peter Xu Helper to init PSS structures. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/migration/ram.c b/migration/

[PATCH 05/19] migration: Take bitmap mutex when completing ram migration

2022-11-21 Thread Juan Quintela
From: Peter Xu Any call to ram_find_and_save_block() needs to take the bitmap mutex. We used to not take it for most of ram_save_complete() because we thought we're the only one left using the bitmap, but it's not true after the preempt full patchset applied, since the return path can be taking

[PATCH 00/19] Migration patches for 8.8

2022-11-21 Thread Juan Quintela
Hi Based-on: <20221121125907.62469-1-quint...@redhat.com> This are the patches that I had to drop form the last PULL request because they werent fixes: - AVX2 is dropped, intel posted a fix, I have to redo it - Fix for out of order channels is out Daniel nacked it and I need to redo it Juan

[PATCH 06/19] migration: Add postcopy_preempt_active()

2022-11-21 Thread Juan Quintela
From: Peter Xu Add the helper to show that postcopy preempt enabled, meanwhile active. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff

[PATCH 12/19] migration: Teach PSS about host page

2022-11-21 Thread Juan Quintela
From: Peter Xu Migration code has a lot to do with host pages. Teaching PSS core about the idea of host page helps a lot and makes the code clean. Meanwhile, this prepares for the future changes that can leverage the new PSS helpers that this patch introduces to send host page in another thread

[PATCH 19/19] migration: Drop rs->f

2022-11-21 Thread Juan Quintela
From: Peter Xu Now with rs->pss we can already cache channels in pss->pss_channels. That pss_channel contains more infromation than rs->f because it's per-channel. So rs->f could be replaced by rss->pss[RAM_CHANNEL_PRECOPY].pss_channel, while rs->f itself is a bit vague now. Note that vanilla p

[PATCH 08/19] migration: Trivial cleanup save_page_header() on same block check

2022-11-21 Thread Juan Quintela
From: Peter Xu The 2nd check on RAM_SAVE_FLAG_CONTINUE is a bit redundant. Use a boolean to be clearer. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 5 +++-- 1 file changed, 3 insertions(+), 2 dele

[PATCH 09/19] migration: Remove RAMState.f references in compression code

2022-11-21 Thread Juan Quintela
From: Peter Xu Removing referencing to RAMState.f in compress_page_with_multi_thread() and flush_compressed_data(). Compression code by default isn't compatible with having >1 channels (or it won't currently know which channel to flush the compressed data), so to make it simple we always flush o

[PATCH 02/19] multifd: Create page_count fields into both MultiFD{Recv, Send}Params

2022-11-21 Thread Juan Quintela
We were recalculating it left and right. We plan to change that values on next patches. Signed-off-by: Juan Quintela Reviewed-by: Leonardo Bras --- migration/multifd.h | 4 migration/multifd.c | 7 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/migration/multifd.h

[PATCH 17/19] migration: Send requested page directly in rp-return thread

2022-11-21 Thread Juan Quintela
From: Peter Xu With all the facilities ready, send the requested page directly in the rp-return thread rather than queuing it in the request queue, if and only if postcopy preempt is enabled. It can achieve so because it uses separate channel for sending urgent pages. The only shared data is bi

[PATCH 18/19] migration: Remove old preempt code around state maintainance

2022-11-21 Thread Juan Quintela
From: Peter Xu With the new code to send pages in rp-return thread, there's little help to keep lots of the old code on maintaining the preempt state in migration thread, because the new way should always be faster.. Then if we'll always send pages in the rp-return thread anyway, we don't need t

[PATCH 13/19] migration: Introduce pss_channel

2022-11-21 Thread Juan Quintela
From: Peter Xu Introduce pss_channel for PageSearchStatus, define it as "the migration channel to be used to transfer this host page". We used to have rs->f, which is a mirror to MigrationState.to_dst_file. After postcopy preempt initial version, rs->f can be dynamically changed depending on wh

[PATCH 11/19] migration: Use atomic ops properly for page accountings

2022-11-21 Thread Juan Quintela
From: Peter Xu To prepare for thread-safety on page accountings, at least below counters need to be accessed only atomically, they are: ram_counters.transferred ram_counters.duplicate ram_counters.normal ram_counters.postcopy_bytes There are a lot of other counte

[PATCH 01/19] multifd: Create page_size fields into both MultiFD{Recv, Send}Params

2022-11-21 Thread Juan Quintela
We were calling qemu_target_page_size() left and right. Signed-off-by: Juan Quintela Reviewed-by: Leonardo Bras --- migration/multifd.h | 4 migration/multifd-zlib.c | 14 ++ migration/multifd-zstd.c | 12 +--- migration/multifd.c | 18 -- 4 f

[PATCH 15/19] migration: Make PageSearchStatus part of RAMState

2022-11-21 Thread Juan Quintela
From: Peter Xu We used to allocate PSS structure on the stack for precopy when sending pages. Make it static, so as to describe per-channel ram migration status. Here we declared RAM_CHANNEL_MAX instances, preparing for postcopy to use it, even though this patch has not yet to start using the 2

[PATCH 03/19] migration: Export ram_transferred_ram()

2022-11-21 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson Reviewed-by: Leonardo Bras --- migration/ram.h | 2 ++ migration/ram.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/ram.h b/migration/ram.h index c7af65ac74..e844966

Re: [PATCH] target/arm: added cortex-a55 CPU support for qemu-virt

2022-11-21 Thread Timofey Kutergin
Hi all, added some references to TRM but honestly many fields were dumped from hardware - odroid c4/amlogic s905x3/quad cortex-a55 On Thu, Nov 17, 2022 at 6:03 PM Daniel Baluta wrote: > Patch looks good to me. > > Maybe you might add some references to chapters from RM where this numbers > > co

Re: [PATCH] target/arm: added cortex-a55 CPU support for qemu-virt

2022-11-21 Thread Timofey Kutergin
Thank you very much for your comments, I have tried to fix them. Regarding L3 cache - cortex-a55 may have or not have it. CLIDR register value shows that this specific instance (dumped from odroid c4) does not have it. But if you think that having L3 cache may be useful - it may be added too... BR

[PATCH v2] gtk: disable GTK Clipboard with a new meson option

2022-11-21 Thread Claudio Fontana
The GTK Clipboard implementation may cause guest hangs. Therefore implement new configure switch: --enable-gtk-clipboard, as a meson option disabled by default, which warns in the help text about the experimental nature of the feature. Regenerate the meson build options to include it. The initia

Re: [PULL 0/1] ppc queue

2022-11-21 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/4] Some small s390x and testing fixes

2022-11-21 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v11 04/11] s390x/cpu topology: reporting the CPU topology to the guest

2022-11-21 Thread Cédric Le Goater
+static char *s390_top_set_level2(S390Topology *topo, char *p) +{ +    int i, origin; + +    for (i = 0; i < topo->nr_sockets; i++) { +    if (!topo->socket[i].active_count) { +    continue; +    } +    p = fill_container(p, 1, i); +    for (origin = 0; origin < S390_TOPOLO

Re: [PATCH RFC 2/3] hw/i2c: add mctp core

2022-11-21 Thread Matt Johnston
On Fri, Nov 18, 2022 at 08:01:40AM +0100, Klaus Jensen wrote: > On Nov 18 13:56, Jeremy Kerr wrote: > > Hi Klaus, > > > > > Add an abstract MCTP over I2C endpoint model. This implements MCTP > > > control message handling as well as handling the actual I2C transport > > > (packetization). > > > >

Re: [PATCH 2/3] i386: kvm: disable KVM_CAP_PMU_CAPABILITY if "pmu" is disabled

2022-11-21 Thread Liang Yan
On 11/21/22 06:03, Greg Kurz wrote: On Sat, 19 Nov 2022 04:29:00 -0800 Dongli Zhang wrote: The "perf stat" at the VM side still works even we set "-cpu host,-pmu" in the QEMU command line. That is, neither "-cpu host,-pmu" nor "-cpu EPYC" could disable the pmu virtualization in an AMD enviro

Re: [PATCH 3/3] target/i386/kvm: get and put AMD pmu registers

2022-11-21 Thread Liang Yan
A little bit more information from kernel perspective. https://lkml.org/lkml/2022/10/31/476 I was kindly thinking of the same idea, but not sure if it is expected  from a bare-metal perspective, since the four legacy MSRs are always there. Also not sure if they are used by other applications

  1   2   3   >