search for: ifcvf_start_hw

Displaying 17 results from an estimated 17 matches for "ifcvf_start_hw".

2023 Mar 31
1
[PATCH 3/5] retire ifcvf_start_datapath and ifcvf_add_status
...- status |= ifcvf_get_status(hw); - - ifcvf_set_status(hw, status); - ifcvf_get_status(hw); -} - u64 ifcvf_get_hw_features(struct ifcvf_hw *hw) { struct virtio_pci_common_cfg __iomem *cfg = hw->common_cfg; @@ -387,16 +378,6 @@ static void ifcvf_hw_disable(struct ifcvf_hw *hw) } } -int ifcvf_start_hw(struct ifcvf_hw *hw) -{ - ifcvf_add_status(hw, VIRTIO_CONFIG_S_ACKNOWLEDGE); - ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER); - - ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK); - - return 0; -} - void ifcvf_stop_hw(struct ifcvf_hw *hw) { ifcvf_hw_disable(hw); diff --git a/drivers/vdpa/ifcvf/if...
2023 Mar 31
7
[PATCH 0/5] vDPA/ifcvf: implement immediate initialization mechanism
Formerly, ifcvf driver has implemented a lazy-initialization mechanism for the virtqueues and other config space contents, it would store all configurations that passed down from the userspace, then load them to the device config space upon DRIVER_OK. This can not serve live migration, so this series implement an immediate initialization mechanism, which means rather than the former store-load
2023 May 08
6
[PATCH V2 0/5] vDPA/ifcvf: implement immediate initialization mechanism
Formerly, ifcvf driver has implemented a lazy-initialization mechanism for the virtqueues and other config space contents, it would store all configurations that passed down from the userspace, then load them to the device config space upon DRIVER_OK. This can not serve live migration, so this series implement an immediate initialization mechanism, which means rather than the former store-load
2023 May 08
1
[PATCH V2 2/5] vDPA/ifcvf: get_driver_features from virtio registers
...f (!(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 __iomem *ifcvf_lm; @@ -387,9 +392,6 @@ int ifcvf_start_hw(struct ifcvf_hw *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; - ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK); return 0; diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/dr...
2023 May 08
1
[PATCH V2 1/5] vDPA/ifcvf: virt queue ops take immediate actions
...tio_pci_common_cfg __iomem *cfg = hw->common_cfg; + + vp_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_...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...NO_VECTOR, &cfg->msix_config); > + > + for (i = 0; i < hw->nr_vring; i++) { > + iowrite16(i, &cfg->queue_select); > + iowrite16(0, &cfg->queue_enable); > + iowrite16(VIRTIO_MSI_NO_VECTOR, &cfg->queue_msix_vector); > + } > +} > + > +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 -1; > + > + if (ifcvf_hw_enable(hw) < 0) > + return -1;...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...NO_VECTOR, &cfg->msix_config); > + > + for (i = 0; i < hw->nr_vring; i++) { > + iowrite16(i, &cfg->queue_select); > + iowrite16(0, &cfg->queue_enable); > + iowrite16(VIRTIO_MSI_NO_VECTOR, &cfg->queue_msix_vector); > + } > +} > + > +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 -1; > + > + if (ifcvf_hw_enable(hw) < 0) > + return -1;...
2020 Apr 02
0
[PATCH v2 -next] vdpa: remove unused variables 'ifcvf' and 'ifcvf_lm'
...ic irqreturn_t ifcvf_intr_handler(int irq, void *arg) static int ifcvf_start_datapath(void *private) { struct ifcvf_hw *vf = ifcvf_private_to_vf(private); - struct ifcvf_adapter *ifcvf; u8 status; int ret; - ifcvf = vf_to_adapter(vf); vf->nr_vring = IFCVF_MAX_QUEUE_PAIRS * 2; ret = ifcvf_start_hw(vf); if (ret < 0) { -- 2.17.1
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...; + iowrite16(i, &cfg->queue_select); > + iowrite16(0, &cfg->queue_enable); > + iowrite16(VIRTIO_MSI_NO_VECTOR, &cfg->queue_msix_vector); > + } Is it enough to write like this? don't you need to read in order to flush outstanding MSI? > +} > + > +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 -1; > + > + if (ifcvf_hw_enable(hw) < 0) > + return -1;...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...NO_VECTOR, &cfg->msix_config); > + > + for (i = 0; i < hw->nr_vring; i++) { > + iowrite16(i, &cfg->queue_select); > + iowrite16(0, &cfg->queue_enable); > + iowrite16(VIRTIO_MSI_NO_VECTOR, &cfg->queue_msix_vector); > + } > +} > + > +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 -1; It's better to set status to CONFIG_S_FAILED when fail. &g...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...IO_MSI_NO_VECTOR, &cfg->msix_config); > + for (i = 0; i < hw->nr_vring; i++) { > + iowrite16(i, &cfg->queue_select); > + iowrite16(0, &cfg->queue_enable); > + iowrite16(VIRTIO_MSI_NO_VECTOR, &cfg->queue_msix_vector); > + } > +} > + > +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 -1; > + > + if (ifcvf_hw_enable(hw) < 0) > + return -1;...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...gt;vring[i].used) { > + IFC_ERR(ifcvf->dev, > + "Failed to start datapath, " > + "invaild value for vring %d desc," > + "avail_idx or usex_idx.\n", i); > + return -EINVAL; > + } > + } > + > + vf->nr_vring = i; > + ret = ifcvf_start_hw(vf); So basically there's no need for ifcvf_start_hw() to care about vq enablement, virtio core will take care of that through set_vq_ready(). > + > + return ret; > +} > + > +static int ifcvf_stop_datapath(void *private) > +{ > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(pr...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...;nr_vring; i++) { >>> +??????? iowrite16(i, &cfg->queue_select); >>> +??????? iowrite16(0, &cfg->queue_enable); >>> +??????? iowrite16(VIRTIO_MSI_NO_VECTOR, &cfg->queue_msix_vector); >>> +??? } >>> +} >>> + >>> +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) >>> +??????? r...
2023 Mar 31
2
[PATCH 2/5] get_driver_features from virito registers
...f (!(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 __iomem *ifcvf_lm; @@ -387,9 +392,6 @@ int ifcvf_start_hw(struct ifcvf_hw *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; - ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK); return 0; diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/dr...
2023 Mar 31
1
[PATCH 1/5] virt queue ops take immediate actions
...tio_pci_common_cfg __iomem *cfg = hw->common_cfg; + + vp_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_...
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...gt;> +??????????? break; >>> + >>> +??????? if (!vf->vring[i].desc || !vf->vring[i].avail || >>> +??????????? !vf->vring[i].used) >>> +??????????? break; >>> +??? } >>> +??? vf->nr_vring = i; >>> + >>> +??? ret = ifcvf_start_hw(vf); >>> +??? return ret; >>> +} >>> + >>> +static int ifcvf_stop_datapath(void *private) >>> +{ >>> +??? struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(private); >>> +??? int i; >>> + >>> +??? for (i = 0; i < IFCVF_MAX_QU...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...ady) > + break; Looks like error should be returned here? > + > + if (!vf->vring[i].size) > + break; > + > + if (!vf->vring[i].desc || !vf->vring[i].avail || > + !vf->vring[i].used) > + break; > + } > + vf->nr_vring = i; > + > + ret = ifcvf_start_hw(vf); > + return ret; > +} > + > +static int ifcvf_stop_datapath(void *private) > +{ > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(private); > + int i; > + > + for (i = 0; i < IFCVF_MAX_QUEUES; i++) > + vf->vring[i].cb.callback = NULL; Any synchronization is need...