Re: [PATCH v5 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-10-27 Thread Jason Wang
On Tue, Oct 17, 2023 at 12:10 PM Akihiko Odaki wrote: > > vhost requires eBPF for RSS. Even when eBPF is not available, virtio-net > reported RSS availability, and raised a warning only after the > guest requested RSS, and the guest could not know that RSS is not > available. > > Check RSS availab

Re: [PATCH v5 12/21] virtio-net: Always set populate_hash

2023-10-27 Thread Jason Wang
On Tue, Oct 17, 2023 at 12:10 PM Akihiko Odaki wrote: > > The member is not cleared during reset so may have a stale value. Nit: I guess it should be "always unset populate_hash"? Thanks > > Signed-off-by: Akihiko Odaki > --- > hw/net/virtio-net.c | 1 + > 1 file changed, 1 insertion(+) > > d

Re: [PATCH v5 15/21] virtio-net: Do not clear VIRTIO_NET_F_HASH_REPORT

2023-10-27 Thread Jason Wang
On Tue, Oct 17, 2023 at 12:14 PM Akihiko Odaki wrote: > > virtio-net can report hash values even if the peer does not have a > virtio-net header. Do we need a compat flag for this? Thanks > > Signed-off-by: Akihiko Odaki > --- > hw/net/virtio-net.c | 2 -- > 1 file changed, 2 deletions(-) > >

Re: [PATCH v3 05/28] hw/xen: fix XenStore watch delivery to guest

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse When fire_watch_cb() found the response buffer empty, it would call deliver_watch() to generate the XS_WATCH_EVENT message in the response buffer and send an event channel notification to the guest… without actually *copying* the

Re: [PATCH] util/uuid: Define UUID_STR_LEN from UUID_NONE string

2023-10-27 Thread Philippe Mathieu-Daudé
On 27/10/23 08:54, Cédric Le Goater wrote: Cc: Fam Zheng Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater --- Follow up on : https://lore.kernel.org/qemu-devel/20231026070636.1165037-1-...@redhat.com/ include/qemu/uuid.h | 5 +++-- 1 file changed, 3 insertions(

Re: [PATCH v3 06/28] hw/xen: take iothread mutex in xen_evtchn_reset_op()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse The xen_evtchn_soft_reset() function requires the iothread mutex, but is also called for the EVTCHNOP_reset hypercall. Ensure the mutex is taken in that case. Fixes: a15b10978fe6 ("hw/xen: Implement EVTCHNOP_reset") Signed-off-b

Re: [PATCH v2 1/2] hw/ide: reset: cancel async DMA operation before resetting state

2023-10-27 Thread Fiona Ebner
Am 26.10.23 um 08:17 schrieb Michael Tokarev: > 06.09.2023 16:09, Fiona Ebner wrote: >> If there is a pending DMA operation during ide_bus_reset(), the fact >> that the IDEState is already reset before the operation is canceled >> can be problematic. In particular, ide_dma_cb() might be called and

Re: [PATCH v3 07/28] hw/xen: use correct default protocol for xen-block on x86

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse Even on x86_64 the default protocol is the x86-32 one if the guest doesn't specifically ask for x86-64. Fixes: b6af8926fb85 ("xen: add implementations of xen-block connect and disconnect functions...") Signed-off-by: David Wood

Re: [PATCH v3 08/28] i386/xen: Ignore VCPU_SSHOTTMR_future flag in set_singleshot_timer()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse Upstream Xen now ignores this flag¹, since the only guest kernel ever to use it was buggy. ¹ https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=19c6cbd909 Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- t

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse There's no need to force the user to assign a vdev. We can automatically assign one, starting at xvda and searching until we find the first disk name that's unused. This means we can now allow '-drive if=xen,file=xxx' to work wi

Re: [PATCH v3 14/28] hw/xen: add get_frontend_path() method to XenDeviceClass

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse The primary Xen console is special. The guest's side is set up for it by the toolstack automatically and not by the standard PV init sequence. Accordingly, its *frontend* doesn't appear in …/device/console/0 either; instead it a

Re: [PATCH 00/10] tests: Clean up global variables shadowing

2023-10-27 Thread Thomas Huth
On 09/10/2023 12.02, Philippe Mathieu-Daudé wrote: Clean up global variables shadowing in tests/ in order to be able to use -Wshadow with Clang. Philippe Mathieu-Daudé (10): system/qtest: Clean up global variable shadowing in qtest_server_init() tests/throttle: Clean up global variabl

Re: [PATCH v3 17/28] hw/xen: add support for Xen primary console in emulated mode

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse The primary console is special because the toolstack maps a page into the guest for its ring, and also allocates the guest-side event channel. The guest's grant table is even primed to export that page using a known grant ref#. A

Re: [PATCH v3 00/37] vfio: Adopt iommufd

2023-10-27 Thread Cédric Le Goater
On 10/27/23 08:17, Duan, Zhenzhong wrote: Hi Markus, -Original Message- From: Markus Armbruster Sent: Thursday, October 26, 2023 9:27 PM Subject: Re: [PATCH v3 00/37] vfio: Adopt iommufd Zhenzhong Duan writes: Hi, Thanks all for giving guides and comments on previous series, here

[PATCH v3 00/21] parallels: Add full dirty bitmap support

2023-10-27 Thread Alexander Ivanov
Parallels format driver: * make some preparation * add dirty bitmap saving * make dirty bitmap RW * fix broken checks * refactor leak check * add parallels format support to several tests You could find these patches in my repo: https://github.com/AlexanderIvanov-Virtuozzo/qemu/tree/parallels-v3

[PATCH v3 02/21] parallels: Move inactivation code to a separate function

2023-10-27 Thread Alexander Ivanov
We are going to add parallels image extensions storage and need a separate function for inactivation code. Signed-off-by: Alexander Ivanov --- block/parallels.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH v3 09/21] parallels: Create used bitmap even if checks needed

