qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for 8.0 v7 08/10] vdpa: Store x-svq parameter in VhostVDPASta


From: Jason Wang
Subject: Re: [PATCH for 8.0 v7 08/10] vdpa: Store x-svq parameter in VhostVDPAState
Date: Thu, 17 Nov 2022 14:15:52 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.2


在 2022/11/16 23:05, Eugenio Pérez 写道:
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 <eperezma@redhat.com>


Acked-by: Jason Wang <jasowang@redhat.com>

Thanks


---
  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) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]