Re: [RFC 1/4] docs/qcow2: add the zoned format feature

2023-06-13 Thread Stefan Hajnoczi
On Mon, Jun 05, 2023 at 06:41:05PM +0800, Sam Li wrote: > Add the specs for the zoned format feature of the qcow2 driver. Once > the zoned_profile is set to `zbc`, then the qcow2 file can be taken > as zoned devices and passed through by virtio-blk device to the guest. > > Signed-off-by: Sam Li >

Re: [PATCH] i386/WHPX: Fix error message when fail to set ProcessorCount

2023-06-13 Thread Zhao Liu
Just a ping... Hi Sunil, could you please take some time to look at this patch? Thank you! Regards, Zhao On Mon, May 29, 2023 at 08:43:31PM +0800, Zhao Liu wrote: > Date: Mon, 29 May 2023 20:43:31 +0800 > From: Zhao Liu > Subject: [PATCH] i386/WHPX: Fix error message when fail to set > Process

Re: [PATCH 02/15] hw/pci-host/q35: Fix double, contradicting .endianness assignment

2023-06-13 Thread Bernhard Beschow
On Mon, Jun 12, 2023 at 3:01 PM Igor Mammedov wrote: > On Sun, 11 Jun 2023 12:33:59 +0200 > Bernhard Beschow wrote: > > > Fixes the following clangd warning (-Winitializer-overrides): > > > > q35.c:297:19: Initializer overrides prior initialization of this > subobject > > q35.c:292:19: previ

Re: [PATCH v2 00/17] Support smp.clusters for x86

2023-06-13 Thread Zhao Liu
Hi Yongwei, I missed cc you... On Mon, May 29, 2023 at 08:30:44PM +0800, Zhao Liu wrote: > Date: Mon, 29 May 2023 20:30:44 +0800 > From: Zhao Liu > Subject: [PATCH v2 00/17] Support smp.clusters for x86 > X-Mailer: git-send-email 2.34.1 > > From: Zhao Liu > > Hi list, > > This is the our v2

Re: [RFC 0/6] Migration deprecated parts

2023-06-13 Thread Jiri Denemark
On Mon, Jun 12, 2023 at 21:33:38 +0200, Juan Quintela wrote: > Hi this series describe the migration parts that have to be deprecated. > > - It is an rfc because I doubt that I did the deprecation process right. > Hello Markus O:-) > > - skipped field: It is older than me, I have never know what

Re: [RFC 1/4] docs/qcow2: add the zoned format feature

2023-06-13 Thread Sam Li
Stefan Hajnoczi 于2023年6月13日周二 15:04写道: > > On Mon, Jun 05, 2023 at 06:41:05PM +0800, Sam Li wrote: > > Add the specs for the zoned format feature of the qcow2 driver. Once > > the zoned_profile is set to `zbc`, then the qcow2 file can be taken > > as zoned devices and passed through by virtio-blk

Re: [PATCH 5/5] cmd646: move device-specific BMDMA registers to separate memory region

2023-06-13 Thread Bernhard Beschow
On Tue, Jun 13, 2023 at 12:39 AM Philippe Mathieu-Daudé wrote: > On 12/6/23 21:28, Bernhard Beschow wrote: > > > > > > Am 9. Juni 2023 18:51:19 UTC schrieb Mark Cave-Ayland < > mark.cave-ayl...@ilande.co.uk>: > >> The aim here is to eliminate any device-specific registers from the > main BMDMA >

[PATCH] vhost-user: fully use new backend/frontend naming

2023-06-13 Thread Manos Pitsidianakis
Slave/master nomenclature was replaced with backend/frontend in commit 1fc19b65279a246083fc4d918510aae68586f734 vhost-user: Adopt new backend naming This patch replaces all remaining uses of master and slave in the codebase. Signed-off-by: Emmanouil Pitsidianakis --- block/export/vhost-user-bl

Re: [PATCH v2 0/2] Export struct ISAParallelState

2023-06-13 Thread Philippe Mathieu-Daudé
On 12/6/23 10:12, Bernhard Beschow wrote: This series incorporates rebased versions of the ISAParallelState patches of [1] as requested by Mark. Bernhard Beschow (2): hw/char/parallel: Export struct ParallelState hw/char/parallel-isa: Export struct ISAParallelState Reviewed-by: Philipp

RE: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-13 Thread Kasireddy, Vivek
Hi David, > > On 12.06.23 09:10, Kasireddy, Vivek wrote: > > Hi Mike, > > Hi Vivek, > > > > > Sorry for the late reply; I just got back from vacation. > > If it is unsafe to directly use the subpages of a hugetlb page, then > > reverting > > this patch seems like the only option for addressing

Re: [PATCH] vhost-user: fully use new backend/frontend naming

2023-06-13 Thread Marc-André Lureau
On Tue, Jun 13, 2023 at 10:09 AM Manos Pitsidianakis < manos.pitsidiana...@linaro.org> wrote: > Slave/master nomenclature was replaced with backend/frontend in commit > > 1fc19b65279a246083fc4d918510aae68586f734 > vhost-user: Adopt new backend naming > > This patch replaces all remaining uses of m

Re: [PATCH 02/15] hw/pci-host/q35: Fix double, contradicting .endianness assignment

2023-06-13 Thread Michael S. Tsirkin
On Tue, Jun 13, 2023 at 09:46:53AM +0200, Bernhard Beschow wrote: > On Mon, Jun 12, 2023 at 3:01 PM Igor Mammedov wrote: > > On Sun, 11 Jun 2023 12:33:59 +0200 > Bernhard Beschow wrote: > > > Fixes the following clangd warning (-Winitializer-overrides): > > > >   q35.c:297:1

Re: [PATCH v3] linux-user, bsd-user: preserve incoming order of environment variables in the target

2023-06-13 Thread Philippe Mathieu-Daudé
On 29/3/23 17:00, Andreas Schwab wrote: Do not reverse the order of environment variables in the target environ array relative to the incoming environ order. Some testsuites depend on a specific order, even though it is not defined by any standard. Signed-off-by: Andreas Schwab --- bsd-user/

Re: [PATCH V3] memory: RAM_NAMED_FILE flag

2023-06-13 Thread Philippe Mathieu-Daudé
On 7/6/23 17:18, Steve Sistare wrote: migrate_ignore_shared() is an optimization that avoids copying memory that is visible and can be mapped on the target. However, a memory-backend-ram or a memory-backend-memfd block with the RAM_SHARED flag set is not migrated when migrate_ignore_shared() is

Re: [PATCH v3] hvf: Report HV_DENIED error

2023-06-13 Thread Philippe Mathieu-Daudé
On 8/6/23 14:30, Antonio Caggiano wrote: On MacOS 11 and subsequent versions, in case the resulting binary is not signed with the proper entitlement, handle and report the HV_DENIED error. Signed-off-by: Antonio Caggiano --- v2: Use architecture specific defines from AvailabilityMacros.h to ena

[PULL 08/17] target/i386/helper: Shuffle do_cpu_init()

2023-06-13 Thread Philippe Mathieu-Daudé
Move the #ifdef'ry inside do_cpu_init() instead of declaring an empty stub for user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602224628.59546-3-phi...@linaro.org> --- target/i386/helper.c | 12 1 file changed, 4 insertions(+),

[PULL 01/17] linux-user, bsd-user: Preserve incoming order of environment variables in the target

2023-06-13 Thread Philippe Mathieu-Daudé
From: Andreas Schwab Do not reverse the order of environment variables in the target environ array relative to the incoming environ order. Some testsuites depend on a specific order, even though it is not defined by any standard. Signed-off-by: Andreas Schwab Reviewed-by: Warner Losh Reviewed

[PULL 15/17] exec/ram_addr: Return number of dirty pages in cpu_physical_memory_set_dirty_lebitmap()

2023-06-13 Thread Philippe Mathieu-Daudé
From: Joao Martins In preparation for including the number of dirty pages in the vfio_get_dirty_bitmap() tracepoint, return the number of dirty pages in cpu_physical_memory_set_dirty_lebitmap() similar to cpu_physical_memory_sync_dirty_bitmap(). To avoid counting twice when GLOBAL_DIRTY_RATE is

Re: Fwd: QEMU AVR Patch - Correct handling of AVR interrupts

2023-06-13 Thread Philippe Mathieu-Daudé
On 12/6/23 19:08, Adecy wrote: Hello Phil, I believe I have resolved the problem. However, I didn't managed to make git send-email work yet. So please find the patch attached. Maybe sourcehut will be easier, its setup is well documented, see: https://www.qemu.org/docs/master/devel/submitting

[PATCH 1/2] ui/touch: Move event handling to a common helper

2023-06-13 Thread Bilal Elmoussaoui
To share code between the GTK and DBus UI bakcends see the next commit for details Signed-off-by: Bilal Elmoussaoui --- include/ui/console.h | 14 ++ ui/console.c | 65 ui/gtk.c | 62

Re: [PATCH 15/15] hw/i386/pc_piix: Move i440fx' realize near its qdev_new()

2023-06-13 Thread Igor Mammedov
On Mon, 12 Jun 2023 17:49:10 + Bernhard Beschow wrote: > Am 12. Juni 2023 15:21:19 UTC schrieb Igor Mammedov : > >On Mon, 12 Jun 2023 16:51:55 +0200 > >Igor Mammedov wrote: > > > >> On Sun, 11 Jun 2023 12:34:12 +0200 > >> Bernhard Beschow wrote: > >> > >> > I440FX realization is curren

[PULL 12/17] hw/scsi/megasas: Silent GCC duplicated-cond warning

