Displaying 14 results from an estimated 14 matches for "ifcvf_stop_hw".
2023 May 08
1
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
This commit synchronize irqs of the virtqueues
and config space in the reset routine.
Thus ifcvf_stop_hw() and reset() are refactored as well.
Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com>
---
drivers/vdpa/ifcvf/ifcvf_base.c | 41 +++++++++++++++++++++--------
drivers/vdpa/ifcvf/ifcvf_base.h | 1 +
drivers/vdpa/ifcvf/ifcvf_main.c | 46 +++++----------------------------
3 files chang...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
On Mon, May 8, 2023 at 6:05?PM Zhu Lingshan <lingshan.zhu at intel.com> wrote:
>
> This commit synchronize irqs of the virtqueues
> and config space in the reset routine.
> Thus ifcvf_stop_hw() and reset() are refactored as well.
>
> Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com>
> ---
> drivers/vdpa/ifcvf/ifcvf_base.c | 41 +++++++++++++++++++++--------
> drivers/vdpa/ifcvf/ifcvf_base.h | 1 +
> drivers/vdpa/ifcvf/ifcvf_main.c | 46 +++++--------------...
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 Mar 31
1
[PATCH 3/5] retire ifcvf_start_datapath and ifcvf_add_status
...-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/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h
index cb19196c3ece..d34d3bc0dbf4 100644
--- a/drivers/vdpa/ifcvf/ifcvf_base.h
+++ b/drivers/vdpa/ifcvf/ifcvf_base.h
@@ -110,7 +110,6 @@ struct ifcvf_vdpa_mgmt_dev {
};...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...t; + ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER);
> +
> + if (ifcvf_config_features(hw) < 0)
> + return -1;
> +
> + if (ifcvf_hw_enable(hw) < 0)
> + return -1;
> +
> + ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK);
> +
> + return 0;
> +}
> +
> +void ifcvf_stop_hw(struct ifcvf_hw *hw)
> +{
> + ifcvf_hw_disable(hw);
> + ifcvf_reset(hw);
> +}
> +
> +void ifcvf_notify_queue(struct ifcvf_hw *hw, u16 qid)
> +{
> + iowrite16(qid, hw->notify_addr[qid]);
> +}
> +
> +u64 ifcvf_get_queue_notify_off(struct ifcvf_hw *hw, int qid)
>...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...t; + ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER);
> +
> + if (ifcvf_config_features(hw) < 0)
> + return -1;
> +
> + if (ifcvf_hw_enable(hw) < 0)
> + return -1;
> +
> + ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK);
> +
> + return 0;
> +}
> +
> +void ifcvf_stop_hw(struct ifcvf_hw *hw)
> +{
> + ifcvf_hw_disable(hw);
> + ifcvf_reset(hw);
> +}
> +
> +void ifcvf_notify_queue(struct ifcvf_hw *hw, u16 qid)
> +{
> + iowrite16(qid, hw->notify_addr[qid]);
> +}
> +
> +u64 ifcvf_get_queue_notify_off(struct ifcvf_hw *hw, int qid)
>...
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...VF_MAX_QUEUES; i++)
>>> +??????? vf->vring[i].cb.callback = NULL;
>>
>>
>> Any synchronization is needed for the vq irq handler?
> I think even we set callback = NULL, the code is still there, on-going
> routines would not be effected.
Ok I think you mean when ifcvf_stop_hw() return, hardware will not
respond to e.g kick and other events etc.
>>
>>
>>> +
>>> +??? ifcvf_stop_hw(vf);
>>> +
>>> +??? return 0;
>>> +}
>>> +
>>> +static void ifcvf_reset_vring(struct ifcvf_adapter *adapter)
>>...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...t; + ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER);
> +
> + if (ifcvf_config_features(hw) < 0)
> + return -1;
> +
> + if (ifcvf_hw_enable(hw) < 0)
> + return -1;
> +
> + ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK);
> +
> + return 0;
> +}
> +
> +void ifcvf_stop_hw(struct ifcvf_hw *hw)
> +{
> + ifcvf_hw_disable(hw);
> + ifcvf_reset(hw);
> +}
> +
> +void ifcvf_notify_queue(struct ifcvf_hw *hw, u16 qid)
> +{
> + iowrite16(qid, hw->notify_addr[qid]);
I suspect you didn't validate this driver with sparse, did you?
Otherwise I think...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...+ if (ifcvf_config_features(hw) < 0)
> + return -1;
It's better to set status to CONFIG_S_FAILED when fail.
> +
> + if (ifcvf_hw_enable(hw) < 0)
> + return -1;
> +
> + ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK);
> +
> + return 0;
> +}
> +
> +void ifcvf_stop_hw(struct ifcvf_hw *hw)
> +{
> + ifcvf_hw_disable(hw);
> + ifcvf_reset(hw);
> +}
> +
> +void ifcvf_notify_queue(struct ifcvf_hw *hw, u16 qid)
> +{
> + iowrite16(qid, hw->notify_addr[qid]);
> +}
> +
> +u64 ifcvf_get_queue_notify_off(struct ifcvf_hw *hw, int qid)
>...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...t; + ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER);
> +
> + if (ifcvf_config_features(hw) < 0)
> + return -1;
> +
> + if (ifcvf_hw_enable(hw) < 0)
> + return -1;
> +
> + ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK);
> +
> + return 0;
> +}
> +
> +void ifcvf_stop_hw(struct ifcvf_hw *hw)
> +{
> + ifcvf_hw_disable(hw);
> + ifcvf_reset(hw);
> +}
> +
> +void ifcvf_enable_logging_vf(struct ifcvf_hw *hw, u64 log_base, u64 log_size)
> +{
> + u8 *lm_cfg;
> +
> + lm_cfg = hw->lm_cfg;
> +
> + *(u32 *)(lm_cfg + IFCVF_LM_BASE_ADDR_LO...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...t;> +??????? return -1;
>>> +
>>> +??? if (ifcvf_hw_enable(hw) < 0)
>>> +??????? return -1;
>>> +
>>> +??? ifcvf_add_status(hw, VIRTIO_CONFIG_S_DRIVER_OK);
>>> +
>>> +??? return 0;
>>> +}
>>> +
>>> +void ifcvf_stop_hw(struct ifcvf_hw *hw)
>>> +{
>>> +??? ifcvf_hw_disable(hw);
>>> +??? ifcvf_reset(hw);
>>> +}
>>> +
>>> +void ifcvf_enable_logging_vf(struct ifcvf_hw *hw, u64 log_base, u64
>>> log_size)
>>> +{
>>> +??? u8 *lm_cfg;
>...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...; +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 needed for the vq irq handler?
> +
> + ifcvf_stop_hw(vf);
> +
> + return 0;
> +}
> +
> +static void ifcvf_reset_vring(struct ifcvf_adapter *adapter)
> +{
> + int i;
> + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(adapter);
> +
> + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) {
> + vf->vring[i].last_used_idx = 0;...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
..._vq_ready().
> +
> + 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;
> +
> + ifcvf_stop_hw(vf);
> +
> + return 0;
> +}
> +
> +static void ifcvf_reset_vring(struct ifcvf_adapter *adapter)
> +{
> + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(adapter);
> + struct virtio_pci_common_cfg *cfg;
> + u8 *lm_cfg;
> + int i;
> +
> + cfg = vf->common_cfg;
> + lm...