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

2022-03-07 Thread Jonah Palmer
doing this we get (1) simpler schema, (2) smaller generated code, and (3) less maintenance burden for when new things are added (e.g. devices, device features, etc.).] Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 9 +++ hw/virtio/virtio.c | 154

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

2022-03-07 Thread Jonah Palmer
From: Laurent Vivier This patch implements the HMP versions of the virtio QMP commands. [Jonah: Fixed virtio hmp command output format (e.g. use PRI types).] Signed-off-by: Jonah Palmer --- hmp-commands-info.hx | 70 include/monitor/hmp.h | 5 + monitor/hmp-cmds.c| 311

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

2022-03-14 Thread Jonah Palmer
My apologies for not notifying earlier but I have been looking into these errors. Hopefully should be able to get a fix sent out within the week. Thanks Jonah On 3/7/22 17:46, Michael S. Tsirkin wrote: On Mon, Mar 07, 2022 at 08:08:33AM -0500, Jonah Palmer wrote: This series introduces new

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

2021-10-12 Thread Jonah Palmer
On 10/7/21 9:27 AM, Eric Blake wrote: On Tue, Oct 05, 2021 at 12:45:52PM -0400, Jonah Palmer wrote: From: Laurent Vivier This new command shows the information of a VirtQueue element. Signed-off-by: Jonah Palmer --- +++ b/qapi/virtio.json +## +# @VirtioRingAvail: +# +# @flags: VRingAvail

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

2021-10-12 Thread Jonah Palmer
On 10/5/21 5:18 PM, Eric Blake wrote: On Tue, Oct 05, 2021 at 12:45:46PM -0400, Jonah Palmer wrote: 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

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

2022-04-01 Thread Jonah Palmer
the virtio_init function. Signed-off-by: Jonah Palmer --- hw/9pfs/virtio-9p-device.c | 2 +- hw/block/vhost-user-blk.c | 2 +- hw/block/virtio-blk.c | 2 +- hw/char/virtio-serial-bus.c| 3 +- hw/display/virtio-gpu-base.c | 2

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

2022-04-01 Thread Jonah Palmer
responding vhost device was active or not. Signed-off-by: Jonah Palmer --- hw/block/vhost-user-blk.c | 7 +++ hw/display/vhost-user-gpu.c| 7 +++ hw/input/vhost-user-input.c| 7 +++ hw/net/virtio-net.c| 9 + hw/scsi/vhost-scsi.c | 8

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

2022-04-01 Thread Jonah Palmer
en querying virtio devices v10: rebased for upstream (Qemu 7.0) reformat virtio.json for better consistency removed all enums from virtio.json; replaced with string literals removed @ndescs from VirtioQueueElement removed examples in hmp-commands-info.hx (to fix 'inconsiste

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

2022-04-01 Thread Jonah Palmer
ill decode status bits of a VirtIODevice. [Jonah: From patch v12; added a check to @virtio_device_find to ensure synchronicity between @virtio_list and the devices in the QOM composition tree.] Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 5 + hw/virtio/virtio.c

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

2022-04-01 Thread Jonah Palmer
n a separate field. Signed-off-by: Jonah Palmer --- hw/block/virtio-blk.c | 29 hw/char/virtio-serial-bus.c| 11 ++ hw/display/virtio-gpu.c| 18 ++ hw/input/virtio-input.c| 10 ++ hw/net/virtio-net.c| 47 + hw/scsi/virtio-scsi.c |

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

2022-04-01 Thread Jonah Palmer
doing this we get (1) simpler schema, (2) smaller generated code, and (3) less maintenance burden for when new things are added (e.g. devices, device features, etc.).] Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 9 ++ hw/virtio/virtio.c | 154

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

2022-04-01 Thread Jonah Palmer
e QOM composition tree). Also, the QMP command @x-query-virtio is redundant as @qom-list and @qom-get are sufficient to search '/machine/' for realized virtio devices. However, @x-query-virtio is much more convenient in listing realized virtio devices.] Signed-off-by: Jonah Palmer

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

2022-04-01 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

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

2022-04-01 Thread Jonah Palmer
From: Laurent Vivier This patch implements the HMP versions of the virtio QMP commands. [Jonah: Fixed virtio hmp command output format (e.g. use PRI types).] Signed-off-by: Jonah Palmer --- hmp-commands-info.hx | 70 ++ include/monitor/hmp.h | 5 + monitor/hmp-cmds.c| 311

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