2023-06-13 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé GCC9 is confused when building with CFLAG -O3: hw/scsi/megasas.c: In function ‘megasas_scsi_realize’: hw/scsi/megasas.c:2387:26: error: duplicated ‘if’ condition [-Werror=duplicated-cond] 2387 | } else if (s->fw_sge >= 128 - MFI_PASS_FRAME_SIZE) { hw/sc

[PULL 10/17] hw/i2c: Enable an id for the pca954x devices

2023-06-13 Thread Philippe Mathieu-Daudé
From: Patrick Venture This allows the devices to be more readily found and specified. Without setting the name field, they can only be found by device type name, which doesn't let you specify the second of the same device type behind a bus. Tested: Verified that by default the device was findabl

[PULL 00/17] Misc patches for 2023-06-13

2023-06-13 Thread Philippe Mathieu-Daudé
github.com/philmd/qemu.git tags/misc-20230613 for you to fetch changes up to b0182e537e5aba38031a5009cb16d5e924342458: exec/memory: Introduce RAM_NAMED_FILE flag (2023-06-13 11:28:58 +0200) Misc patches queue - user emulation

[PULL 03/17] util/cacheflush: Use declarations from on Darwin

2023-06-13 Thread Philippe Mathieu-Daudé
Per the cache(3) man page, sys_icache_invalidate() and sys_dcache_flush() are declared in . Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230605175647.88395-2-phi...@linaro.org> --- util/cacheflush.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PULL 04/17] util/cacheflush: Avoid possible redundant dcache flush on Darwin

2023-06-13 Thread Philippe Mathieu-Daudé
describes sys_icache_invalidate() as "equivalent to sys_cache_control(kCacheFunctionPrepareForExecution)", having kCacheFunctionPrepareForExecution defined as: /* Prepare memory for execution. This should be called * after writing machine instructions to memory, before * executing them.

[PULL 11/17] hw/ide/ahci: Remove stray backslash

2023-06-13 Thread Philippe Mathieu-Daudé
From: Niklas Cassel This backslash obviously does not belong here, so remove it. Signed-off-by: Niklas Cassel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: John Snow Message-Id: <20230601134434.519805-2-...@flawful.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c | 2 +- 1 fi

[PULL 17/17] exec/memory: Introduce RAM_NAMED_FILE flag

2023-06-13 Thread Philippe Mathieu-Daudé
From: Steve Sistare migrate_ignore_shared() is an optimization that avoids copying memory that is visible and can be mapped on the target. However, a memory-backend-ram or a memory-backend-memfd block with the RAM_SHARED flag set is not migrated when migrate_ignore_shared() is true. This is wro

[PATCH 1/2] ui/touch: Move event handling to a common helper

2023-06-13 Thread Bilal Elmoussaoui
To share code between the GTK and DBus UI bakcends see the next commit for details Signed-off-by: Bilal Elmoussaoui --- include/ui/console.h | 14 ++ ui/console.c | 65 ui/gtk.c | 62

[PULL 16/17] hw/vfio: Add number of dirty pages to vfio_get_dirty_bitmap tracepoint

2023-06-13 Thread Philippe Mathieu-Daudé
From: Joao Martins Include the number of dirty pages on the vfio_get_dirty_bitmap tracepoint. These are fetched from the newly added return value in cpu_physical_memory_set_dirty_lebitmap(). Signed-off-by: Joao Martins Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Acked-by

[PULL 02/17] cocoa: Fix warnings about invalid prototype declarations

2023-06-13 Thread Philippe Mathieu-Daudé
Fix the following Cocoa trivial warnings: C compiler for the host machine: cc (clang 14.0.0 "Apple clang version 14.0.0 (clang-1400.0.29.202)") Objective-C compiler for the host machine: clang (clang 14.0.0) [100/334] Compiling Objective-C object libcommon.fa.p/net_vmnet-bridged.m.o net/

[PULL 09/17] target/i386: Rename helper template headers as '.h.inc'

2023-06-13 Thread Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the Coding Style: If you do use template header fil

[PATCH 2/2] ui/dbus: Expose a touch device interface

2023-06-13 Thread Bilal Elmoussaoui
So that clients making use of the DBus backend could send touch events through the new org.qemu.Display1.Touch interface Signed-off-by: Bilal Elmoussaoui --- ui/dbus-console.c| 56 +++- ui/dbus-display1.xml | 38 -- ui/trace

Re: [PATCH v2 0/2] Export struct ISAParallelState

2023-06-13 Thread Philippe Mathieu-Daudé
On 12/6/23 10:12, Bernhard Beschow wrote: This series incorporates rebased versions of the ISAParallelState patches of [1] as requested by Mark. Bernhard Beschow (2): hw/char/parallel: Export struct ParallelState hw/char/parallel-isa: Export struct ISAParallelState Thanks, queued (upda

[PULL 14/17] hw/char/parallel-isa: Export struct ISAParallelState

2023-06-13 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Allows the struct to be embedded directly into device models without additional allocation. Suggested-by: Mark Cave-Ayland Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230612081238.1742-3-shen...@gmail

Re: [PATCH v4 0/2] hw/vfio: Improve vfio_get_dirty_bitmap() tracepoint

2023-06-13 Thread Philippe Mathieu-Daudé
On 13/6/23 11:37, Cédric Le Goater wrote: On 6/13/23 11:34, Philippe Mathieu-Daudé wrote: On 30/5/23 20:05, Joao Martins wrote: Joao Martins (2):    exec/ram_addr: return number of dirty pages in cpu_physical_memory_set_dirty_lebitmap()    hw/vfio: Add number of dirty pages to vfio_get_di

[PULL 07/17] target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation

2023-06-13 Thread Philippe Mathieu-Daudé
Since commit 604664726f ("target/i386: Restrict cpu_exec_interrupt() handler to sysemu"), do_cpu_sipi() isn't called anymore on user emulation. Remove the now pointless stub. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602224628.59546-2-phi...@linaro.o

[PULL 06/17] target/hppa/meson: Only build int_helper.o with system emulation

2023-06-13 Thread Philippe Mathieu-Daudé
int_helper.c only contains system emulation code: remove the #ifdef'ry and move the file to the meson softmmu source set. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602223016.58647-1-phi...@linaro.org> --- target/hppa/int_helper.c | 3 --- target/hppa

[PULL 05/17] accel/hvf: Report HV_DENIED error

2023-06-13 Thread Philippe Mathieu-Daudé
From: Antonio Caggiano On MacOS 11 and subsequent versions, in case the resulting binary is not signed with the proper entitlement, handle and report the HV_DENIED error. Signed-off-by: Antonio Caggiano Message-Id: <20230608123014.28715-1-quic_acagg...@quicinc.com> Signed-off-by: Philippe Mathi

Re: [PATCH 14/16] target/riscv: adapt 'riscv_isa_string' for KVM

2023-06-13 Thread Daniel Henrique Barboza
On 6/7/23 09:21, Andrew Jones wrote: On Tue, May 30, 2023 at 04:46:21PM -0300, Daniel Henrique Barboza wrote: KVM is not using the same attributes as TCG, i.e. it doesn't use isa_edata_arr[]. Add a new kvm_riscv_isa_string_ext() helper that does basically the same thing, but using KVM interna

Re: [PATCH v4 0/2] hw/vfio: Improve vfio_get_dirty_bitmap() tracepoint

2023-06-13 Thread Cédric Le Goater
On 6/13/23 11:34, Philippe Mathieu-Daudé wrote: On 30/5/23 20:05, Joao Martins wrote: Joao Martins (2):    exec/ram_addr: return number of dirty pages in cpu_physical_memory_set_dirty_lebitmap()    hw/vfio: Add number of dirty pages to vfio_get_dirty_bitmap tracepoint Queued, thanks.

Re: [PULL 26/42] target/arm: Use tcg_gen_qemu_{ld, st}_i128 in gen_sve_{ld, st}r

2023-06-13 Thread Jonathan Cameron via
On Mon, 12 Jun 2023 19:40:29 +0100 Mark Cave-Ayland wrote: > On 12/06/2023 16:20, Jonathan Cameron via wrote: > > > On Tue, 6 Jun 2023 10:47:58 +0100 > > Peter Maydell wrote: > > > >> From: Richard Henderson > >> > >> Round len_align to 16 instead of 8, handling an odd 8-byte as part > >>

[PULL 13/17] hw/char/parallel: Export struct ParallelState

2023-06-13 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Exporting ParallelState is a precondition for exporing TYPE_ISA_PARALLEL to be performed in the next patch. Suggested-by: Mark Cave-Ayland Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230612081238.1742

Re: [PATCH 02/15] hw/pci-host/q35: Fix double, contradicting .endianness assignment

2023-06-13 Thread BALATON Zoltan
On Tue, 13 Jun 2023, Michael S. Tsirkin wrote: On Tue, Jun 13, 2023 at 09:46:53AM +0200, Bernhard Beschow wrote: On Mon, Jun 12, 2023 at 3:01 PM Igor Mammedov wrote: On Sun, 11 Jun 2023 12:33:59 +0200 Bernhard Beschow wrote: > Fixes the following clangd warning (-Winitializer-over

Re: [PATCH v2 05/23] q800: move CPU object into Q800MachineState

2023-06-13 Thread Markus Armbruster
Mark Cave-Ayland writes: > On 01/06/2023 10:00, Markus Armbruster wrote: > >> Mark Cave-Ayland writes: >> >>> On 31/05/2023 16:00, Markus Armbruster wrote: >>> Philippe Mathieu-Daudé writes: > On 31/5/23 14:53, Mark Cave-Ayland wrote: >> Also change the instantiation of the C

Re: [PATCH v4 0/2] hw/vfio: Improve vfio_get_dirty_bitmap() tracepoint

2023-06-13 Thread Philippe Mathieu-Daudé
On 30/5/23 20:05, Joao Martins wrote: Joao Martins (2): exec/ram_addr: return number of dirty pages in cpu_physical_memory_set_dirty_lebitmap() hw/vfio: Add number of dirty pages to vfio_get_dirty_bitmap tracepoint Queued, thanks.

[PATCH v2 0/2] Add LoongArch cpu arch_id support

2023-06-13 Thread Tianrui Zhao
This patch add cpu arch_id for LoongArch: 1. Add LoongArch cpu arch_id support; 2. Fill Acpi table with arch_id; 3. set physical cpuid route for LoongArch ipi device. changes for v2: 1. Fix core_id calculation in ms->possible_cpus, it should be (n % smp.cores) Tianrui Zhao (2): hw/loongarch/vir

[PATCH v2 2/2] hw/intc: Set physical cpuid route for LoongArch ipi device

2023-06-13 Thread Tianrui Zhao
LoongArch ipi device uses physical cpuid to route to different vcpus rather logical cpuid, and the physical cpuid is the same with cpuid in acpi dsdt and srat table. Signed-off-by: Tianrui Zhao Signed-off-by: Song Gao --- hw/intc/loongarch_ipi.c | 44 ++--- h

[PATCH v2 1/2] hw/loongarch/virt: Add cpu arch_id support

2023-06-13 Thread Tianrui Zhao
With acpi madt table, there is cpu physical coreid, which may be different with logical id in qemu. This patch adds cpu arch_id support, and fill madt table with arch_id. For the present cpu arch_id is still equal to logical id. Signed-off-by: Tianrui Zhao Signed-off-by: Song Gao --- hw/loongar

RE: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-13 Thread David Laight
From: Kasireddy, Vivek > Sent: 13 June 2023 09:26 ... > > Is my understanding correct, that we can effectively long-term pin > > (worse than mlock) 64 MiB per UDMABUF_CREATE, allowing eventually !root > > users > > The 64 MiB limit is the theoretical upper bound that we have not seen hit in > prac

[PATCH v2] hw/loongarch: Add numa support

2023-06-13 Thread Tianrui Zhao
From: Song Gao 1. Implement some functions for LoongArch numa support; 2. Implement fdt_add_memory_node() for fdt; 3. build_srat() fills node_id and adds build numa memory. Base-on: https://patchew.org/QEMU/20230613120552.2471420-1-zhaotian...@loongson.cn/ Signed-off-by: Tianrui Zhao Signed-of

Re: [PATCH V2 1/4] qapi: strList_from_string

2023-06-13 Thread Markus Armbruster
Steven Sistare writes: > On 2/10/2023 4:25 AM, Markus Armbruster wrote: >> Steven Sistare writes: >> >>> On 2/9/2023 1:59 PM, Markus Armbruster wrote: Steven Sistare writes: > On 2/9/2023 11:46 AM, Markus Armbruster wrote: >> Steven Sistare writes: >> >> [...] >> >>> For mo

[PATCH] hw/loongarch: Supplement cpu topology arguments

2023-06-13 Thread Tianrui Zhao
Supplement LoongArch cpu topology arguments, including support socket and threads per core. Base-on: https://patchew.org/QEMU/20230613122613.2471743-1-zhaotian...@loongson.cn/ Signed-off-by: Song Gao Signed-off-by: Tianrui Zhao --- hw/loongarch/acpi-build.c | 4 hw/loongarch/virt.c

Re: [PATCH 1/2] ui/touch: Move event handling to a common helper

2023-06-13 Thread Marc-André Lureau
Hi Bilal On Tue, Jun 13, 2023 at 1:35 PM Bilal Elmoussaoui wrote: > To share code between the GTK and DBus UI bakcends > see the next commit for details > > Signed-off-by: Bilal Elmoussaoui > --- > include/ui/console.h | 14 ++ > ui/console.c | 65 ++

Re: [PATCH 2/2] ui/dbus: Expose a touch device interface

2023-06-13 Thread Marc-André Lureau
Hi Bilal On Tue, Jun 13, 2023 at 1:39 PM Bilal Elmoussaoui wrote: > So that clients making use of the DBus backend could > send touch events through the new org.qemu.Display1.Touch > interface > > Signed-off-by: Bilal Elmoussaoui > --- > ui/dbus-console.c| 56 ++

Re: [PATCH] hw/loongarch: Supplement cpu topology arguments

2023-06-13 Thread Philippe Mathieu-Daudé
On 13/6/23 14:32, Tianrui Zhao wrote: Supplement LoongArch cpu topology arguments, including support socket and threads per core. Base-on: https://patchew.org/QEMU/20230613122613.2471743-1-zhaotian...@loongson.cn/ ^ FYI this tag ... Signed-off-by: Song Gao Signed-off-by: Tianrui Zhao ---

Re: [PATCH 02/15] hw/pci-host/q35: Fix double, contradicting .endianness assignment

2023-06-13 Thread Igor Mammedov
On Tue, 13 Jun 2023 13:07:17 +0200 (CEST) BALATON Zoltan wrote: > On Tue, 13 Jun 2023, Michael S. Tsirkin wrote: > > On Tue, Jun 13, 2023 at 09:46:53AM +0200, Bernhard Beschow wrote: > >> On Mon, Jun 12, 2023 at 3:01 PM Igor Mammedov wrote: > >> > >> On Sun, 11 Jun 2023 12:33:59 +0200 > >>

[PATCH v2 0/3] i386: Minor fixes of building CPUIDs

2023-06-13 Thread Xiaoyao Li
This v2 adds patch 3 to fix the build of CPUID leaf 7. The issue that fixed by Patch 1 looks fatal though it doesn't appear on KVM because KVM always searches with assending order and hit with the correct cpuid leaf 0. Patch 2 removes the wrong constraint on CPUID leaf 1f. Changes in v2: - Add P

[PATCH v2 1/3] i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F

2023-06-13 Thread Xiaoyao Li
Decrease array index cpuid_i when CPUID leaf 1F is skipped, otherwise it will get an all zero'ed CPUID entry with leaf 0 and subleaf 0. It conflicts with correct leaf 0. Signed-off-by: Xiaoyao Li --- target/i386/kvm/kvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/kvm/kvm.c

[PATCH v2 2/3] i386/cpuid: Remove subleaf constraint on CPUID leaf 1F

2023-06-13 Thread Xiaoyao Li
No such constraint that subleaf index needs to be less than 64. Signed-off-by: Xiaoyao Li --- target/i386/kvm/kvm.c | 4 1 file changed, 4 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index afa97799d89a..d7e235ce35a6 100644 --- a/target/i386/kvm/kvm.c +++ b/targe

[PATCH v2 3/3] i386/cpuid: Move leaf 7 to correct group

2023-06-13 Thread Xiaoyao Li
CPUID leaf 7 was grouped together with SGX leaf 0x12 by commit b9edbadefb9e ("i386: Propagate SGX CPUID sub-leafs to KVM") by mistake. SGX leaf 0x12 has its specific logic to check if subleaf (starting from 2) is valid or not by checking the bit 0:3 of corresponding EAX is 1 or not. Leaf 7 follow

[PATCH v3 2/9] target/tricore: Remove pointless CONFIG_SOFTMMU guard

2023-06-13 Thread Philippe Mathieu-Daudé
We don't build any user emulation target for Tricore, only the system emulation. No need to check for it as it is always defined. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/tricore/helper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/tricore/

[PATCH v3 1/9] target/i386: Simplify i386_tr_init_disas_context()

2023-06-13 Thread Philippe Mathieu-Daudé
Since cpu_mmu_index() is well-defined for user-only, we can remove the surrounding #ifdef'ry entirely. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/translate.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/i386/tcg/translate.c b/target

[PATCH v3 0/9] bulk: Replace CONFIG_SOFTMMU by !CONFIG_USER_ONLY/CONFIG_SYSTEM_ONLY

2023-06-13 Thread Philippe Mathieu-Daudé
Missing review: 1, 7, 8 Since v2: - Rebased - Added R-b tags - Rework i386_tr_init_disas_context() patch (Richard) - Dropped RFC prefix This series aims to clarify the CONFIG_[USER|SYSTEM] vs CONFIG_SOFTMMU confusion [*] by using explicit definitions, removing mentions of CONFIG_SOFTMMU in non-TC

[PATCH v3 6/9] accel/tcg: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-13 Thread Philippe Mathieu-Daudé
Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert some if() ladders for clarity. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/tcg/internal.h | 6 +++--- accel/tcg/cpu-exec.c | 4 ++-- 2 files c

[PATCH v3 4/9] target/ppc: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-13 Thread Philippe Mathieu-Daudé
Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/ppc/cpu_init.c| 20 ++-- target/ppc/helper_regs.c | 6 ++ 2 files changed, 12 in

[PATCH v3 5/9] hw/core/cpu: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-13 Thread Philippe Mathieu-Daudé
Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert the #ifdef'ry in TCGCPUOps structure for clarity. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/core/cpu.h | 4 +- include/hw/cor

[PATCH v3 3/9] target/m68k: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-13 Thread Philippe Mathieu-Daudé
Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert some if() ladders for clarity. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/m68k/helper.h| 2 +- target/m68k/cpu.c | 14 ++-

[PATCH v3 7/9] meson: Alias CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY

2023-06-13 Thread Philippe Mathieu-Daudé
We use the CONFIG_USER_ONLY key to describe user emulation, and the CONFIG_SOFTMMU key to describe system emulation. Alias it as 'CONFIG_SYSTEM_ONLY' for parity with user emulation. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.bu

[PATCH v3 8/9] meson: Replace CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY

2023-06-13 Thread Philippe Mathieu-Daudé
Since we *might* have user emulation with softmmu, use the clearer 'CONFIG_SYSTEM_ONLY' key to check for system emulation. Signed-off-by: Philippe Mathieu-Daudé --- meson.build| 4 ++-- accel/qtest/meson.build| 2 +- accel/stubs/meson.build| 2 +-

[PATCH v3 9/9] meson: Replace softmmu_ss -> system_ss

2023-06-13 Thread Philippe Mathieu-Daudé
We use the user_ss[] array to hold the user emulation sources, and the softmmu_ss[] array to hold the system emulation ones. Hold the latter in the 'system_ss[]' array for parity with user emulation. Mechanical change doing: $ sed -i -e s/softmmu_ss/system_ss/g $(git grep -l softmmu_ss) Signed

Re: [PATCH 02/15] hw/pci-host/q35: Fix double, contradicting .endianness assignment

2023-06-13 Thread Philippe Mathieu-Daudé
On 13/6/23 15:05, Igor Mammedov wrote: On Tue, 13 Jun 2023 13:07:17 +0200 (CEST) BALATON Zoltan wrote: On Tue, 13 Jun 2023, Michael S. Tsirkin wrote: On Tue, Jun 13, 2023 at 09:46:53AM +0200, Bernhard Beschow wrote: On Mon, Jun 12, 2023 at 3:01 PM Igor Mammedov wrote: On Sun, 11 Jun 2

[PATCH] vfio/pci: Call vfio_prepare_kvm_msi_virq_batch() in MSI retry path

2023-06-13 Thread Shameer Kolothum via
When vfio_enable_vectors() returns with less than requested nr_vectors we retry with what kernel reported back. But the retry path doesn't call vfio_prepare_kvm_msi_virq_batch() and this results in, qemu-system-aarch64: vfio: Error: Failed to enable 4 MSI vectors, retry with 1 qemu-system-aarch64:

[PATCH 00/18] Migration compression cleanup

2023-06-13 Thread Juan Quintela
Hi On this series: - We got errors when setting incompatible migration methods (i.e. compression and RDMA) - Remove the posibility of running COMPRESSION and XBZRLE together (remember that compression don't work) - This series is the preliminar work to be able to compile out compression (

[PATCH 07/18] migration: Create ram_compressed_pages()

2023-06-13 Thread Juan Quintela
Signed-off-by: Juan Quintela fix ram_compress Signed-off-by: Juan Quintela --- migration/ram-compress.h | 1 + migration/ram-compress.c | 6 ++ migration/ram.c | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/migration/ram-compress.h b/migration/ram-compress.h

[PATCH 18/18] migration: Remove not needed file parameter for save_zero_page*

2023-06-13 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 0259c33da7..ae11d0e992 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1069,16 +1069,15 @@ void ram_release_page(const

[PATCH 02/18] migration: Give one error if trying to set COMPRESSION and XBZRLE

2023-06-13 Thread Juan Quintela
As we have disable to use both together in the previous patch, we can remove this check. Signed-off-by: Juan Quintela --- migration/options.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/migration/options.c b/migration/options.c index c6674a4753..a18689c314 100644 --- a/migration/o

[PATCH 03/18] migration: RDMA is not compatible with anything else

2023-06-13 Thread Juan Quintela
So give an error instead of just ignoring the other methods. Signed-off-by: Juan Quintela --- migration/migration.c | 12 1 file changed, 12 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index dc05c6f6ea..84551f040c 100644 --- a/migration/migration.c +++

[PATCH 12/18] migration: Create compression_update_rates()

2023-06-13 Thread Juan Quintela
So we can move more compression_counters stuff to ram-compress.c. Create compression_counters struct to add the stuff that was on MigrationState. Signed-off-by: Juan Quintela --- migration/ram-compress.h | 1 + migration/ram.h | 1 - migration/ram-compress.c | 41 +

[PATCH 04/18] migration: Remove save_page_use_compression()

2023-06-13 Thread Juan Quintela
After previous patch, we disable the posiblity that we use compression together with xbzrle. So we can use directly migrate_compress(). Once there, now we don't need the rs parameter, so remove it. Signed-off-by: Juan Quintela --- migration/ram.c | 34 +++--- 1 file

[PATCH 01/18] migration: Give one error if trying to set MULTIFD and XBZRLE

2023-06-13 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/options.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/migration/options.c b/migration/options.c index b62ab30cd5..c6674a4753 100644 --- a/migration/options.c +++ b/migration/options.c @@ -547,6 +547,13 @@ bool migrate_caps_check(bool *old_

[PATCH 14/18] migration: Use "i" as an for index in ram-compress.c

2023-06-13 Thread Juan Quintela
It is used everywhere else in C. Once there, make sure that we don't use the index outside of the for declaring the variable there. Signed-off-by: Juan Quintela --- migration/ram-compress.c | 57 ++-- 1 file changed, 25 insertions(+), 32 deletions(-) diff --

[PATCH 05/18] migration: Move compression_counters cleanup ram-compress.c

2023-06-13 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/migration.c| 4 +--- migration/ram-compress.c | 5 + migration/savevm.c | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 84551f040c..5105ad6825 100644 --- a/migration/

[PATCH 17/18] migration: Remove not needed block parameter for save_zero_page*

2023-06-13 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 293ea87a70..0259c33da7 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1067,20 +1067,20 @@ void ram_release_page(

[PATCH 08/18] migration: Move update_compress_threads_counts() to ram-compress.c

2023-06-13 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram-compress.h | 1 + migration/ram-compress.c | 17 + migration/ram.c | 15 --- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/migration/ram-compress.h b/migration/ram-compress.h index 77465dad4b..

[PATCH 15/18] migration: save_compress_page() can take block through pss

2023-06-13 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 1bd586c23a..e3ff98a6ce 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1986,7 +1986,7 @@ int ram_save_queue_pages(const char

[PATCH 06/18] migration: Create populate_compress()

2023-06-13 Thread Juan Quintela
So we don't have to access compression_counters from outside ram-compress.c. Signed-off-by: Juan Quintela --- migration/ram-compress.h | 3 +++ migration/migration.c| 11 +-- migration/ram-compress.c | 14 ++ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git

[PATCH 16/18] migration: control_save_page() can take block through pss

2023-06-13 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index e3ff98a6ce..293ea87a70 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1114,14 +1114,14 @@ static int save_zero_page(PageSearch

[PATCH 09/18] migration: Make compress_data_with_multithreads return bool

2023-06-13 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram-compress.h | 4 ++-- migration/ram-compress.c | 17 ++--- migration/ram.c | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/migration/ram-compress.h b/migration/ram-compress.h index e55d3b50bd..b228640092

[PATCH 13/18] migration: Simplify decompress_data_with_multi_threads()

2023-06-13 Thread Juan Quintela
Doing a break to do another break is just confused. Just call return when we know we want to return. Signed-off-by: Juan Quintela --- migration/ram-compress.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/migration/ram-compress.c b/migration/ram-compress.c index 5e

[PATCH 10/18] migration: Simplify compress_page_with_multithread()

2023-06-13 Thread Juan Quintela
Move the goto to a while true. Signed-off-by: Juan Quintela --- migration/ram-compress.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/migration/ram-compress.c b/migration/ram-compress.c index 8ce9519f3d..3c44803132 100644 --- a/mi

[PATCH 11/18] migration: Move busy++ to migrate_with_multithread

2023-06-13 Thread Juan Quintela
And now we can simplify save_compress_page(). Signed-off-by: Juan Quintela --- migration/ram-compress.c | 1 + migration/ram.c | 7 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/migration/ram-compress.c b/migration/ram-compress.c index 3c44803132..2652cdee8b 100

[PATCH v1 1/5] pc: Properly handle unplug of virtio based memory devices

2023-06-13 Thread David Hildenbrand
While we fence unplug requests from the outside, the VM can still trigger unplug of virtio based memory devices, for example, in Linux doing: # echo 0 > /sys/bus/pci/slots/3/power While doing that is not really expected to work without harming the guest OS (e.g., removing a virtio-mem device w

[PATCH v1 3/5] virtio-mem: Prepare for unplug support of virtio-mem-pci devices

2023-06-13 Thread David Hildenbrand
In many cases, blindly unplugging a virtio-mem device is problematic. We can only safely remove a device once: * The guest is not expecting to be able to read unplugged memory (unplugged-inaccessible == on) * The virtio-mem device does not have memory plugged (size == 0) * The virtio-mem device d

[PATCH v1 0/5] virtio-mem: Device unplug support

2023-06-13 Thread David Hildenbrand
One limitation of virtio-mem is that we cannot currently unplug virtio-mem devices that have all memory unplugged from the VM. Let's properly handle forced unplug (as can be triggered by the VM) and add support for ordinary unplug (requests) of virtio-mem devices that are in a compatible state (no

[PATCH v1 4/5] pc: Support unplug of virtio-mem-pci devices

2023-06-13 Thread David Hildenbrand
Let's support unplug of virtio-mem-pci devices by granting (forwarding) unplug requests if it's safe to unplug a virtio-mem device. Signed-off-by: David Hildenbrand --- hw/i386/pc.c | 48 +--- 1 file changed, 41 insertions(+), 7 deletions(-) diff --gi

[PATCH v1 5/5] arm/virt: Support unplug of virtio-mem-pci devices

2023-06-13 Thread David Hildenbrand
Let's support unplug of virtio-mem-pci devices by granting (forwarding) unplug requests if it's safe to unplug a virtio-mem device. Signed-off-by: David Hildenbrand --- hw/arm/virt.c | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/hw/arm/vi

[PATCH v1 2/5] arm/virt: Properly handle unplug of virtio based memory devices

2023-06-13 Thread David Hildenbrand
While we fence unplug requests from the outside, the VM can still trigger unplug of virtio based memory devices, for example, in Linux doing: # echo 0 > /sys/bus/pci/slots/3/power While doing that is not really expected to work without harming the guest OS (e.g., removing a virtio-mem device w

Re: [PATCH 02/15] hw/pci-host/q35: Fix double, contradicting .endianness assignment

2023-06-13 Thread Michael S. Tsirkin
On Tue, Jun 13, 2023 at 03:40:28PM +0200, Philippe Mathieu-Daudé wrote: > On 13/6/23 15:05, Igor Mammedov wrote: > > On Tue, 13 Jun 2023 13:07:17 +0200 (CEST) > > BALATON Zoltan wrote: > > > > > On Tue, 13 Jun 2023, Michael S. Tsirkin wrote: > > > > On Tue, Jun 13, 2023 at 09:46:53AM +0200, Bernh

Re: [PATCH 02/15] hw/pci-host/q35: Fix double, contradicting .endianness assignment

2023-06-13 Thread Bernhard Beschow
Am 13. Juni 2023 15:01:40 UTC schrieb "Michael S. Tsirkin" : >On Tue, Jun 13, 2023 at 03:40:28PM +0200, Philippe Mathieu-Daudé wrote: >> On 13/6/23 15:05, Igor Mammedov wrote: >> > On Tue, 13 Jun 2023 13:07:17 +0200 (CEST) >> > BALATON Zoltan wrote: >> > >> > > On Tue, 13 Jun 2023, Michael S.

  1   2   3   >