Re: [PATCH 4/7] block: Drop detached child from ignore list

2021-11-10 Thread Hanna Reitz
On 10.11.21 14:38, Vladimir Sementsov-Ogievskiy wrote: 04.11.2021 13:38, Hanna Reitz wrote: bdrv_attach_child_common_abort() restores the parent's AioContext.  To do so, the child (which was supposed to be attached, but is now detached again by this abort handler) is added to the ignore list for

Re: [PATCH 1/3] qdict: make available dump_qobject(), dump_qdict(), dump_qlist()

2021-11-10 Thread Laurent Vivier
On 10/11/2021 17:17, Markus Armbruster wrote: Laurent Vivier writes: move them from block/qapi.c to qobject/qdict.c, qobject/qlist.c, qobject/qobject.c This is useful to debug qobjects Signed-off-by: Laurent Vivier I think qobject_to_json_pretty() is better suited to debugging, because it

Re: [PATCH 05/15] hw/nvme: Add support for SR-IOV

2021-11-10 Thread Klaus Jensen
On Nov 10 14:42, Lukasz Maniak wrote: > On Mon, Nov 08, 2021 at 08:56:43AM +0100, Klaus Jensen wrote: > > On Nov 4 15:30, Lukasz Maniak wrote: > > > On Tue, Nov 02, 2021 at 06:33:31PM +0100, Lukasz Maniak wrote: > > > > On Tue, Nov 02, 2021 at 03:33:15PM +0100, Klaus Jensen wrote: > > > > > On Oct

Re: [PATCH 1/3] qdict: make available dump_qobject(), dump_qdict(), dump_qlist()

2021-11-10 Thread Markus Armbruster
Laurent Vivier writes: > move them from block/qapi.c to qobject/qdict.c, qobject/qlist.c, > qobject/qobject.c > > This is useful to debug qobjects > > Signed-off-by: Laurent Vivier I think qobject_to_json_pretty() is better suited to debugging, because it preserves differences like the one betw

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-10 Thread Christian Schoenebeck
On Mittwoch, 10. November 2021 16:14:19 CET Stefan Hajnoczi wrote: > On Wed, Nov 10, 2021 at 02:14:43PM +0100, Christian Schoenebeck wrote: > > On Mittwoch, 10. November 2021 11:05:50 CET Stefan Hajnoczi wrote: > > As you are apparently reluctant for changing the virtio specs, what about > > introd

Re: Poking around bdrv_is_inserted()

2021-11-10 Thread Kevin Wolf
Am 09.11.2021 um 16:20 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 09.11.2021 um 07:44 hat Markus Armbruster geschrieben: > >> Screwed up qemu-de...@nongnu.org, sorry for the inconvenience. > >> > >> Markus Armbruster writes: > >> > >> > bdrv_is_inserted() returns false wh

Re: [PATCH 2/7] block: Manipulate children list in .attach/.detach

2021-11-10 Thread Hanna Reitz
On 10.11.21 13:51, Vladimir Sementsov-Ogievskiy wrote: 04.11.2021 13:38, Hanna Reitz wrote: The children list is specific to BDS parents.  We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-10 Thread Stefan Hajnoczi
On Wed, Nov 10, 2021 at 02:14:43PM +0100, Christian Schoenebeck wrote: > On Mittwoch, 10. November 2021 11:05:50 CET Stefan Hajnoczi wrote: > As you are apparently reluctant for changing the virtio specs, what about > introducing those discussed virtio capabalities either as experimental ones > w

Re: [PATCH 2/7] block: Manipulate children list in .attach/.detach

2021-11-10 Thread Hanna Reitz
On 10.11.21 13:46, Vladimir Sementsov-Ogievskiy wrote: 04.11.2021 13:38, Hanna Reitz wrote: The children list is specific to BDS parents.  We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has

Re: qemu-img.c possibly overflowing shifts by BDRV_SECTOR_BITS

2021-11-10 Thread Peter Maydell
On Wed, 10 Nov 2021 at 11:36, Kevin Wolf wrote: > > Am 09.11.2021 um 20:07 hat Peter Maydell geschrieben: > > Hi; Coverity is complaining about some of the places in qemu-img.c > > where it takes a 32-bit variable and shifts it left by BDRV_SECTOR_BITS > > to convert a sector count to a byte count

[PATCH 3/3] tests/qtest: add some tests for virtio-net failover

2021-11-10 Thread Laurent Vivier
Add test cases to test several error cases that must be generated by invalid failover configuration. Add a combination of coldplug and hotplug test cases to be sure the primary is correctly managed according the presence or not of the STANDBY feature. Signed-off-by: Laurent Vivier --- tests/qte

[PATCH 2/3] qtest/libqos: add a function to initialize secondary PCI buses