2021-12-06 Thread Jonah Palmer
uot;: 0 } } } v10: rebased for upstream (Qemu 7.0) reformat virtio.json for better consistency removed all enums from virtio.json; replaced with string literals removed @ndescs from VirtioQueueElement removed examples in hmp-comman

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

2021-12-06 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

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

2021-12-06 Thread Jonah Palmer
the virtio_init function. Signed-off-by: Jonah Palmer --- hw/9pfs/virtio-9p-device.c | 2 +- hw/block/vhost-user-blk.c | 2 +- hw/block/virtio-blk.c | 2 +- hw/char/virtio-serial-bus.c | 3 +- hw/display/virtio-gpu-base.c

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

2021-12-06 Thread Jonah Palmer
From: Laurent Vivier This new command lists all the instances of VirtIODevices with their canonical QOM path and name. Signed-off-by: Jonah Palmer --- hw/virtio/meson.build | 2 ++ hw/virtio/virtio-stub.c| 14 ++ hw/virtio/virtio.c | 27 ++ include/hw

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

2021-12-06 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 | 70 include/monitor/hmp.h | 5 + monitor/hmp-cmds.c| 311 ++ 3 files changed, 386

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

2021-12-06 Thread Jonah Palmer
n a separate field. Signed-off-by: Jonah Palmer --- hw/block/virtio-blk.c | 29 + hw/char/virtio-serial-bus.c| 11 ++ hw/display/virtio-gpu-base.c | 18 ++- hw/input/virtio-input.c| 10 ++ hw/net/virtio-net.c| 47 +++ hw/scsi/virtio-scs

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

2021-12-06 Thread Jonah Palmer
ill decode status bits of a VirtIODevice. Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 5 ++ hw/virtio/virtio.c | 84 ++ qapi/virtio.json| 220 3 files changed, 309 insertions(+) diff --git a/hw/virtio/virti

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

2021-12-06 Thread Jonah Palmer
responding vhost device was active or not. Signed-off-by: Jonah Palmer --- hw/block/vhost-user-blk.c | 7 +++ hw/display/vhost-user-gpu.c| 7 +++ hw/input/vhost-user-input.c| 7 +++ hw/net/virtio-net.c| 9 + hw/scsi/vhost-scsi.c | 8

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

2021-12-06 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| 183

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

2021-12-06 Thread Jonah Palmer
On 12/6/21 08:50, Christian Schoenebeck wrote: On Montag, 6. Dezember 2021 13:43:18 CET Jonah Palmer wrote: This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing previous patchset from Nov. 10 (v9). Original patches are by

[PATCH RESEND v5 1/3] qmp: remove virtio_list, search QOM tree instead

2023-09-26 Thread Jonah Palmer
QOM composition tree for devices of type 'TYPE_VIRTIO_DEVICE'. The device is also checked to ensure it's realized. Signed-off-by: Jonah Palmer Reviewed-by: Daniel P. Berrangé --- hw/virtio/virtio-qmp.c | 85 ++ hw/virtio/virtio-qmp.h | 7

[PATCH RESEND v5 0/3] qmp, vhost-user: Remove virtio_list & update virtio introspection

2023-09-26 Thread Jonah Palmer
definition to header file v2: verify virtio devices via. 'TYPE_VIRTIO_DEVICES' verify path is a virtio device before checking if it's realized remove 'VIRTIO_BLK_F_ZONED' update (already exists) add cover letter Jonah Palmer (3): qmp: remove virtio_list, search

[PATCH RESEND v5 2/3] qmp: update virtio feature maps, vhost-user-gpio introspection

2023-09-26 Thread Jonah Palmer
- VIRTIO_NET_F_GUEST_USO4 - VIRTIO_NET_F_GUEST_USO6 - VIRTIO_NET_F_HOST_USO virtio/vhost-user-gpio: - VIRTIO_GPIO_F_IRQ - VHOST_USER_F_PROTOCOL_FEATURES Add support for introspection on vhost-user-gpio devices. Signed-off-by: Jonah Palmer Reviewed-by: Emmanouil Pitsidianakis --- hw/virtio

[PATCH RESEND v5 3/3] vhost-user: move VhostUserProtocolFeature definition to header file

2023-09-26 Thread Jonah Palmer
this will be present for these 3 files. Signed-off-by: Jonah Palmer Reviewed-by: Emmanouil Pitsidianakis --- hw/scsi/vhost-user-scsi.c | 4 hw/virtio/vhost-user.c | 21 - hw/virtio/virtio-qmp.c | 22 +- include/hw/virtio/vhost