2023-10-27 Thread Alexander Ivanov
All the checks were fixed to work with used bitmap. Create used bitmap in parallels_open() even if need_check is true. Signed-off-by: Alexander Ivanov --- block/parallels.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH v3 12/21] parallels: Let image extensions work in RW mode

2023-10-27 Thread Alexander Ivanov
Now we support extensions saving and can let to work with them in read-write mode. Signed-off-by: Alexander Ivanov --- block/parallels-ext.c | 4 block/parallels.c | 17 - 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/block/parallels-ext.c b/block/para

[PATCH v3 16/21] parallels: Truncate images on the last used cluster

2023-10-27 Thread Alexander Ivanov
On an image closing there can be unused clusters in the end of the image. Truncate these clusters and update data_end field. Signed-off-by: Alexander Ivanov --- block/parallels.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/block/parallels.c b/block/p

[PATCH v3 18/21] parallels: Remove unnecessary data_end field

2023-10-27 Thread Alexander Ivanov
Since we have used bitmap, field data_end in BDRVParallelsState is redundant and can be removed. Add parallels_data_end() helper and remove data_end handling. Signed-off-by: Alexander Ivanov --- block/parallels.c | 33 + block/parallels.h | 1 - 2 files changed,

[PATCH v3 01/21] parallels: Set s->used_bmap to NULL in parallels_free_used_bitmap()

2023-10-27 Thread Alexander Ivanov
After used bitmap freeng s->used_bmap points to the freed memory. If we try to free used bitmap one more time it leads to double free error. Set s->used_bmap to NULL to exclude double free error. Signed-off-by: Alexander Ivanov --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff -

[PATCH v3 21/21] tests: Add parallels format support to image-fleecing

2023-10-27 Thread Alexander Ivanov
Use a different bitmap name for parallels images because their has own ID format, and can't contain an arbitrary string. Replace hardcoded 'qcow2' format to iotests.imgfmt. Add 'parallels' to supported formats. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/tests/image-fleecing | 13 ++

[PATCH v3 03/21] parallels: Make mark_used() a global function

2023-10-27 Thread Alexander Ivanov
We will need this function and a function for marking unused clusters (will be added in the next patch) in parallels-ext.c too. Let it be a global function parallels_mark_used(). Signed-off-by: Alexander Ivanov --- block/parallels.c | 14 -- block/parallels.h | 3 +++ 2 files change

[PATCH v3 08/21] parallels: Add a note about used bitmap in parallels_check_duplicate()

2023-10-27 Thread Alexander Ivanov
In parallels_check_duplicate() We use a bitmap for duplication detection. This bitmap is not related to used_bmap field in BDRVParallelsState. Add a comment about it to avoid confusion. Signed-off-by: Alexander Ivanov --- block/parallels.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-

[PATCH v3 07/21] parallels: Recreate used bitmap in parallels_check_leak()

2023-10-27 Thread Alexander Ivanov
In parallels_check_leak() file can be truncated. In this case the used bitmap would not comply to the file. Recreate the bitmap after file truncation. Signed-off-by: Alexander Ivanov --- block/parallels.c | 8 1 file changed, 8 insertions(+) diff --git a/block/parallels.c b/block/paral

[PATCH v3 17/21] parallels: Check unused clusters in parallels_check_leak()

2023-10-27 Thread Alexander Ivanov
Since we have used bitmap, leak check is useless. Transform parallels_truncate_unused_clusters() to parallels_check_unused_clusters() helper and use it in leak check. Signed-off-by: Alexander Ivanov --- block/parallels.c | 121 +- 1 file changed, 67 in

[PATCH v3 11/21] parallels: Mark parallels_inactivate GRAPH_RDLOCK, guard parallels_close

2023-10-27 Thread Alexander Ivanov
Add GRAPH_RDLOCK annotation to declare parallels_inactivate() have to hold a reader lock for the graph because it calls bdrv_get_device_or_node_name(), which accesses the parents list of a node. Assert we are in the main thread in parallels_close() and guard the code with GRAPH_RDLOCK_GUARD_MAINLO

[PATCH v3 13/21] parallels: Handle L1 entries equal to one

2023-10-27 Thread Alexander Ivanov
If all the bits in a dirty bitmap cluster are ones, the cluster shouldn't be written. Instead the corresponding L1 entry should be set to 1. Check if all bits in a memory region are ones and set 1 to L1 entries corresponding clusters filled with ones. Signed-off-by: Alexander Ivanov --- block/p

[PATCH v3 14/21] parallels: Make a loaded dirty bitmap persistent

2023-10-27 Thread Alexander Ivanov
After bitmap loading the bitmap is not persistent and is removed on image saving. Set bitmap persistence to true. Signed-off-by: Alexander Ivanov --- block/parallels-ext.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels-ext.c b/block/parallels-ext.c index ebda6b0a01..bb4478c3

[PATCH v3 19/21] tests: Add parallels images support to test 165

2023-10-27 Thread Alexander Ivanov
Use a different bitmap name for parallels images because their has own ID format, and can't contain an arbitrary string. Replace image reopen by shutdown/launch VM because parallels images doesn't support reopen. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/165 | 40 ++

[PATCH v3 04/21] parallels: Add parallels_mark_unused() helper

2023-10-27 Thread Alexander Ivanov
Add a helper to set unused areas in the used bitmap. Signed-off-by: Alexander Ivanov --- block/parallels.c | 17 + block/parallels.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/block/parallels.c b/block/parallels.c index e9a8cbe430..a30bb5fe0d 100644 --- a/block/para

RE: [PATCH v3 24/37] backends/iommufd: Introduce the iommufd object

2023-10-27 Thread Duan, Zhenzhong
>-Original Message- >From: Markus Armbruster >Sent: Thursday, October 26, 2023 9:28 PM >Subject: Re: [PATCH v3 24/37] backends/iommufd: Introduce the iommufd object > >Zhenzhong Duan writes: > >> From: Eric Auger >> >> Introduce an iommufd object which allows the interaction >> with th

[PATCH v3 06/21] parallels: Set data_end value in parallels_check_leak()

2023-10-27 Thread Alexander Ivanov
In parallels_check_leak() we change file size but don't correct data_end field of BDRVParallelsState structure. Fix it. Signed-off-by: Alexander Ivanov --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c index 33bb8f1084..d6dbb6757f 100

[PATCH v3 15/21] parallels: Reverse a conditional in parallels_check_leak() to reduce indents

2023-10-27 Thread Alexander Ivanov
Let the function return a success code if a file size is not bigger than image_end_offset. Thus we can decrease indents in the next code block. Signed-off-by: Alexander Ivanov --- block/parallels.c | 72 +++ 1 file changed, 36 insertions(+), 36 deletio

[PATCH v3 05/21] parallels: Move host clusters allocation to a separate function

2023-10-27 Thread Alexander Ivanov
For parallels images extensions we need to allocate host clusters without any connection to BAT. Move host clusters allocation code to allocate_host_clusters(). Signed-off-by: Alexander Ivanov --- block/parallels.c | 128 -- block/parallels.h | 4 ++

[PATCH v3 20/21] tests: Turned on 256, 299, 304 and block-status-cache for parallels format

2023-10-27 Thread Alexander Ivanov
These tests pass with parallels format. Add parallels to supporting formats for these tests. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/256 | 2 +- tests/qemu-iotests/299 | 2 +- tests/qemu-iotests/304 | 2 +- tests/qemu-

Re: [PATCH v5 04/21] net: Remove receive_raw()

2023-10-27 Thread Akihiko Odaki
On 2023/10/27 15:49, Jason Wang wrote: On Tue, Oct 17, 2023 at 12:09 PM Akihiko Odaki wrote: While netmap implements virtio-net header, it does not implement receive_raw(). The only user for raw is the announcing. Netmap probably doesn't it at all. In my understanding, the announcing *send

[PATCH v3 10/21] parallels: Add dirty bitmaps saving

2023-10-27 Thread Alexander Ivanov
Now dirty bitmaps can be loaded but there is no their saving. Add code for dirty bitmap storage. Signed-off-by: Alexander Ivanov --- block/parallels-ext.c | 167 ++ block/parallels.c | 16 +++- block/parallels.h | 5 ++ 3 files changed, 186 inse

