search for: ifcvf_add_status

Displaying 14 results from an estimated 14 matches for "ifcvf_add_status".

2023 Mar 31
1
[PATCH 3/5] retire ifcvf_start_datapath and ifcvf_add_status
Rather than former lazy-initialization mechanism, now the virtqueue operations and driver_features related ops access the virtio registers directly to take immediate actions. So ifcvf_start_datapath() should retire. ifcvf_add_status() is retierd because we should not change device status by a vendor driver's decision, this driver should only set device status which is from virito drivers upon vdpa_ops.set_status() Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> --- drivers/vdpa/ifcvf/ifcvf_base.c | 19 -----...
2023 Mar 31
7
[PATCH 0/5] vDPA/ifcvf: implement immediate initialization mechanism
...he virtio operations like vq ops would take immediate actions by access the virtio registers. This series also implement irq synchronization in the reset routine Zhu Lingshan (5): virt queue ops take immediate actions get_driver_features from virito registers retire ifcvf_start_datapath and ifcvf_add_status synchronize irqs in the reset routine a vendor driver should not set _CONFIG_S_FAILED drivers/vdpa/ifcvf/ifcvf_base.c | 162 +++++++++++++++++++------------- drivers/vdpa/ifcvf/ifcvf_base.h | 16 ++-- drivers/vdpa/ifcvf/ifcvf_main.c | 97 ++++--------------- 3 files changed, 122 insertions(...
2023 May 08
6
[PATCH V2 0/5] vDPA/ifcvf: implement immediate initialization mechanism
...ges from V1: 1)pull device status in devce_reset (Jason) 2)simplify the procedure which sycn irqs (Jason) 3)fix typos(Michael) Zhu Lingshan (5): vDPA/ifcvf: virt queue ops take immediate actions vDPA/ifcvf: get_driver_features from virtio registers vDPA/ifcvf: retire ifcvf_start_datapath and ifcvf_add_status vDPA/ifcvf: synchronize irqs in the reset routine vDPA/ifcvf: a vendor driver should not set _CONFIG_S_FAILED drivers/vdpa/ifcvf/ifcvf_base.c | 146 ++++++++++++++++++-------------- drivers/vdpa/ifcvf/ifcvf_base.h | 17 ++-- drivers/vdpa/ifcvf/ifcvf_main.c | 98 ++++----------------- 3 file...
2023 May 08
1
[PATCH V2 2/5] vDPA/ifcvf: get_driver_features from virtio registers
..._iomem *cfg = hw->common_cfg; @@ -286,19 +304,6 @@ static void ifcvf_set_features(struct ifcvf_hw *hw, u64 features) vp_iowrite32(features >> 32, &cfg->guest_feature); } -static int ifcvf_config_features(struct ifcvf_hw *hw) -{ - ifcvf_set_features(hw, hw->req_features); - ifcvf_add_status(hw, VIRTIO_CONFIG_S_FEATURES_OK); - - if (!(ifcvf_get_status(hw) & VIRTIO_CONFIG_S_FEATURES_OK)) { - IFCVF_ERR(hw->pdev, "Failed to set FEATURES_OK status\n"); - return -EIO; - } - - return 0; -} - u16 ifcvf_get_vq_state(struct ifcvf_hw *hw, u16 qid) { struct ifcvf_lm_cfg __i...
2023 Mar 31
2
[PATCH 2/5] get_driver_features from virito registers
..._iomem *cfg = hw->common_cfg; @@ -286,19 +304,6 @@ static void ifcvf_set_features(struct ifcvf_hw *hw, u64 features) vp_iowrite32(features >> 32, &cfg->guest_feature); } -static int ifcvf_config_features(struct ifcvf_hw *hw) -{ - ifcvf_set_features(hw, hw->req_features); - ifcvf_add_status(hw, VIRTIO_CONFIG_S_FEATURES_OK); - - if (!(ifcvf_get_status(hw) & VIRTIO_CONFIG_S_FEATURES_OK)) { - IFCVF_ERR(hw->pdev, "Failed to set FEATURES_OK status\n"); - return -EIO; - } - - return 0; -} - u16 ifcvf_get_vq_state(struct ifcvf_hw *hw, u16 qid) { struct ifcvf_lm_cfg __i...
2023 May 08
1
[PATCH V2 1/5] vDPA/ifcvf: virt queue ops take immediate actions
...iowrite16(qid, &cfg->queue_select); + vp_iowrite16(ready, &cfg->queue_enable); +} + static void ifcvf_hw_disable(struct ifcvf_hw *hw) { u32 i; @@ -366,16 +384,12 @@ static void ifcvf_hw_disable(struct ifcvf_hw *hw) int ifcvf_start_hw(struct ifcvf_hw *hw) { - ifcvf_reset(hw); ifcvf_add_status(hw, VIRTIO_CONFIG_S_ACKNOWLEDGE); ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER); if (ifcvf_config_features(hw) < 0) return -EINVAL; - if (ifcvf_hw_enable(hw) < 0) - return -EINVAL; - ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK); return 0; diff --git a/drivers/vdpa/ifcvf/if...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...; + > +void ifcvf_set_status(struct ifcvf_hw *hw, u8 status) > +{ > + iowrite8(status, &hw->common_cfg->device_status); > +} > + > +void ifcvf_reset(struct ifcvf_hw *hw) > +{ > + ifcvf_set_status(hw, 0); > + ifcvf_get_status(hw); > +} > + > +static void ifcvf_add_status(struct ifcvf_hw *hw, u8 status) > +{ > + if (status != 0) > + status |= ifcvf_get_status(hw); > + > + ifcvf_set_status(hw, status); > + ifcvf_get_status(hw); > +} > + > +u64 ifcvf_get_features(struct ifcvf_hw *hw) > +{ > + struct virtio_pci_common_cfg *cfg = hw-&gt...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...; + > +void ifcvf_set_status(struct ifcvf_hw *hw, u8 status) > +{ > + iowrite8(status, &hw->common_cfg->device_status); > +} > + > +void ifcvf_reset(struct ifcvf_hw *hw) > +{ > + ifcvf_set_status(hw, 0); > + ifcvf_get_status(hw); > +} > + > +static void ifcvf_add_status(struct ifcvf_hw *hw, u8 status) > +{ > + if (status != 0) > + status |= ifcvf_get_status(hw); > + > + ifcvf_set_status(hw, status); > + ifcvf_get_status(hw); > +} > + > +u64 ifcvf_get_features(struct ifcvf_hw *hw) > +{ > + struct virtio_pci_common_cfg *cfg = hw-&gt...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...; + > +void ifcvf_set_status(struct ifcvf_hw *hw, u8 status) > +{ > + iowrite8(status, &hw->common_cfg->device_status); > +} > + > +void ifcvf_reset(struct ifcvf_hw *hw) > +{ > + ifcvf_set_status(hw, 0); > + ifcvf_get_status(hw); > +} > + > +static void ifcvf_add_status(struct ifcvf_hw *hw, u8 status) > +{ > + if (status != 0) > + status |= ifcvf_get_status(hw); > + > + ifcvf_set_status(hw, status); > + ifcvf_get_status(hw); > +} > + > +u64 ifcvf_get_features(struct ifcvf_hw *hw) > +{ > + struct virtio_pci_common_cfg *cfg = hw-&gt...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...; + > +void ifcvf_set_status(struct ifcvf_hw *hw, u8 status) > +{ > + iowrite8(status, &hw->common_cfg->device_status); > +} > + > +void ifcvf_reset(struct ifcvf_hw *hw) > +{ > + ifcvf_set_status(hw, 0); > + ifcvf_get_status(hw); > +} > + > +static void ifcvf_add_status(struct ifcvf_hw *hw, u8 status) > +{ > + if (status != 0) > + status |= ifcvf_get_status(hw); > + > + ifcvf_set_status(hw, status); > + ifcvf_get_status(hw); > +} > + > +u64 ifcvf_get_features(struct ifcvf_hw *hw) > +{ > + struct virtio_pci_common_cfg *cfg = hw-&gt...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...>common_cfg->device_status); > +} > + > +static void ifcvf_reset(struct ifcvf_hw *hw) > +{ > + ifcvf_set_status(hw, 0); > + > + /* flush status write */ > + ifcvf_get_status(hw); Why this flush is needed? > + hw->generation++; > +} > + > +static void ifcvf_add_status(struct ifcvf_hw *hw, u8 status) > +{ > + if (status != 0) > + status |= ifcvf_get_status(hw); > + > + ifcvf_set_status(hw, status); > + ifcvf_get_status(hw); > +} > + > +u64 ifcvf_get_features(struct ifcvf_hw *hw) > +{ > + u32 features_lo, features_hi; > + struc...
2023 Mar 31
1
[PATCH 1/5] virt queue ops take immediate actions
...iowrite16(qid, &cfg->queue_select); + vp_iowrite16(ready, &cfg->queue_enable); +} + static void ifcvf_hw_disable(struct ifcvf_hw *hw) { u32 i; @@ -366,16 +384,12 @@ static void ifcvf_hw_disable(struct ifcvf_hw *hw) int ifcvf_start_hw(struct ifcvf_hw *hw) { - ifcvf_reset(hw); ifcvf_add_status(hw, VIRTIO_CONFIG_S_ACKNOWLEDGE); ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER); if (ifcvf_config_features(hw) < 0) return -EINVAL; - if (ifcvf_hw_enable(hw) < 0) - return -EINVAL; - ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK); return 0; diff --git a/drivers/vdpa/ifcvf/if...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...t; the write operation. > > It is a bad comment anyway, I will remove it. Interesting, does this mean if we need also fix the vp_set_status for kernel virtio_pci driver? > >> >> >>> +??? hw->generation++; >>> +} >>> + >>> +static void ifcvf_add_status(struct ifcvf_hw *hw, u8 status) >>> +{ >>> +??? if (status != 0) >>> +??????? status |= ifcvf_get_status(hw); >>> + >>> +??? ifcvf_set_status(hw, status); >>> +??? ifcvf_get_status(hw); >>> +} >>> + >>> +u64 ifcvf_get_...
2023 Jul 03
1
[GIT PULL] virtio: features, fixes, cleanups
...virtio_bt: call scheduler when we free unused buffs vhost: Make parameter name match of vhost_get_vq_desc() Zhu Lingshan (8): vDPA/ifcvf: virt queue ops take immediate actions vDPA/ifcvf: get_driver_features from virtio registers vDPA/ifcvf: retire ifcvf_start_datapath and ifcvf_add_status vDPA/ifcvf: synchronize irqs in the reset routine vDPA/ifcvf: a vendor driver should not set _CONFIG_S_FAILED vDPA/ifcvf: dynamic allocate vq data stores vDPA/ifcvf: detect and report max allowed vq size vDPA/ifcvf: implement new accessors for vq_state .../device_dri...