[PATCH v4 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-18 Thread Jonah Palmer
QOM composition tree for devices of type 'TYPE_VIRTIO_DEVICE'. The device is also checked to ensure it's realized. Signed-off-by: Jonah Palmer --- Jonah: In the v2 patches, the qmp_x_query_virtio function was iterating through devices found via. qmp_qom_list and appending "

[PATCH v4 3/3] vhost-user: move VhostUserProtocolFeature definition to header file

2023-08-18 Thread Jonah Palmer
this will be present for these 3 files. Signed-off-by: Jonah Palmer --- hw/scsi/vhost-user-scsi.c | 4 hw/virtio/vhost-user.c | 21 - hw/virtio/virtio-qmp.c | 22 +- include/hw/virtio/vhost-user.h | 21 + 4

[PATCH v4 2/3] qmp: update virtio feature maps, vhost-user-gpio introspection

2023-08-18 Thread Jonah Palmer
- VIRTIO_NET_F_GUEST_USO4 - VIRTIO_NET_F_GUEST_USO6 - VIRTIO_NET_F_HOST_USO virtio/vhost-user-gpio: - VIRTIO_GPIO_F_IRQ - VHOST_USER_F_PROTOCOL_FEATURES Add support for introspection on vhost-user-gpio devices. Signed-off-by: Jonah Palmer --- Jonah: The previous version of this patch

[PATCH v4 0/3] qmp, vhost-user: Remove virtio_list & update virtio introspection

2023-08-18 Thread Jonah Palmer
th case changes in qmp_decode_features change config define for VIRTIO_GPIO to CONFIG_VHOST_USER_GPIO move VhostUserProtocolFeature definition to header file v2: verify virtio devices via. 'TYPE_VIRTIO_DEVICES' verify path is a virtio device before checking if it's reali

Re: [PATCH v2 1/2] qmp: remove virtio_list, search QOM tree instead

2023-06-26 Thread Jonah Palmer
On 6/23/23 01:47, Michael S. Tsirkin wrote: On Fri, Jun 09, 2023 at 09:20:39AM -0400, Jonah Palmer wrote: The virtio_list duplicates information about virtio devices that already exist in the QOM composition tree. Instead of creating this list of realized virtio devices, search the QOM

Re: [PATCH v2 2/2] qmp: update virtio feature maps, vhost-user-gpio instrospection

2023-06-26 Thread Jonah Palmer
On 6/23/23 01:43, Michael S. Tsirkin wrote: On Fri, Jun 09, 2023 at 09:20:40AM -0400, Jonah Palmer wrote: Add new virtio transport feature to transport feature map: - VIRTIO_F_RING_RESET Add new vhost-user protocol feature to vhost-user protocol feature map and enumeration

Re: [PATCH v2 1/2] qmp: remove virtio_list, search QOM tree instead

2023-06-27 Thread Jonah Palmer
On 6/26/23 08:16, Michael S. Tsirkin wrote: On Mon, Jun 26, 2023 at 08:08:28AM -0400, Jonah Palmer wrote: On 6/23/23 01:47, Michael S. Tsirkin wrote: On Fri, Jun 09, 2023 at 09:20:39AM -0400, Jonah Palmer wrote: The virtio_list duplicates information about virtio devices that

[PATCH v2 0/2] qmp: Remove virtio_list & update virtio introspection

2023-06-09 Thread Jonah Palmer
ZONED' update (already exists) add cover letter Jonah Palmer (2): qmp: remove virtio_list, search QOM tree instead qmp: update virtio feature maps, vhost-user-gpio instrospection hw/virtio/vhost-user-gpio.c | 7 ++ hw/virtio/virtio-qmp.c | 207 +++-

[PATCH v2 1/2] qmp: remove virtio_list, search QOM tree instead

2023-06-09 Thread Jonah Palmer
nd then checking that path to see if the device is of type 'TYPE_VIRTIO_DEVICE'. The patch also instead now checks to make sure it's a virtio device before attempting to check whether the device is realized or not.] Signed-off-by: Jonah Palmer --- hw/virtio/virtio-qmp.c | 128

[PATCH v2 2/2] qmp: update virtio feature maps, vhost-user-gpio instrospection

2023-06-09 Thread Jonah Palmer
- VIRTIO_BT_F_MSFT_EXT - VIRTIO_BT_F_AOSP_EXT - VIRTIO_BT_F_CONFIG_V2 virtio-scmi: - VIRTIO_SCMI_F_P2A_CHANNELS - VIRTIO_SCMI_F_SHARED_MEMORY Add support for introspection on vhost-user-gpio devices. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-user-gpio.c | 7 hw/virtio/virtio-qmp.c

Re: [PATCH v1 1/2] qmp: remove virtio_list, search QOM tree instead

2023-06-05 Thread Jonah Palmer
On 5/17/23 04:12, Daniel P. Berrangé wrote: On Tue, May 16, 2023 at 03:26:25PM -0400, Jonah Palmer wrote: The virtio_list duplicates information about virtio devices that already exist in the QOM composition tree. Instead of creating this list of realized virtio devices, search the QOM

[PATCH v5 3/3] vhost-user: move VhostUserProtocolFeature definition to header file

2023-08-29 Thread Jonah Palmer
this will be present for these 3 files. Signed-off-by: Jonah Palmer --- hw/scsi/vhost-user-scsi.c | 4 hw/virtio/vhost-user.c | 21 - hw/virtio/virtio-qmp.c | 22 +- include/hw/virtio/vhost-user.h | 21 + 4

[PATCH v5 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-29 Thread Jonah Palmer
QOM composition tree for devices of type 'TYPE_VIRTIO_DEVICE'. The device is also checked to ensure it's realized. Signed-off-by: Jonah Palmer --- hw/virtio/virtio-qmp.c | 85 ++ hw/virtio/virtio-qmp.h | 7 hw/virtio/virtio.c |

[PATCH v5 0/3] qmp, vhost-user: Remove virtio_list & update virtio introspection

2023-08-29 Thread Jonah Palmer
s via. 'TYPE_VIRTIO_DEVICES' verify path is a virtio device before checking if it's realized remove 'VIRTIO_BLK_F_ZONED' update (already exists) add cover letter Jonah Palmer (3): qmp: remove virtio_list, search QOM tree instead qmp: update virtio feature

[PATCH v5 2/3] qmp: update virtio feature maps, vhost-user-gpio introspection

2023-08-29 Thread Jonah Palmer
- VIRTIO_NET_F_GUEST_USO4 - VIRTIO_NET_F_GUEST_USO6 - VIRTIO_NET_F_HOST_USO virtio/vhost-user-gpio: - VIRTIO_GPIO_F_IRQ - VHOST_USER_F_PROTOCOL_FEATURES Add support for introspection on vhost-user-gpio devices. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-user-gpio.c | 7 +++ hw

[PATCH v4 3/6] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
elems array. By marking the element as filled, it will indicate that this element has been processed and is ready to be flushed, so long as the element is in-order. Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 44 +++- 1

[PATCH v4 0/6] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
virtqueue_ordered_fill. Add test results to CV. v2: Make 'in_order_filled' more descriptive. Change 'j' to more descriptive var name in virtqueue_split_pop. Use more definitive search conditional in virtqueue_ordered_fill. Avoid code duplicat

[PATCH v4 2/6] virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
ively. This will allow us to keep track of the current order, what elements have been written, as well as an element's essential data after being processed. Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- last_avail_idx can grow well beyond vring.num, so for this reason we need t

[PATCH v4 6/6] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-07-10 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 4 +++- 1

[PATCH v4 1/6] virtio: Add bool to VirtQueueElement

2024-07-10 Thread Jonah Palmer
eviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 7512afbc84..fdc827f82e 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -

[PATCH v4 4/6] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
to the descriptor ring last so the guest doesn't see any invalid descriptors. If any elements were written, the used_idx is updated. Signed-off-by: Jonah Palmer --- Several fixes here for the split VQ case: - Ensure all previous write operations to buffers are completed before updating the us

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-24 Thread Jonah Palmer
On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM Eugenio Perez Martin wrote: On Mon, May 13, 2024 at 10:28 AM Jason Wang wrote: On Mon, May 13, 2024 at 2:28 PM Eugenio Perez Martin wrote: On Sat, May 11, 2024 at 6:07 AM Jason Wang wrote: On Fri, May 10, 2024 a

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-29 Thread Jonah Palmer
On 7/29/24 6:04 AM, Eugenio Perez Martin wrote: On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer wrote: On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM Eugenio Perez Martin wrote: On Mon, May 13, 2024 at 10:28 AM Jason Wang wrote: On Mon, May 13, 2024 at 2:28 PM

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-29 Thread Jonah Palmer
On 7/29/24 2:20 PM, Eugenio Perez Martin wrote: On Mon, Jul 29, 2024 at 7:50 PM Jonah Palmer wrote: On 7/29/24 6:04 AM, Eugenio Perez Martin wrote: On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer wrote: On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM Eugenio

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-30 Thread Jonah Palmer
On 7/30/24 7:00 AM, Eugenio Perez Martin wrote: On Tue, Jul 30, 2024 at 10:48 AM Jason Wang wrote: On Mon, Jul 29, 2024 at 6:05 PM Eugenio Perez Martin wrote: On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer wrote: On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-31 Thread Jonah Palmer
On 7/31/24 5:56 AM, Eugenio Perez Martin wrote: On Tue, Jul 30, 2024 at 2:32 PM Jonah Palmer wrote: On 7/30/24 7:00 AM, Eugenio Perez Martin wrote: On Tue, Jul 30, 2024 at 10:48 AM Jason Wang wrote: On Mon, Jul 29, 2024 at 6:05 PM Eugenio Perez Martin wrote: On Wed, Jul 24, 2024

[RFC v5 6/6] hmp: add virtio commands

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier This patch implements HMP version of the virtio QMP commands [Jonah: Added relative indicies, device type, and used index in HMP virtio queue-status command.] Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- docs/system/monitor.rst | 2 + hmp-commands

[RFC v5 3/6] qmp: decode feature bits in virtio-status

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier Display feature names instead of a features bitmap for host, guest, and backend. Decode features according to device type, transport features are on the first line. Undecoded bits (if any) are stored in a separate field. Signed-off-by: Laurent Vivier Signed-off-by: Jonah

[RFC v5 5/6] qmp: add QMP command x-debug-virtio-queue-element

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier This new command shows the information of a VirtQueue element. Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 9 hw/virtio/virtio.c | 135 qapi/virtio.json| 94

[RFC v5 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier This new command shows internal status of a VirtQueue. (vrings and indexes). [Jonah: Added 'device-type' field to VirtQueueStatus and qmp command x-debug-virtio-queue-status.] Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-st

[RFC v5 0/6] hmp,qmp: Add some commands to introspect virtio deices

2021-03-18 Thread Jonah Palmer
This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing and upstreaming Laurent's qmp/hmp virtio commands from last May (here: https://lore.kernel.org/qemu-devel/20200507134800.10837-1-lviv...@redhat.com/) which mainly included Makef

[RFC v5 2/6] qmp: add QMP command x-debug-virtio-status

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier This new command shows the status of a VirtIODevice (features, endianness and number of virtqueues) Next patch will improve output by decoding feature bits. Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 5 hw/virtio

[RFC v5 1/6] qmp: add QMP command x-debug-query-virtio

2021-03-18 Thread Jonah Palmer
From: Laurent Vivier This new command lists all the instances of VirtIODevice with their path and virtio type Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Jonah Palmer --- hw/virtio/meson.build | 2 ++ hw/virtio/virtio-stub.c| 14 ++ hw/virtio

Re: [RFC v5 1/6] qmp: add QMP command x-debug-query-virtio

2021-03-23 Thread Jonah Palmer
On 3/18/21 4:46 PM, Eric Blake wrote: On 3/18/21 11:29 AM, Jonah Palmer wrote: From: Laurent Vivier This new command lists all the instances of VirtIODevice with their path and virtio type Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Jonah Palmer --- We've m

Re: [RFC v5 1/6] qmp: add QMP command x-debug-query-virtio

2021-06-02 Thread Jonah Palmer
On 3/24/21 2:31 PM, Dr. David Alan Gilbert wrote: * Jonah Palmer (jonah.pal...@oracle.com) wrote: From: Laurent Vivier --- /dev/null +++ b/qapi/virtio.json @@ -0,0 +1,68 @@ +## +# = Virtio devices +## + +## +# @VirtioType: +# +# An enumeration of Virtio device types. +# +# Since: 6.0

Re: [PATCH v6 0/6] hmp, qmp: Add some commands to introspect virtio devices

2021-07-21 Thread Jonah Palmer
Jason Wang wrote: 在 2021/7/12 下午6:35, Jonah Palmer 写道: Dump the information of the head element of the third queue of virtio-scsi: (qemu) virtio queue-element /machine/peripheral-anon/device[3]/virtio-backend 3 index: 122 ndescs: 3 descs: addr 0x73

Re: [PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-07-21 Thread Jonah Palmer
On 7/13/21 10:37 PM, Jason Wang wrote: 在 2021/7/12 下午6:35, Jonah Palmer 写道: From: Laurent Vivier This new command shows internal status of a VirtQueue. (vrings and indexes). Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer ---   hw/virtio/virtio-stub.c |   6 +++   hw/virtio

Re: [PATCH v6 6/6] hmp: add virtio commands

2021-07-21 Thread Jonah Palmer
On 7/13/21 10:40 PM, Jason Wang wrote: 在 2021/7/12 下午6:35, Jonah Palmer 写道: +void hmp_virtio_queue_status(Monitor *mon, const QDict *qdict) +{ +    Error *err = NULL; +    const char *path = qdict_get_try_str(qdict, "path"); +    int queue = qdict_get_int(qdict, "queue");

Re: [PATCH v6 0/6] hmp, qmp: Add some commands to introspect virtio devices

2021-07-26 Thread Jonah Palmer
On 7/22/21 5:16 AM, Jason Wang wrote: 在 2021/7/21 下午4:53, Jonah Palmer 写道: Hi Jason. My apologies for the delayed response, several work-related things came up recently, but they're slowing down now so I'm turning my attention these patches to get taken care of. A few que

Re: [PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-07-26 Thread Jonah Palmer
On 7/22/21 5:22 AM, Jason Wang wrote: 在 2021/7/21 下午4:59, Jonah Palmer 写道: On 7/13/21 10:37 PM, Jason Wang wrote: 在 2021/7/12 下午6:35, Jonah Palmer 写道: From: Laurent Vivier This new command shows internal status of a VirtQueue. (vrings and indexes). Signed-off-by: Laurent Vivier

Re: [PATCH v6 6/6] hmp: add virtio commands

2021-07-26 Thread Jonah Palmer
On 7/22/21 5:18 AM, Jason Wang wrote: 在 2021/7/21 下午5:11, Jonah Palmer 写道: On 7/13/21 10:40 PM, Jason Wang wrote: 在 2021/7/12 下午6:35, Jonah Palmer 写道: +void hmp_virtio_queue_status(Monitor *mon, const QDict *qdict) +{ +    Error *err = NULL; +    const char *path = qdict_get_try_str

Re: [PATCH v6 1/6] qmp: add QMP command x-debug-query-virtio

2021-08-25 Thread Jonah Palmer
No problem! Comments below: On 8/23/21 9:27 AM, Markus Armbruster wrote: Back from my summer break, please excuse the delay. Jonah Palmer writes: On 8/7/21 8:35 AM, Markus Armbruster wrote: QAPI schema review only. Jonah Palmer writes: From: Laurent Vivier This new command lists all

Re: [PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-08-25 Thread Jonah Palmer
Hi Jason, could I get your thoughts on this implementation question below? I'm not too sure on how I should proceed determining if vhost is active or not. Thank you! Jonah On 7/26/21 5:33 AM, Jonah Palmer wrote: On 7/22/21 5:22 AM, Jason Wang wrote: 在 2021/7/21 下午4:59, Jonah Palm

Re: [PATCH v6 1/6] qmp: add QMP command x-debug-query-virtio

2021-08-09 Thread Jonah Palmer
On 8/7/21 8:35 AM, Markus Armbruster wrote: QAPI schema review only. Jonah Palmer writes: From: Laurent Vivier This new command lists all the instances of VirtIODevice with their path and virtio type. Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Jonah Palmer

Re: [PATCH v6 2/6] qmp: add QMP command x-debug-virtio-status

2021-08-09 Thread Jonah Palmer
On 8/7/21 8:42 AM, Markus Armbruster wrote: Jonah Palmer writes: From: Laurent Vivier This new command shows the status of a VirtIODevice (features, endianness and number of virtqueues) Next patch will improve output by decoding feature bits. Signed-off-by: Laurent Vivier Signed-off-by

Re: [PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-08-10 Thread Jonah Palmer
On 8/7/21 8:45 AM, Markus Armbruster wrote: Jonah Palmer writes: From: Laurent Vivier This new command shows internal status of a VirtQueue. (vrings and indexes). Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer [...] diff --git a/qapi/virtio.json b/qapi/virtio.json index

[PATCH v6 2/6] qmp: add QMP command x-debug-virtio-status

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier This new command shows the status of a VirtIODevice (features, endianness and number of virtqueues) Next patch will improve output by decoding feature bits. Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 5 hw/virtio

[PATCH v6 1/6] qmp: add QMP command x-debug-query-virtio

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier This new command lists all the instances of VirtIODevice with their path and virtio type. Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Jonah Palmer --- hw/virtio/meson.build | 2 ++ hw/virtio/virtio-stub.c| 14 + hw/virtio

[PATCH v6 6/6] hmp: add virtio commands

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier This patch implements HMP version of the virtio QMP commands Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- docs/system/monitor.rst | 2 + hmp-commands-virtio.hx | 162 ++ hmp-commands.hx | 10 +++ hw/virtio

[PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier This new command shows internal status of a VirtQueue. (vrings and indexes). Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 6 +++ hw/virtio/virtio.c | 37 ++ qapi/virtio.json| 102

[PATCH v6 5/6] qmp: add QMP command x-debug-virtio-queue-element

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier This new command shows the information of a VirtQueue element. Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 9 hw/virtio/virtio.c | 135 qapi/virtio.json| 94

[PATCH v6 0/6] hmp, qmp: Add some commands to introspect virtio devices

2021-07-12 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 March for Qemu 6.1 (here: https://lore.kernel.org/qemu-devel/1616084984-11263-1-git-send-email-jonah.pal...@oracle.com/) from Laurent's original qmp/hmp v

[PATCH v6 3/6] qmp: decode feature bits in virtio-status

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier Display feature names instead of a features bitmap for host, guest, and backend. Decode features according to device type, transport features are on the first line. Undecoded bits (if any) are stored in a separate field. Signed-off-by: Laurent Vivier Signed-off-by: Jonah

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-08 Thread Jonah Palmer
On 10/8/24 2:51 AM, Eugenio Perez Martin wrote: On Tue, Oct 8, 2024 at 2:14 AM Si-Wei Liu wrote: On 10/7/2024 6:51 AM, Eugenio Perez Martin wrote: On Fri, Oct 4, 2024 at 8:48 PM Jonah Palmer wrote: On 10/4/24 11:17 AM, Eugenio Perez Martin wrote: On Fri, Oct 4, 2024 at 2:45 PM

[RFC v2 2/2] vhost-svq: Translate guest-backed memory with IOVA->GPA tree

2024-10-04 Thread Jonah Palmer
by guest memory can lead to multiple different GPAs. In other words, we may translate to an incorrect IOVA if we search the IOVA->HVA tree using an HVA that's backed by guest memory. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-shadow-virtqueue.c | 61 -- 1

[RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-04 Thread Jonah Palmer
tained (overlapping) in another HVA range in the IOVA->HVA tree. By creating an IOVA->GPA tree, we can use GPAs to translate and find the correct IOVA for guest memory regions. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-iova-tree.c | 78 +++-- hw/virtio/vhost

[RFC v2 0/2] Handling aliased guest memory maps in vhost-vDPA SVQs

2024-10-04 Thread Jonah Palmer
C v1: --- * Alternative approach of [1]. * First attempt to address this issue found in [2]. [1] https://lore.kernel.org/qemu-devel/20240410100345.389462-1-epere...@redhat.com [2] https://lore.kernel.org/qemu-devel/20240201180924.487579-1-epere...@redhat.com Jonah Palmer (2): vhost

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-04 Thread Jonah Palmer
On 10/4/24 11:17 AM, Eugenio Perez Martin wrote: On Fri, Oct 4, 2024 at 2:45 PM Jonah Palmer wrote: Implements the IOVA->GPA tree for handling mapping, unmapping, and translations for guest memory regions. When the guest has overlapping memory regions, an HVA to IOVA translation

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-07 Thread Jonah Palmer
On 10/7/24 9:51 AM, Eugenio Perez Martin wrote: On Fri, Oct 4, 2024 at 8:48 PM Jonah Palmer wrote: On 10/4/24 11:17 AM, Eugenio Perez Martin wrote: On Fri, Oct 4, 2024 at 2:45 PM Jonah Palmer wrote: Implements the IOVA->GPA tree for handling mapping, unmapping, and translations

[PATCH v3 2/2] net: move backend cleanup to NIC cleanup

2025-01-06 Thread Jonah Palmer
s finished. Move the cleanup from qemu_cleanup to the NIC deletion and to net_cleanup. Fixes: a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") Reported-by: Lei Yang Signed-off-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- n

[PATCH v3 0/2] Move net backend cleanup to NIC cleanup

2025-01-06 Thread Jonah Palmer
Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") effectively delayed the backend cleanup, allowing the frontend or the guest to access it resources as long as the frontend NIC is still visible to the guest. However it does not clean up the resou

[PATCH v3 1/2] net: parameterize the removing client from nc list

2025-01-06 Thread Jonah Palmer
From: Eugenio Pérez This change is used in later commits so we can avoid the removal of the netclient if it is delayed. No functional change intended. Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Signed-off-by: Eugenio Pérez --- net/net.c | 13 - 1 file changed, 8 insertions(+),

Re: [PATCH v2 0/2] Move net backend cleanup to NIC cleanup

2025-01-06 Thread Jonah Palmer
On 12/23/24 11:33 AM, Eugenio Perez Martin wrote: On Fri, Dec 20, 2024 at 10:02 PM Michael Tokarev wrote: 12.09.2024 19:54, Eugenio Pérez wrote: Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") effectively delayed the backend cleanup, al

Re: [PATCH] qmp: update vhost-user protocol feature maps

2025-01-06 Thread Jonah Palmer
On 12/22/24 4:13 AM, Michael Tokarev wrote: 16.12.2024 20:30, Jonah Palmer wrote: ... Signed-off-by: Jonah Palmer Should this be a Reviewed-by instead? Thanks, /mjt Oof, yes, it should've been. My apologies, I was on vacation and only saw this just now.

[PATCH 0/4] Handling aliased guest memory maps in vhost-vDPA SVQs

2025-02-05 Thread Jonah Palmer
l.org/qemu-devel/20240410100345.389462-1-epere...@redhat.com [2] https://lore.kernel.org/qemu-devel/20240201180924.487579-1-epere...@redhat.com Jonah Palmer (4): vhost-iova-tree: Implement an IOVA-only tree vhost-iova-tree: Implement GPA->IOVA & partial IOVA->HVA trees svq:

[PATCH 2/4] vhost-iova-tree: Implement GPA->IOVA & partial IOVA->HVA trees

2025-02-05 Thread Jonah Palmer
, this method will be improved by utilizing the in_addr and out_addr members of a VirtQueueElement to determine if an incoming address for translation is backed by guest or host-only memory. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-iova-tree.c| 67 ++ hw/vir

[PATCH 1/4] vhost-iova-tree: Implement an IOVA-only tree

2025-02-05 Thread Jonah Palmer
;IOVA trees. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-iova-tree.c | 26 -- hw/virtio/vhost-iova-tree.h | 3 ++- hw/virtio/vhost-vdpa.c | 29 + net/vhost-vdpa.c| 10 -- 4 files changed, 51 insertions(+), 17 delet

[PATCH 3/4] svq: Support translations via GPAs in vhost_svq_translate_addr

2025-02-05 Thread Jonah Palmer
he issue where different GPAs map to the same HVA, causing the HVA->IOVA translation to potentially return an IOVA associated with the wrong intended GPA. For descriptors backed by host-only memory, the existing partial SVQ IOVA->HVA tree is used. Signed-off-by: Jonah Palmer --- hw/virti

[PATCH 4/4] vhost-iova-tree: Update documentation

2025-02-05 Thread Jonah Palmer
Signed-off-by: Jonah Palmer --- hw/virtio/vhost-iova-tree.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-iova-tree.c b/hw/virtio/vhost-iova-tree.c index 9d2d6a7af2..fa4147b773 100644 --- a/hw/virtio/vhost-iova-tree.c +++ b/hw/virtio

Re: [PATCH] qmp: update vhost-user protocol feature maps

2024-12-16 Thread Jonah Palmer
"VHOST_USER_PROTOCOL_F_DEVICE_STATE: Backend device state transfer " + "supported"), { -1, "" } }; Signed-off-by: Jonah Palmer --- Jonah

Re: [RFC v3 1/5] vhost-vdpa: Decouple the IOVA allocator

2025-01-21 Thread Jonah Palmer
On 1/16/25 11:44 AM, Eugenio Perez Martin wrote: On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote: Decouples the IOVA allocator from the full IOVA->HVA tree to support a SVQ IOVA->HVA tree for host-only memory mappings. The IOVA allocator still allocates an IOVA range but instea

Re: [RFC v3 3/5] vhost-vdpa: Implement the GPA->IOVA tree

2025-01-21 Thread Jonah Palmer
On 1/16/25 2:00 PM, Eugenio Perez Martin wrote: On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote: Implements the GPA->IOVA tree for handling mapping and unmapping for guest memory. This, alongside the SVQ IOVA->HVA tree & IOVA-only tree implemented in the previous patches, al

<    1   2   3   4   >