Re: [PATCH v5 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-10-27 Thread Akihiko Odaki
On 2023/10/27 16:07, Jason Wang wrote: On Tue, Oct 17, 2023 at 12:10 PM Akihiko Odaki wrote: vhost requires eBPF for RSS. Even when eBPF is not available, virtio-net reported RSS availability, and raised a warning only after the guest requested RSS, and the guest could not know that RSS is not

Re: [PATCH v5 12/21] virtio-net: Always set populate_hash

2023-10-27 Thread Akihiko Odaki
On 2023/10/27 16:08, Jason Wang wrote: On Tue, Oct 17, 2023 at 12:10 PM Akihiko Odaki wrote: The member is not cleared during reset so may have a stale value. Nit: I guess it should be "always unset populate_hash"? I meant populate_hash should be always set to either of true or false in v

Re: [PATCH v5 15/21] virtio-net: Do not clear VIRTIO_NET_F_HASH_REPORT

2023-10-27 Thread Akihiko Odaki
On 2023/10/27 16:14, Jason Wang wrote: On Tue, Oct 17, 2023 at 12:14 PM Akihiko Odaki wrote: virtio-net can report hash values even if the peer does not have a virtio-net header. Do we need a compat flag for this? I don't think so. This change actually fixes the migration from a system wi

RE: [PATCH v3 00/37] vfio: Adopt iommufd

2023-10-27 Thread Duan, Zhenzhong
Hi Cédric, >-Original Message- >From: Cédric Le Goater >Sent: Friday, October 27, 2023 3:46 PM >Subject: Re: [PATCH v3 00/37] vfio: Adopt iommufd > >On 10/27/23 08:17, Duan, Zhenzhong wrote: >> Hi Markus, >> >>> -Original Message- >>> From: Markus Armbruster >>> Sent: Thursday, O

Re: [PATCH] tests: Fix printf format string in acpi-utils.c

2023-10-27 Thread Thomas Huth
On 27/10/2023 05.09, zhujun2 wrote: Inside of acpi_fetch_table() arguments are printed via fprintf but '%d' is used to print @flags (of type uint). Use '%u' instead. Signed-off-by: zhujun2 ^-- Could you please use the proper spelling of your name here

Re: [PATCH v3 18/28] hw/xen: only remove peers of PCI NICs on unplug

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse When the Xen guest asks to unplug *emulated* NICs, it's kind of unhelpful also to unplug the peer of the *Xen* PV NIC. Signed-off-by: David Woodhouse --- hw/i386/xen/xen_platform.c | 9 +++-- 1 file changed, 7 insertions

Re: [PATCH v3 24/37] backends/iommufd: Introduce the iommufd object

2023-10-27 Thread Markus Armbruster
"Duan, Zhenzhong" writes: >>-Original Message- >> From: Markus Armbruster >> Sent: Thursday, October 26, 2023 9:28 PM >> Subject: Re: [PATCH v3 24/37] backends/iommufd: Introduce the iommufd object >> >> Zhenzhong Duan writes: >> >>> From: Eric Auger >>> >>> Introduce an iommufd object

Re: [PATCH v3 19/28] hw/xen: update Xen PV NIC to XenDevice model

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse This allows us to use Xen PV networking with emulated Xen guests, and to add them on the command line or hotplug. Signed-off-by: David Woodhouse --- hw/net/meson.build| 2 +- hw/net/trace-events | 11 + hw/

Re: [PATCH] MAINTAINERS: Add the can documenation file to the CAN section

2023-10-27 Thread Philippe Mathieu-Daudé
On 27/10/23 08:09, Thomas Huth wrote: Add can.rst to the corresponding section in MAINTAINERS, so that the maintainers get CC:-ed on corresponding patches. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 20/28] net: do not delete nics in net_cleanup()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse In net_cleanup() we only need to delete the netdevs, as those may have state which outlives Qemu when it exits, and thus may actually need to be cleaned up on exit. The nics, on the other hand, are owned by the device which crea

Re: [PATCH] MAINTAINERS: Make sure that gicv3_internal.h is covered, too

