[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/41] vdpa: store x-svq parameter in VhostVDPAState
From: |
Michael S. Tsirkin |
Subject: |
[PULL 21/41] vdpa: store x-svq parameter in VhostVDPAState |
Date: |
Wed, 21 Dec 2022 08:05:38 -0500 |
From: Eugenio Pérez <eperezma@redhat.com>
CVQ can be shadowed two ways:
- Device has x-svq=on parameter (current way)
- The device can isolate CVQ in its own vq group
QEMU needs to check for the second condition dynamically, because CVQ
index is not known before the driver ack the features. Since this is
dynamic, the CVQ isolation could vary with different conditions, making
it possible to go from "not isolated group" to "isolated".
Saving the cmdline parameter in an extra field so we never disable CVQ
SVQ in case the device was started with x-svq cmdline.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20221215113144.322011-11-eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
net/vhost-vdpa.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index a592ee07ec..bff72717d0 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -38,6 +38,8 @@ typedef struct VhostVDPAState {
void *cvq_cmd_out_buffer;
virtio_net_ctrl_ack *status;
+ /* The device always have SVQ enabled */
+ bool always_svq;
bool started;
} VhostVDPAState;
@@ -568,6 +570,7 @@ static NetClientState *net_vhost_vdpa_init(NetClientState
*peer,
s->vhost_vdpa.device_fd = vdpa_device_fd;
s->vhost_vdpa.index = queue_pair_index;
+ s->always_svq = svq;
s->vhost_vdpa.shadow_vqs_enabled = svq;
s->vhost_vdpa.iova_range = iova_range;
s->vhost_vdpa.iova_tree = iova_tree;
--
MST
- [PULL 13/41] vhost: set SVQ device call handler at SVQ start, (continued)
- [PULL 13/41] vhost: set SVQ device call handler at SVQ start, Michael S. Tsirkin, 2022/12/21
- [PULL 14/41] vhost: allocate SVQ device file descriptors at device start, Michael S. Tsirkin, 2022/12/21
- [PULL 10/41] vdpa: add vdpa-dev-pci support, Michael S. Tsirkin, 2022/12/21
- [PULL 15/41] vhost: move iova_tree set to vhost_svq_start, Michael S. Tsirkin, 2022/12/21
- [PULL 16/41] vdpa: add vhost_vdpa_net_valid_svq_features, Michael S. Tsirkin, 2022/12/21
- [PULL 17/41] vdpa: request iova_range only once, Michael S. Tsirkin, 2022/12/21
- [PULL 18/41] vdpa: move SVQ vring features check to net/, Michael S. Tsirkin, 2022/12/21
- [PULL 20/41] vdpa: add asid parameter to vhost_vdpa_dma_map/unmap, Michael S. Tsirkin, 2022/12/21
- [PULL 24/41] vhost-user: send set log base message only once, Michael S. Tsirkin, 2022/12/21
- [PULL 26/41] acpi/tests/avocado/bits: add SPDX license identifiers for bios bits tests, Michael S. Tsirkin, 2022/12/21
- [PULL 21/41] vdpa: store x-svq parameter in VhostVDPAState,
Michael S. Tsirkin <=
- [PULL 22/41] vdpa: add shadow_data to vhost_vdpa, Michael S. Tsirkin, 2022/12/21
- [PULL 25/41] include/hw: attempt to document VirtIO feature variables, Michael S. Tsirkin, 2022/12/21
- [PULL 23/41] vdpa: always start CVQ in SVQ mode if possible, Michael S. Tsirkin, 2022/12/21
- [PULL 19/41] vdpa: allocate SVQ array unconditionally, Michael S. Tsirkin, 2022/12/21
- [PULL 27/41] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled, Michael S. Tsirkin, 2022/12/21
- [PULL 29/41] pci: drop redundant PCIDeviceClass::is_bridge field, Michael S. Tsirkin, 2022/12/21
- [PULL 30/41] docs/acpi/bits: document BITS_DEBUG environment variable, Michael S. Tsirkin, 2022/12/21
- [PULL 34/41] hw/virtio: Add missing "hw/core/cpu.h" include, Michael S. Tsirkin, 2022/12/21
- [PULL 28/41] remove DEC 21154 PCI bridge, Michael S. Tsirkin, 2022/12/21
- [PULL 33/41] hw/cxl/device: Add Flex Bus Port DVSEC, Michael S. Tsirkin, 2022/12/21