2021-11-10 Thread Laurent Vivier
Scan the PCI devices to find bridge and set PCI_SECONDARY_BUS and PCI_SUBORDINATE_BUS (algorithm from seabios) Signed-off-by: Laurent Vivier --- include/hw/pci/pci_bridge.h | 8 +++ tests/qtest/libqos/pci.c| 118 tests/qtest/libqos/pci.h| 1 + 3 f

Re: [PATCH v9 7/8] qmp: add QMP command x-query-virtio-queue-element

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command shows the information of a VirtQueue element. > > Signed-off-by: Jonah Palmer [...] > diff --git a/qapi/virtio.json b/qapi/virtio.json > index 0f65044..c57fbc5 100644 > --- a/qapi/virtio.json > +++ b/qapi/virtio.json > @@ -1061,

[PATCH 1/3] qdict: make available dump_qobject(), dump_qdict(), dump_qlist()

2021-11-10 Thread Laurent Vivier
move them from block/qapi.c to qobject/qdict.c, qobject/qlist.c, qobject/qobject.c This is useful to debug qobjects Signed-off-by: Laurent Vivier --- block/qapi.c | 82 +- include/qapi/qmp/qdict.h | 2 + include/qapi/qmp/qlist.h | 1 + inc

[PATCH 0/3] tests/qtest: add some tests for virtio-net failover

2021-11-10 Thread Laurent Vivier
This series adds a qtest entry to test virtio-net failover feature. We check following error cases: - check missing id on device with failover_pair_id triggers an error - check a primary device plugged on a bus that doesn't support hotplug triggers an error We check the status of the machine b