2023-10-27 Thread Philippe Mathieu-Daudé
On 27/10/23 08:07, Thomas Huth wrote: gic_internal.h is already covered by the "ARM cores" section. Let's adapt the entry with a wildcard to cover gicv3_internal.h, too. Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe M

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread David Woodhouse
On Fri, 2023-10-27 at 08:30 +0100, Durrant, Paul wrote: > > > +    if (blockdev->props.vdev.type == XEN_BLOCK_VDEV_TYPE_INVALID) { > > +    XenBus *xenbus = XEN_BUS(qdev_get_parent_bus(DEVICE(xendev))); > > +    char fe_path[XENSTORE_ABS_PATH_MAX + 1]; > > +    char *value; > > +  

Re: [PATCH 0/3] migration: Downtime tracepoints

2023-10-27 Thread Joao Martins
On 26/10/2023 21:07, Peter Xu wrote: > On Thu, Oct 26, 2023 at 08:33:13PM +0100, Joao Martins wrote: >> Sure. For the fourth patch, feel free to add Suggested-by and/or a Link, >> considering it started on the other patches (if you also agree it is right). >> The >> patches ofc are enterily differ

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread Durrant, Paul
On 27/10/2023 09:45, David Woodhouse wrote: On Fri, 2023-10-27 at 08:30 +0100, Durrant, Paul wrote: +    if (blockdev->props.vdev.type == XEN_BLOCK_VDEV_TYPE_INVALID) { +    XenBus *xenbus = XEN_BUS(qdev_get_parent_bus(DEVICE(xendev))); +    char fe_path[XENSTORE_ABS_PATH_MAX + 1]; +  

Re: [PATCH v3 21/28] xen-platform: unplug AHCI disks

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse To support Xen guests using the Q35 chipset, the unplug protocol needs to also remove AHCI disks. Make pci_xen_ide_unplug() more generic, iterating over the children of the PCI device and destroying the "ide-hd" devices. That wo

Re: [PATCH v3 01/37] vfio/container: Move IBM EEH related functions into spapr_pci_vfio.c

2023-10-27 Thread Cédric Le Goater
On 10/26/23 12:30, Zhenzhong Duan wrote: With vfio_eeh_as_ok/vfio_eeh_as_op moved and made static, vfio.h becomes empty and is deleted. No functional changes intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- include

Re: [PATCH v3 02/37] vfio/container: Move vfio_container_add/del_section_window into spapr.c

2023-10-27 Thread Cédric Le Goater
On 10/26/23 12:30, Zhenzhong Duan wrote: vfio_container_add/del_section_window are spapr specific functions, so move them into spapr.c to make container.c cleaner. No functional changes intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater T

Re: [PATCH v3 22/28] net: add qemu_{configure,create}_nic_device(), qemu_find_nic_info()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse Most code which directly accesses nd_table[] and nb_nics uses them for one of two things. Either "I have created a NIC device and I'd like a configuration for it", or "I will create a NIC device *if* there is a configuration for

Re: [PATCH v3 03/37] vfio/container: Move spapr specific init/deinit into spapr.c

2023-10-27 Thread Cédric Le Goater
On 10/26/23 12:30, Zhenzhong Duan wrote: Move spapr specific init/deinit code into spapr.c and wrap them with vfio_spapr_container_init/deinit, this way footprint of spapr is further reduced, vfio_prereg_listener could also be made static. vfio_listener_release is unnecessary when prereg_listene

Re: [PATCH v3 04/37] vfio/spapr: Make vfio_spapr_create/remove_window static

2023-10-27 Thread Cédric Le Goater
On 10/26/23 12:30, Zhenzhong Duan wrote: vfio_spapr_create_window calls vfio_spapr_remove_window, With reoder of definition of the two, we can make vfio_spapr_create/remove_window static. No functional changes intended. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks,

Re: [PATCH v3 05/37] vfio/common: Move vfio_host_win_add/del into spapr.c

2023-10-27 Thread Cédric Le Goater
On 10/26/23 12:30, Zhenzhong Duan wrote: Only spapr supports a customed host window list, other vfio driver assume 64bit host window. So remove the check in listener callback and move vfio_host_win_add/del into spapr.c and make static. Suggested-by: Alex Williamson Signed-off-by: Zhenzhong Duan

Re: [PATCH v3 23/28] net: report list of available models according to platform

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse By noting the models for which a configuration was requested, we can give the user an accurate list of which NIC models were actually available on the platform/configuration that was otherwise chosen. Signed-off-by: David Woodho

[PULL 00/11] testing patches (+ 1 deprecation patch)

2023-10-27 Thread Thomas Huth
Hi Stefan! The following changes since commit a95260486aa7e78d7c7194eba65cf03311ad94ad: Merge tag 'pull-tcg-20231023' of https://gitlab.com/rth7680/qemu into staging (2023-10-23 14:45:46 -0700) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-202

[PULL 11/11] ipmi-bt-test: force ipv4

2023-10-27 Thread Thomas Huth
From: Vladimir Sementsov-Ogievskiy We open ipv4 listening socket. But "localhost" in qemu parameters may load to Qemu trying to connect with ipv6 and fail with "Connection refused". Force ipv4 by using ipv4 ip address. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-ID: <20231018191123.1176

[PULL 03/11] tests/virtio-scsi: Clean up global variable shadowing

2023-10-27 Thread Thomas Huth
From: Philippe Mathieu-Daudé Rename the (unused) 'allow' argument, following the pattern used by the other tests in this file. This fixes: tests/qtest/virtio-scsi-test.c:159:61: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void hotplug(void *obj, void

[PULL 01/11] system/qtest: Clean up global variable shadowing in qtest_server_init()

2023-10-27 Thread Thomas Huth
From: Philippe Mathieu-Daudé Rename the variable to fix: softmmu/qtest.c:869:13: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] Object *qtest; ^ softmmu/qtest.c:53:15: note: previous declaration is here static QTest *qtest;

[PULL 04/11] tests/cdrom-test: Clean up global variable shadowing in prepare_image()

2023-10-27 Thread Thomas Huth
From: Philippe Mathieu-Daudé Rename the variable to fix: tests/qtest/cdrom-test.c:40:50: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static int prepare_image(const char *arch, char *isoimage) ^ tests/qtest

[PULL 08/11] tests/coroutine: Clean up global variable shadowing

2023-10-27 Thread Thomas Huth
From: Philippe Mathieu-Daudé Rename the global variable to avoid: tests/unit/test-coroutine.c:430:11: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] bool *done = opaque; ^ tests/unit/test-coroutine.c:438:10: error: declaration shadows a variab

[PULL 07/11] tests/aio: Clean up global variable shadowing

2023-10-27 Thread Thomas Huth
From: Philippe Mathieu-Daudé Rename the argument to fix: tests/unit/test-aio.c:130:44: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void set_event_notifier(AioContext *ctx, EventNotifier *notifier, ^ tests

[PULL 06/11] tests/npcm7xx_adc: Clean up global variable shadowing

2023-10-27 Thread Thomas Huth
From: Philippe Mathieu-Daudé Rename the global 'adc' variable in order to avoid: tests/qtest/npcm7xx_adc-test.c:98:58: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static uint32_t adc_read_con(QTestState *qts, const ADC *adc)

[PULL 05/11] tests/rtl8139: Clean up global variable shadowing

2023-10-27 Thread Thomas Huth
From: Philippe Mathieu-Daudé Rename the variable to fix: tests/qtest/rtl8139-test.c:28:33: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void save_fn(QPCIDevice *dev, int devfn, void *data) ^ tests/qtest/rtl8139-test.

[PULL 10/11] tests/vm/freebsd: Add additional library paths for libfdt

2023-10-27 Thread Thomas Huth
libfdt is installed in /usr/local on FreeBSD, and since this library does not have a pkg-config file, we have to specify the paths manually. This way we can avoid that Meson has to recompile the dtc subproject each time. Message-ID: <20231016161053.39150-1-th...@redhat.com> Reviewed-by: Warner Los

[PULL 09/11] docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated

2023-10-27 Thread Thomas Huth
As we've seen in the past, it's useful for deprecating old machine types to finally be able to get of legacy code or do other clean-ups (see e.g. commit ea985d235b868047 that was used to drop the PCI code in the 128k bios binaries to free some precious space in those binaries). So let's continue d

[PULL 02/11] tests/throttle: Clean up global variable shadowing

2023-10-27 Thread Thomas Huth
From: Philippe Mathieu-Daudé Follow all other tests pattern from this file, use the global 'cfg' variable to fix: tests/unit/test-throttle.c:621:20: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] ThrottleConfig cfg; ^ tests/unit/test-

RE: [PATCH v3 24/37] backends/iommufd: Introduce the iommufd object

2023-10-27 Thread Duan, Zhenzhong
>-Original Message- >From: Markus Armbruster >Sent: Friday, October 27, 2023 4:31 PM >Subject: Re: [PATCH v3 24/37] backends/iommufd: Introduce the iommufd object > >"Duan, Zhenzhong" writes: > >>>-Original Message- >>> From: Markus Armbruster >>> Sent: Thursday, October 26, 20

Re: [PATCH v3 24/28] net: add qemu_create_nic_bus_devices()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse This will instantiate any NICs which live on a given bus type. Each bus is allowed *one* substitution (for PCI it's virtio → virtio-net-pci, for Xen it's xen → xen-net-device; no point in overengineering it unless we actually wan

Re: [PATCH v3 25/28] hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse The loop over nd_table[] to add PCI NICs is repeated in quite a few places. Add a helper function to do it. Some platforms also try to instantiate a specific model in a specific slot, to match the real hardware. Add pci_init_nic

Re: [PATCH v3 26/28] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse Eliminate direct access to nd_table[] and nb_nics by processing the the ISA NICs first and then calling pci_init_nic_devices() for the test. It's important to do this *before* the subsequent patch which registers the Xen PV netw

Re: [PATCH v3] qcow2: keep reference on zeroize with discard-no-unref enabled

2023-10-27 Thread Hanna Czenczek
On 03.10.23 14:52, Jean-Louis Dupond wrote: When the discard-no-unref flag is enabled, we keep the reference for normal discard requests. But when a discard is executed on a snapshot/qcow2 image with backing, the discards are saved as zero clusters in the snapshot image. When committing the snap

Re: [PATCH v3 27/28] hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse When instantiating XenBus itself, for each NIC which is configured with either the model unspecified, or set to to "xen" or "xen-net-device", create a corresponding xen-net-device for it. Now we can launch emulated Xen guests wi

Re: [PATCH] MAINTAINERS: Add the can documenation file to the CAN section

2023-10-27 Thread Philippe Mathieu-Daudé
On 27/10/23 08:09, Thomas Huth wrote: Add can.rst to the corresponding section in MAINTAINERS, so that the maintainers get CC:-ed on corresponding patches. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) Since I'm preparing a PR, I'm queuing this patch usin

[PATCH] MAINTAINERS: update libvirt devel mailing list address

2023-10-27 Thread Daniel P . Berrangé
Effective immediately, the libvirt project has moved its list off libvir-l...@redhat.com, to de...@lists.libvirt.org Signed-off-by: Daniel P. Berrangé --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index d36aa44661..a1324f393d 100644

[risu PATCH 2/2] s390x.risu: Add some instructions with a length of 48 bits

2023-10-27 Thread Thomas Huth
Now that risugen can handle instructions with a length > 32 bit, we can test some instructions with the length of 48-bit, too. Signed-off-by: Thomas Huth --- s390x.risu | 20 1 file changed, 20 insertions(+) diff --git a/s390x.risu b/s390x.risu index 1661be6..b70678a 100644

[risu PATCH 1/2] risugen: allow instructions with length > 32 bit

2023-10-27 Thread Thomas Huth
RISU currently only supports instructions with a length of 16 bit or 32 bit, however classical CISC systems like s390x also have instructions that are longer than 32 bit. Thus let's change the generator to support longer instructions, too. This adds support for 48-bit instructions on s390x, while

[risu PATCH 0/2] Add support for instructions with length > 32 bit

2023-10-27 Thread Thomas Huth
RISU currently only supports instructions with a length of 16 bit or 32 bit, however classical CISC systems like s390x also have instructions that are longer than 32 bit. The first patch improves the generator to support instructions with more than 32 bits, and the second patch adds some 48-bit ins

RE: [Question] x86/microvm: why has_hotpluggable_cpus = false but hot(ub)plug APIs exist?

2023-10-27 Thread Salil Mehta via
> From: Igor Mammedov > Sent: Thursday, October 26, 2023 1:09 PM > To: Salil Mehta > > On Wed, 25 Oct 2023 09:54:07 + > Salil Mehta wrote: > > > > From: David Hildenbrand > > > Sent: Wednesday, October 25, 2023 10:32 AM > > > To: Salil Mehta ; Igor Mammedov > > > ; Salil Mehta > > > > >

Re: [PATCH v3] qcow2: keep reference on zeroize with discard-no-unref enabled

2023-10-27 Thread Jean-Louis Dupond
On 27/10/2023 11:49, Hanna Czenczek wrote: On 03.10.23 14:52, Jean-Louis Dupond wrote: When the discard-no-unref flag is enabled, we keep the reference for normal discard requests. But when a discard is executed on a snapshot/qcow2 image with backing, the discards are saved as zero clusters in

RE: [PATCH V6 0/9] Add architecture agnostic code to support vCPU Hotplug

2023-10-27 Thread Salil Mehta via
Hi Igor, > From: Igor Mammedov > Sent: Thursday, October 26, 2023 1:41 PM > To: Salil Mehta > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; m...@kernel.org; jean- > phili...@linaro.org; Jonathan Cameron ; > lpieral...@kernel.org; peter.mayd...@linaro.org; > richard.hender...@linaro.org; andrew

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread David Woodhouse
On Fri, 2023-10-27 at 10:01 +0100, Durrant, Paul wrote: > > This code is allocating a name automatically so I think the onus is on > it not create a needless clash which is likely to have unpredictable > results depending on what the guest is. Just avoid any aliasing in the > first place and th

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread Durrant, Paul
On 27/10/2023 11:25, David Woodhouse wrote: On Fri, 2023-10-27 at 10:01 +0100, Durrant, Paul wrote: This code is allocating a name automatically so I think the onus is on it not create a needless clash which is likely to have unpredictable results depending on what the guest is. Just avoid any

[PATCH v3] tests/avocado: add test to exercize processor address space memory bound checks

2023-10-27 Thread Ani Sinha
QEMU has validations to make sure that a VM is not started with more memory (static and hotpluggable memory) than what the guest processor can address directly with its addressing bits. This change adds a test to make sure QEMU fails to start with a specific error message when an attempt is made to

Re: [PATCH 4/7] qcow2: make subclusters discardable

2023-10-27 Thread Jean-Louis Dupond
On 20/10/2023 23:56, Andrey Drobyshev wrote: This commit makes the discard operation work on the subcluster level rather than cluster level. It introduces discard_l2_subclusters() function and makes use of it in qcow2 discard implementation, much like it's done with zero_in_l2_slice() / zero_l2_

Re: [PULL v2 29/53] hw/i386: Remove now redundant TYPE_ACPI_GED_X86

2023-10-27 Thread Igor Mammedov
On Sat, 21 Oct 2023 00:54:56 +0100 Salil Mehta wrote: > Hi Bernhard, > > On 19/10/2023 11:33, Bernhard Beschow wrote: > > > > > > Am 18. Oktober 2023 17:38:33 UTC schrieb Salil Mehta > > : > >> Hello, > > > > Hi Salil, > > > >> Can we assume that every machine type will have all the f

Re: [PATCH 00/10] hw/arm: Move 'hw/arm/boot.h' from header to source

2023-10-27 Thread Peter Maydell
On Wed, 25 Oct 2023 at 07:54, Philippe Mathieu-Daudé wrote: > > Almost no ARM board header requires "hw/arm/boot.h". > Move this header inclusion to the source. > > Philippe Mathieu-Daudé (10): > hw/arm/allwinner-a10: Remove 'hw/arm/boot.h' from header > hw/arm/allwinner-h3: Remove 'hw/arm/boo

Re: [PATCH v3 0/9] hw/arm/pxa2xx: SysBus/QDev fixes

2023-10-27 Thread Peter Maydell
On Fri, 20 Oct 2023 at 14:03, Philippe Mathieu-Daudé wrote: > > Missing review: 6-9 > > Hi, > > Extracted from a bigger series which enforce QDev state machine > (qdev instance must be realized before external API is used on > it). > > While here, pxa2xx i2c/intc devices received some qdev fondnes

Re: [PATCH] hw/arm: Avoid using 'first_cpu' when first ARM CPU is reachable

2023-10-27 Thread Peter Maydell
On Wed, 25 Oct 2023 at 07:59, Philippe Mathieu-Daudé wrote: > > Prefer using a well known local first CPU rather than a global one. > > Signed-off-by: Philippe Mathieu-Daudé > --- Applied to target-arm.next, thanks. -- PMM

Re: [PULL v2 29/53] hw/i386: Remove now redundant TYPE_ACPI_GED_X86

2023-10-27 Thread Igor Mammedov
On Wed, 18 Oct 2023 18:38:33 +0100 Salil Mehta wrote: > Hello, > Can we assume that every machine type will have all the features which a > GED Device can multiplex present together? like will Memory and CPU > Hotplug makes sense for all the type of machines? > > If answer is no, then shouldn'

Re: [PATCH v2 RESEND] misc/led: LED state is set opposite of what is expected

2023-10-27 Thread Peter Maydell
On Tue, 24 Oct 2023 at 20:20, Glenn Miles wrote: > > Testing of the LED state showed that when the LED polarity was > set to GPIO_POLARITY_ACTIVE_LOW and a low logic value was set on > the input GPIO of the LED, the LED was being turn off when it was > expected to be turned on. > > Signed-off-by:

[PATCH v7 2/3] hw/ppc: Add emulation of AmigaOne XE board

2023-10-27 Thread BALATON Zoltan
The AmigaOne is a rebranded MAI Teron board that uses U-Boot firmware with patches to support AmigaOS and is very similar to pegasos2 so can be easily emulated sharing most code with pegasos2. The reason to emulate it is that AmigaOS comes in different versions for AmigaOne and PegasosII which only

[PATCH v7 3/3] tests/avocado: Add test for amigaone board

2023-10-27 Thread BALATON Zoltan
Add an avocado test for the amigaone board that tests it with the firmware. Signed-off-by: BALATON Zoltan --- tests/avocado/ppc_amiga.py | 38 ++ 1 file changed, 38 insertions(+) create mode 100644 tests/avocado/ppc_amiga.py diff --git a/tests/avocado/ppc_am

[PATCH v7 1/3] hw/pci-host: Add emulation of Mai Logic Articia S

2023-10-27 Thread BALATON Zoltan
The Articia S is a generic chipset supporting several different CPUs that were among others used on some PPC boards. This is a minimal emulation of the parts needed for emulating the AmigaOne board. Signed-off-by: BALATON Zoltan Tested-by: Rene Engel --- hw/pci-host/Kconfig | 5 + h

[PATCH v7 0/3] Add emulation of AmigaOne XE board

2023-10-27 Thread BALATON Zoltan
Changes in v7: - Increase default memory size to 512m to match pegasos2 and sam460ex and it's a better default for AmigaOS Changes in v6: - Dropped patch 1, now it's Based-on: <20231024224056.842607-1-mark.cave-ayl...@ilande.co.uk> ([PATCH v2 0/3] ide: implement simple legacy/native mode switchi

  1   2   3   >