[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for 8.0 v7 08/10] vdpa: Store x-svq parameter in VhostVDPAState
From: |
Eugenio Pérez |
Subject: |
[PATCH for 8.0 v7 08/10] vdpa: Store x-svq parameter in VhostVDPAState |
Date: |
Wed, 16 Nov 2022 16:05:54 +0100 |
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 at initialization time. 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 cmdline.
Signed-off-by: Eugenio Pérez <[email protected]>
---
net/vhost-vdpa.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 89b01fcaec..5185ac7042 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;
@@ -566,6 +568,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_tree = iova_tree;
if (!is_datapath) {
--
2.31.1
- [PATCH for 8.0 v7 00/10] ASID support in vhost-vdpa net, Eugenio Pérez, 2022/11/16
- [PATCH for 8.0 v7 02/10] vhost: set SVQ device call handler at SVQ start, Eugenio Pérez, 2022/11/16
- [PATCH for 8.0 v7 01/10] vdpa: Use v->shadow_vqs_enabled in vhost_vdpa_svqs_start & stop, Eugenio Pérez, 2022/11/16
- [PATCH for 8.0 v7 03/10] vhost: Allocate SVQ device file descriptors at device start, Eugenio Pérez, 2022/11/16
- [PATCH for 8.0 v7 04/10] vdpa: add vhost_vdpa_net_valid_svq_features, Eugenio Pérez, 2022/11/16
- [PATCH for 8.0 v7 06/10] vdpa: Allocate SVQ unconditionally, Eugenio Pérez, 2022/11/16
- [PATCH for 8.0 v7 07/10] vdpa: Add asid parameter to vhost_vdpa_dma_map/unmap, Eugenio Pérez, 2022/11/16
- [PATCH for 8.0 v7 08/10] vdpa: Store x-svq parameter in VhostVDPAState,
Eugenio Pérez <=
- [PATCH for 8.0 v7 09/10] vdpa: Add shadow_data to vhost_vdpa, Eugenio Pérez, 2022/11/16
- [PATCH for 8.0 v7 10/10] vdpa: Always start CVQ in SVQ mode if possible, Eugenio Pérez, 2022/11/16
- [PATCH for 8.0 v7 05/10] vdpa: move SVQ vring features check to net/, Eugenio Pérez, 2022/11/16