Re: [PATCH v9 5/8] qmp: decode feature & status bits in virtio-status

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > Display feature names instead of bitmaps for host, guest, and > backend for VirtIODevice. > > Display status names instead of bitmaps for VirtIODevice. > > Display feature names instead of bitmaps for backend, protocol, > acked, and features (hdev-

Re: [PATCH 05/15] hw/nvme: Add support for SR-IOV

2021-11-10 Thread Lukasz Maniak
On Mon, Nov 08, 2021 at 08:56:43AM +0100, Klaus Jensen wrote: > On Nov 4 15:30, Lukasz Maniak wrote: > > On Tue, Nov 02, 2021 at 06:33:31PM +0100, Lukasz Maniak wrote: > > > On Tue, Nov 02, 2021 at 03:33:15PM +0100, Klaus Jensen wrote: > > > > On Oct 7 18:23, Lukasz Maniak wrote: > > > > > This p

Re: [PATCH 4/7] block: Drop detached child from ignore list

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 13:38, Hanna Reitz wrote: bdrv_attach_child_common_abort() restores the parent's AioContext. To do so, the child (which was supposed to be attached, but is now detached again by this abort handler) is added to the ignore list for the AioContext changing functions. However, since we m

Re: [PATCH v9 8/8] hmp: add virtio commands

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This patch implements the HMP versions of the virtio QMP commands. > > Signed-off-by: Jonah Palmer > --- > hmp-commands-info.hx | 218 ++ > include/monitor/hmp.h | 5 + > monitor/hmp-cmds.c| 358 > +

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-10 Thread Christian Schoenebeck
On Mittwoch, 10. November 2021 11:05:50 CET Stefan Hajnoczi wrote: > > > > So looks like it was probably still easier and realistic to just add > > > > virtio > > > > capabilities for now for allowing to exceed current descriptor limit. > > > > > > I'm still not sure why virtio-net, virtio-blk, vi

Re: [PATCH v9 4/8] qmp: add QMP command x-query-virtio-status

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command shows the status of a VirtIODevice, including > its corresponding vhost device status (if active). > > Next patch will improve output by decoding feature bits, including > vhost device's feature bits (backend, protocol, acked, and

Re: [PATCH 3/7] block: Unite remove_empty_child and child_free

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 13:38, Hanna Reitz wrote: Now that bdrv_remove_empty_child() no longer removes the child from the parent's children list but only checks that it is not in such a list, it is only a wrapper around bdrv_child_free() that checks that the child is empty and unused. That should apply to al

Re: [PATCH 2/7] block: Manipulate children list in .attach/.detach

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 13:38, Hanna Reitz wrote: The children list is specific to BDS parents. We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has the advantage that a BdrvChild is removed from the child

Re: [PATCH 2/7] block: Manipulate children list in .attach/.detach

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 13:38, Hanna Reitz wrote: The children list is specific to BDS parents. We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has the advantage that a BdrvChild is removed from the child

Re: [PATCH 1/7] stream: Traverse graph after modification

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 13:38, Hanna Reitz wrote: bdrv_cor_filter_drop() modifies the block graph. That means that other parties can also modify the block graph before it returns. Therefore, we cannot assume that the result of a graph traversal we did before remains valid afterwards. We should thus fetch `

Re: [PATCH v9 3/8] qmp: add QMP command x-query-virtio

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command lists all the instances of VirtIODevice with > their QOM paths and virtio type/name. > > Signed-off-by: Jonah Palmer [...] > diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json > index 4912b97..1512ada 100644 > --- a/qapi

Re: qemu-img.c possibly overflowing shifts by BDRV_SECTOR_BITS

2021-11-10 Thread Kevin Wolf
Am 09.11.2021 um 20:07 hat Peter Maydell geschrieben: > Hi; Coverity is complaining about some of the places in qemu-img.c > where it takes a 32-bit variable and shifts it left by BDRV_SECTOR_BITS > to convert a sector count to a byte count, because it's doing the > shift in 32-bits rather than 64

[RFC PATCH v3] hw/nvme:Adding Support for namespace management

2021-11-10 Thread Naveen
From: Naveen Nagar This patch supports namespace management : create and delete operations This patch has been tested with the following command and size of image file for unallocated namespaces is taken as 0GB. ns_create will look into the list of unallocated namespaces and it will initialize th

[PATCH v9 7/8] qmp: add QMP command x-query-virtio-queue-element

2021-11-10 Thread Jonah Palmer
From: Laurent Vivier This new command shows the information of a VirtQueue element. Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 9 +++ hw/virtio/virtio.c | 154 + qapi/virtio.json| 177

[PATCH v9 5/8] qmp: decode feature & status bits in virtio-status

2021-11-10 Thread Jonah Palmer
From: Laurent Vivier Display feature names instead of bitmaps for host, guest, and backend for VirtIODevice. Display status names instead of bitmaps for VirtIODevice. Display feature names instead of bitmaps for backend, protocol, acked, and features (hdev->features) for vhost devices. Decode

[PATCH v9 4/8] qmp: add QMP command x-query-virtio-status

2021-11-10 Thread Jonah Palmer
From: Laurent Vivier This new command shows the status of a VirtIODevice, including its corresponding vhost device status (if active). Next patch will improve output by decoding feature bits, including vhost device's feature bits (backend, protocol, acked, and features). Also will decode status

[PATCH v9 8/8] hmp: add virtio commands

2021-11-10 Thread Jonah Palmer
From: Laurent Vivier This patch implements the HMP versions of the virtio QMP commands. Signed-off-by: Jonah Palmer --- hmp-commands-info.hx | 218 ++ include/monitor/hmp.h | 5 + monitor/hmp-cmds.c| 358 ++ 3 f

[PATCH v9 2/8] virtio: add vhost support for virtio devices

2021-11-10 Thread Jonah Palmer
This patch adds a get_vhost() callback function for VirtIODevices that returns the device's corresponding vhost_dev structure if the vhost device is running. This patch also adds a vhost_started flag for VirtIODevices. Previously, a VirtIODevice wouldn't be able to tell if its corresponding vhost

[PATCH v9 1/8] virtio: drop name parameter for virtio_init()

2021-11-10 Thread Jonah Palmer
This patch drops the name parameter for the virtio_init function. The pair between the numeric device ID and the string device ID (name) of a virtio device already exists, but not in a way that lets us map between them. This patch will let us do this and removes the need for the name parameter in

[PATCH v9 0/8] hmp,qmp: Add commands to introspect virtio devices

2021-11-10 Thread Jonah Palmer
This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing previous patchset from Oct. 27 (v8). Original patches are from Laurent Vivier from May 2020. Rebase from v8 to v9 includes renaming of 'x-' prefixed QMP commands, adding the

[PATCH v9 3/8] qmp: add QMP command x-query-virtio

2021-11-10 Thread Jonah Palmer
From: Laurent Vivier This new command lists all the instances of VirtIODevice with their QOM paths and virtio type/name. Signed-off-by: Jonah Palmer --- hw/virtio/meson.build | 2 ++ hw/virtio/virtio-stub.c| 14 hw/virtio/virtio.c | 27 +++ in

[PATCH v9 6/8] qmp: add QMP commands for virtio/vhost queue-status

2021-11-10 Thread Jonah Palmer
From: Laurent Vivier These new commands show the internal status of a VirtIODevice's VirtQueue and a vhost device's vhost_virtqueue (if active). Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 14 +++ hw/virtio/virtio.c | 103 qapi/virtio.json| 250

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-10 Thread Stefan Hajnoczi
On Tue, Nov 09, 2021 at 02:09:59PM +0100, Christian Schoenebeck wrote: > On Dienstag, 9. November 2021 11:56:35 CET Stefan Hajnoczi wrote: > > On Thu, Nov 04, 2021 at 03:41:23PM +0100, Christian Schoenebeck wrote: > > > On Mittwoch, 3. November 2021 12:33:33 CET Stefan Hajnoczi wrote: > > > > On Mo

Re: [PULL 0/3] jobs: deprecate drive-backup qmp command

2021-11-10 Thread Richard Henderson
On 11/9/21 6:52 PM, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit 2b22e7540d6ab4efe82d442363e3fc900cea6584: Merge tag 'm68k-for-6.2-pull-request' of git://github.com/vivier/qemu-m68k into staging (2021-11-09 13:16:56 +0100) are available in the Git repository at: