Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine

2024-02-16 Thread maobibo
On 2024/2/6 下午5:20, Thomas Huth wrote: On 06/02/2024 03.29, maobibo wrote: Hi Philippe, On 2024/2/5 下午8:58, Philippe Mathieu-Daudé wrote: Hi Bibo, On 5/2/24 03:13, Bibo Mao wrote: The cdrom test skips to execute on LoongArch system with command "make check", this patch enables cdrom test

[RFC] Convert VMWARE vmdk (snapshot) to raw disk

2024-02-16 Thread Jinpu Wang
Hi, We want to convert some VMWARE VM to KVM, and to reduce the VM down time, we want to do it in two steps copy approach: 1. a snapshot is taken - source VM continues to run on VMware => diff creates 2. snapshot is available for download as vmdk - we need a software to copy snapshot to target

Re: [PULL 00/56] Misc HW patches for 2024-02-15

2024-02-16 Thread Peter Maydell
On Thu, 15 Feb 2024 at 17:58, Philippe Mathieu-Daudé wrote: > > The following changes since commit 5767815218efd3cbfd409505ed824d5f356044ae: > > Merge tag 'for_upstream' of > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2024-02-14 > 15:45:52 +) > > are available in the

[PATCH 15/21] hw/core/register: Prefer object_initialize_child over object_initialize

2024-02-16 Thread Philippe Mathieu-Daudé
When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/register.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/register.c

[PATCH 03/21] hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr_cpu_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 0c0fb3f1b0..40b7c52f7f 100644 ---

[PATCH 20/21] hw/arm/mps2: Add QOM parentship relation with OR IRQ gates

2024-02-16 Thread Philippe Mathieu-Daudé
QDev objects created with object_new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- Better would be to embedded an call object_initialize_child()... --- hw/arm/mps2.c | 5 + 1 file changed, 5 insertions(+) diff

[PATCH 18/21] hw/pci-host/versatile: Replace object_initialize() -> _child()

2024-02-16 Thread Philippe Mathieu-Daudé
When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/versatile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/versatile.c

Re: [PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API

2024-02-16 Thread Cédric Le Goater
On 2/16/24 12:02, Philippe Mathieu-Daudé wrote: Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ppc/pnv_bmc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[PATCH 13/21] hw/pci-host/raven: Embedded OrIRQ in PRePPCIState

2024-02-16 Thread Philippe Mathieu-Daudé
Since we know the size of the OrIRQ object, we can initialize it directly in place with object_initialize_child(). Doing so we also set the QOM parent <-> child relationship. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/raven.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH 17/21] hw/i386/iommu: Prefer object_initialize_child over object_initialize

2024-02-16 Thread Philippe Mathieu-Daudé
When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Rename the 'klass' variable as 'obj' since the argument holds a reference to an instance object and not a class one. Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 10/21] hw/usb: Inline usb_new()

2024-02-16 Thread Philippe Mathieu-Daudé
Inline the 2 uses of usb_new(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/usb.h| 1 - hw/usb/bus.c| 9 ++--- hw/usb/dev-serial.c | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 32c23a5ca2..2d820685cc

[PATCH 21/21] hw: Add QOM parentship relation with CPUs

2024-02-16 Thread Philippe Mathieu-Daudé
QDev objects created with object_new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/x86.c| 1 + hw/microblaze/petalogix_ml605_mmu.c | 1 +

[PATCH 14/21] hw/pci-host/raven: Prefer object_initialize_child over object_initialize

2024-02-16 Thread Philippe Mathieu-Daudé
When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/raven.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/raven.c

[PATCH 19/21] hw/s390x/zpci-bus: Add QOM parentship relation with zPCI devices

2024-02-16 Thread Philippe Mathieu-Daudé
QDev objects created with qdev_*new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/s390-pci-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index

[PATCH 08/21] hw/isa: Inline isa_try_new()

2024-02-16 Thread Philippe Mathieu-Daudé
Inline the 2 single uses of isa_try_new(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/isa/isa.h| 1 - include/hw/net/ne2000-isa.h | 2 +- hw/i386/pc.c| 2 +- hw/isa/isa-bus.c| 5 - 4 files changed, 2 insertions(+), 8 deletions(-) diff --git

[PATCH 02/21] hw/i386/pc_sysfw: Use qdev_is_realized() instead of QOM API

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_sysfw.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index c8d9e71b88..3efabbbab2 100644 ---

[PATCH 00/21] hw: More QDev cleanups

2024-02-16 Thread Philippe Mathieu-Daudé
Various QDev cleanups extracted to my "enforce QDev API" branch. - When available, instead of plain QOM, use QDev API equivalent - Add missing QOM parentship for some obj created with qdev_*new() - Prefer object_initialize_child() over object_initialize() Philippe Mathieu-Daudé (21):

[PATCH 09/21] hw/usb: Inline usb_try_new()

2024-02-16 Thread Philippe Mathieu-Daudé
Inline the single use of usb_try_new(). Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/bus.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 59c39945dd..148224f06a 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -334,11 +334,6 @@

[PATCH 04/21] hw/tricore/testboard: Use qdev_new() instead of QOM basic API

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/tricore/tricore_testdevice.h | 3 --- hw/tricore/tricore_testboard.c | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git

[PATCH 16/21] hw/net/can/versal: Prefer object_initialize_child over object_initialize

2024-02-16 Thread Philippe Mathieu-Daudé
When the QOM parent is available, prefer object_initialize_child() over object_initialize(), since it create the parent relationship. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/can/xlnx-versal-canfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 07/21] target: Replace DEVICE(object_new) -> qdev_new()

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cpu.c | 2 +- target/xtensa/cpu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index d644adbc77..6b3909ee08

[PATCH 11/21] hw/usb: Add QOM parentship relation with hub devices

2024-02-16 Thread Philippe Mathieu-Daudé
QDev objects created with qdev_*new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index a599e2552b..baad04f466 100644 ---

[PATCH 12/21] hw/pci-host/q35: Update q35_host_props[] comment

2024-02-16 Thread Philippe Mathieu-Daudé
Commit aff39be0ed ("hw/pci-host: Use object_initialize_child for correct reference counting") replaced object_initialize() by object_initialize_child(), update the comment. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/q35.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/pnv_bmc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/pnv_bmc.c b/hw/ppc/pnv_bmc.c index 99f1e8d7f9..0c1274df21 100644 ---

[PATCH 06/21] hw: Replace DEVICE(object_new) -> qdev_new()

2024-02-16 Thread Philippe Mathieu-Daudé
Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 2 +- hw/core/qdev.c| 2 +- hw/sparc/sun4m.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index

[PATCH 01/21] hw/i386/pc: Do not use C99 mixed-declarations style

2024-02-16 Thread Philippe Mathieu-Daudé
QEMU's coding style generally forbids C99 mixed declarations. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 196827531a..3c00a87317 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@

[RFC 1/4] drive-mirror: add support for sync=bitmap mode=never

2024-02-16 Thread Fiona Ebner
From: John Snow This patch adds support for the "BITMAP" sync mode to drive-mirror and blockdev-mirror. It adds support only for the BitmapSyncMode "never," because it's the simplest mode. This mode simply uses a user-provided bitmap as an initial copy manifest, and then does not clear any bits

[RFC 3/4] mirror: move some checks to qmp

2024-02-16 Thread Fiona Ebner
From: Fabian Grünbichler and assert the passing conditions in block/mirror.c. while incremental mode was never available for drive-mirror, it makes the interface more uniform w.r.t. backup block jobs. Signed-off-by: Fabian Grünbichler Signed-off-by: Thomas Lamprecht [FE: rebase for 9.0]

[RFC 4/4] iotests: add test for bitmap mirror

2024-02-16 Thread Fiona Ebner
From: Fabian Grünbichler heavily based on/practically forked off iotest 257 for bitmap backups, but: - no writes to filter node 'mirror-top' between completion and finalization, as those seem to deadlock? - no inclusion of not-yet-available full/top sync modes in combination with bitmaps -

[RFC 0/4] mirror: implement incremental and bitmap modes

2024-02-16 Thread Fiona Ebner
Previous discussion from when this was sent upstream [0] (it's been a while). I rebased the patches and re-ordered and squashed like suggested back then [1]. This implements two new mirror modes: - bitmap mirror mode with always/on-success/never bitmap sync mode - incremental mirror mode as

[RFC 2/4] drive-mirror: add support for conditional and always bitmap sync modes

2024-02-16 Thread Fiona Ebner
From: John Snow Teach mirror two new tricks for using bitmaps: Always: no matter what, we synchronize the copy_bitmap back to the sync_bitmap. In effect, this allows us resume a failed mirror at a later date. Conditional: On success only, we sync the bitmap. This is akin to incremental backup

Re: [PATCH v4 0/3] Initial support for SPDM Responders

2024-02-16 Thread Alistair Francis
On Fri, Feb 16, 2024 at 6:52 PM Klaus Jensen wrote: > > On Feb 15 14:44, Jonathan Cameron wrote: > > On Tue, 13 Feb 2024 12:44:00 +1000 > > Alistair Francis wrote: > > > > Hi All, > > > > Just wanted to add that back in v2 Klaus Jensen stated: > > > > "I have no problem with picking this up for

[PATCH] iotests: adapt to output change for recently introduced 'detached header' field

2024-02-16 Thread Fiona Ebner
Failure was noticed when running the tests for the qcow2 image format. Fixes: 0bd779e27e ("crypto: Introduce 'detached-header' field in QCryptoBlockInfoLUKS") Signed-off-by: Fiona Ebner --- tests/qemu-iotests/198.out | 2 ++ tests/qemu-iotests/206.out | 1 + 2 files changed, 3 insertions(+)

Re: [PATCH v4 0/3] Initial support for SPDM Responders

2024-02-16 Thread Klaus Jensen
On Feb 15 14:44, Jonathan Cameron wrote: > On Tue, 13 Feb 2024 12:44:00 +1000 > Alistair Francis wrote: > > Hi All, > > Just wanted to add that back in v2 Klaus Jensen stated: > > "I have no problem with picking this up for nvme, but I'd rather not take > the full series through my tree