summaryrefslogtreecommitdiff
path: root/drivers/vdpa/ifcvf/ifcvf_base.h
diff options
context:
space:
mode:
authorZhu Lingshan <lingshan.zhu@intel.com>2023-05-26 17:52:50 +0300
committerMichael S. Tsirkin <mst@redhat.com>2023-06-27 17:47:07 +0300
commita4751306bf696785b7446503c287010e667d002b (patch)
treeb591717440dfdc7d51e6bc70aff033210075b331 /drivers/vdpa/ifcvf/ifcvf_base.h
parent6995e2de6891c724bfeb2db33d7b87775f913ad1 (diff)
downloadlinux-a4751306bf696785b7446503c287010e667d002b.tar.xz
vDPA/ifcvf: virt queue ops take immediate actions
In this commit, virtqueue operations including: set_vq_num(), set_vq_address(), set_vq_ready() and get_vq_ready() access PCI registers directly to take immediate actions. Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20230526145254.39537-2-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa/ifcvf/ifcvf_base.h')
-rw-r--r--drivers/vdpa/ifcvf/ifcvf_base.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h
index c20d1c40214e..d545a9411143 100644
--- a/drivers/vdpa/ifcvf/ifcvf_base.h
+++ b/drivers/vdpa/ifcvf/ifcvf_base.h
@@ -47,12 +47,7 @@
#define MSIX_VECTOR_DEV_SHARED 3
struct vring_info {
- u64 desc;
- u64 avail;
- u64 used;
- u16 size;
u16 last_avail_idx;
- bool ready;
void __iomem *notify_addr;
phys_addr_t notify_pa;
u32 irq;
@@ -137,4 +132,9 @@ int ifcvf_probed_virtio_net(struct ifcvf_hw *hw);
u32 ifcvf_get_config_size(struct ifcvf_hw *hw);
u16 ifcvf_set_vq_vector(struct ifcvf_hw *hw, u16 qid, int vector);
u16 ifcvf_set_config_vector(struct ifcvf_hw *hw, int vector);
+void ifcvf_set_vq_num(struct ifcvf_hw *hw, u16 qid, u32 num);
+int ifcvf_set_vq_address(struct ifcvf_hw *hw, u16 qid, u64 desc_area,
+ u64 driver_area, u64 device_area);
+bool ifcvf_get_vq_ready(struct ifcvf_hw *hw, u16 qid);
+void ifcvf_set_vq_ready(struct ifcvf_hw *hw, u16 qid, bool ready);
#endif /* _IFCVF_H_ */