search for: ifcvf_get_status

Displaying 19 results from an estimated 19 matches for "ifcvf_get_status".

2023 May 08
1
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...pa/ifcvf/ifcvf_base.c @@ -170,12 +170,9 @@ void ifcvf_set_status(struct ifcvf_hw *hw, u8 status) void ifcvf_reset(struct ifcvf_hw *hw) { - hw->config_cb.callback = NULL; - hw->config_cb.private = NULL; - ifcvf_set_status(hw, 0); - /* flush set_status, make sure VF is stopped, reset */ - ifcvf_get_status(hw); + while (ifcvf_get_status(hw)) + msleep(1); } u64 ifcvf_get_hw_features(struct ifcvf_hw *hw) @@ -368,20 +365,42 @@ void ifcvf_set_vq_ready(struct ifcvf_hw *hw, u16 qid, bool ready) vp_iowrite16(ready, &cfg->queue_enable); } -static void ifcvf_hw_disable(struct ifcvf_hw *hw) +s...
2023 Mar 31
1
[PATCH 3/5] retire ifcvf_start_datapath and ifcvf_add_status
...-------- 3 files changed, 43 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c index 546e923bcd16..79e313c5e10e 100644 --- a/drivers/vdpa/ifcvf/ifcvf_base.c +++ b/drivers/vdpa/ifcvf/ifcvf_base.c @@ -178,15 +178,6 @@ void ifcvf_reset(struct ifcvf_hw *hw) 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_hw_features(struct ifcvf_hw *hw) { struct virtio_pci_common_cfg __iomem *cfg = hw->com...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...fcvf_hw *hw, u8 status) > > void ifcvf_reset(struct ifcvf_hw *hw) > { > - hw->config_cb.callback = NULL; > - hw->config_cb.private = NULL; > - > ifcvf_set_status(hw, 0); > - /* flush set_status, make sure VF is stopped, reset */ > - ifcvf_get_status(hw); > + while (ifcvf_get_status(hw)) > + msleep(1); > } > > u64 ifcvf_get_hw_features(struct ifcvf_hw *hw) > @@ -368,20 +365,42 @@ void ifcvf_set_vq_ready(struct ifcvf_hw *hw, u16 qid, bool ready) > vp_iowrite16(ready, &cfg->queue_enable);...
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
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
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...gt;>> ????? struct ifcvf_adapter *adapter; >>> ????? struct ifcvf_hw *vf; >>> +??? u8 status_old; >>> +??? int ret; >>> ? ????? vf? = vdpa_to_vf(vdpa_dev); >>> ????? adapter = dev_get_drvdata(vdpa_dev->dev.parent); >>> +??? status_old = ifcvf_get_status(vf); >>> ? ????? if (status == 0) { >>> ????????? ifcvf_stop_datapath(adapter); >>> @@ -128,7 +185,22 @@ static void ifcvf_vdpa_set_status(struct >>> vdpa_device *vdpa_dev, u8 status) >>> ????????? return; >>> ????? } >>> ? -??? if (st...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
..., "PCI capability mapping: common cfg: %p,\ > + notify base: %p\n, isr cfg: %p, device cfg: %p,\ > + multiplier: %u\n", > + hw->common_cfg, hw->notify_base, hw->isr, > + hw->net_cfg, hw->notify_off_multiplier); > + > + return 0; > +} > + > +u8 ifcvf_get_status(struct ifcvf_hw *hw) > +{ > + u8 old_gen, new_gen, status; > + > + do { > + old_gen = ioread8(&hw->common_cfg->config_generation); > + status = ioread8(&hw->common_cfg->device_status); > + new_gen = ioread8(&hw->common_cfg->config_generation); &...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
..., "PCI capability mapping: common cfg: %p,\ > + notify base: %p\n, isr cfg: %p, device cfg: %p,\ > + multiplier: %u\n", > + hw->common_cfg, hw->notify_base, hw->isr, > + hw->net_cfg, hw->notify_off_multiplier); > + > + return 0; > +} > + > +u8 ifcvf_get_status(struct ifcvf_hw *hw) > +{ > + u8 old_gen, new_gen, status; > + > + do { > + old_gen = ioread8(&hw->common_cfg->config_generation); > + status = ioread8(&hw->common_cfg->device_status); > + new_gen = ioread8(&hw->common_cfg->config_generation); &...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
..., "PCI capability mapping: common cfg: %p,\ > + notify base: %p\n, isr cfg: %p, device cfg: %p,\ > + multiplier: %u\n", > + hw->common_cfg, hw->notify_base, hw->isr, > + hw->net_cfg, hw->notify_off_multiplier); > + > + return 0; > +} > + > +u8 ifcvf_get_status(struct ifcvf_hw *hw) > +{ > + u8 old_gen, new_gen, status; > + > + do { > + old_gen = ioread8(&hw->common_cfg->config_generation); > + status = ioread8(&hw->common_cfg->device_status); > + new_gen = ioread8(&hw->common_cfg->config_generation); &...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
..., "PCI capability mapping: common cfg: %p,\ > + notify base: %p\n, isr cfg: %p, device cfg: %p,\ > + multiplier: %u\n", > + hw->common_cfg, hw->notify_base, hw->isr, > + hw->net_cfg, hw->notify_off_multiplier); > + > + return 0; > +} > + > +u8 ifcvf_get_status(struct ifcvf_hw *hw) > +{ > + u8 old_gen, new_gen, status; > + > + do { > + old_gen = ioread8(&hw->common_cfg->config_generation); > + status = ioread8(&hw->common_cfg->device_status); > + new_gen = ioread8(&hw->common_cfg->config_generation);...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...r cfg: %p\n" > + "device cfg: %p\n" > + "multiplier: %u\n", > + hw->common_cfg, > + hw->notify_base, > + hw->isr, > + hw->dev_cfg, > + hw->notify_off_multiplier); > + > + return 0; > +} > + > +static u8 ifcvf_get_status(struct ifcvf_hw *hw) > +{ > + return ioread8(&hw->common_cfg->device_status); > +} > + > +static void ifcvf_set_status(struct ifcvf_hw *hw, u8 status) > +{ > + iowrite8(status, &hw->common_cfg->device_status); > +} > + > +static void ifcvf_reset(str...
2023 May 08
1
[PATCH V2 2/5] vDPA/ifcvf: get_driver_features from virtio registers
...c 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 __iomem *ifcvf_lm; @@ -387,9 +392,6 @@ int ifcvf_start_hw(struct...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...g, >>> +??????????????? hw->notify_base, >>> +??????????????? hw->isr, >>> +??????????????? hw->dev_cfg, >>> +??????????????? hw->notify_off_multiplier); >>> + >>> +??? return 0; >>> +} >>> + >>> +static u8 ifcvf_get_status(struct ifcvf_hw *hw) >>> +{ >>> +??? return ioread8(&hw->common_cfg->device_status); >>> +} >>> + >>> +static void ifcvf_set_status(struct ifcvf_hw *hw, u8 status) >>> +{ >>> +??? iowrite8(status, &hw->common_cfg->de...
2023 Mar 31
2
[PATCH 2/5] get_driver_features from virito registers
...c 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 __iomem *ifcvf_lm; @@ -387,9 +392,6 @@ int ifcvf_start_hw(struct...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...cvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) > { > struct ifcvf_adapter *adapter; > struct ifcvf_hw *vf; > + u8 status_old; > + int ret; > > vf = vdpa_to_vf(vdpa_dev); > adapter = dev_get_drvdata(vdpa_dev->dev.parent); > + status_old = ifcvf_get_status(vf); > > - if (status == 0) { > + if ((status_old & VIRTIO_CONFIG_S_DRIVER_OK) && > + !(status & VIRTIO_CONFIG_S_DRIVER_OK)) { > ifcvf_stop_datapath(adapter); > + ifcvf_free_irq(adapter, IFCVF_MAX_QUEUE_PAIRS * 2); > + } > + > + if (status == 0...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...cvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) > { > struct ifcvf_adapter *adapter; > struct ifcvf_hw *vf; > + u8 status_old; > + int ret; > > vf = vdpa_to_vf(vdpa_dev); > adapter = dev_get_drvdata(vdpa_dev->dev.parent); > + status_old = ifcvf_get_status(vf); > > if (status == 0) { > ifcvf_stop_datapath(adapter); > @@ -128,7 +185,22 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) > return; > } > > - if (status & VIRTIO_CONFIG_S_DRIVER_OK) { > + if ((status_old & VI...
2020 Apr 26
1
[PATCH 2/2] vdpa: implement config interrupt in IFCVF
...vf_set_status(struct ifcvf_hw *hw, u8 status) > > void ifcvf_reset(struct ifcvf_hw *hw) > { > + hw->config_cb.callback = NULL; > + hw->config_cb.private = NULL; > + > ifcvf_set_status(hw, 0); > /* flush set_status, make sure VF is stopped, reset */ > ifcvf_get_status(hw); > diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h > index e803070..76928b0 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_base.h > +++ b/drivers/vdpa/ifcvf/ifcvf_base.h > @@ -81,6 +81,8 @@ struct ifcvf_hw { > void __iomem *net_cfg; > struct vr...
2020 Apr 26
0
[PATCH V3 2/2] vdpa: implement config interrupt in IFCVF
...vf_set_status(struct ifcvf_hw *hw, u8 status) > > void ifcvf_reset(struct ifcvf_hw *hw) > { > + hw->config_cb.callback = NULL; > + hw->config_cb.private = NULL; > + > ifcvf_set_status(hw, 0); > /* flush set_status, make sure VF is stopped, reset */ > ifcvf_get_status(hw); > diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h > index e803070..23ac47d 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_base.h > +++ b/drivers/vdpa/ifcvf/ifcvf_base.h > @@ -27,6 +27,7 @@ > ((1ULL << VIRTIO_NET_F_MAC) | \ > (1ULL &...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...dev_kick_vq(struct mdev_device *mdev, u16 idx) > +{ > + struct ifcvf_hw *vf = mdev_to_vf(mdev); > + > + ifcvf_notify_queue(vf, idx); > +} > + > +static u8 ifcvf_mdev_get_status(struct mdev_device *mdev) > +{ > + struct ifcvf_hw *vf = mdev_to_vf(mdev); > + > + return ifcvf_get_status(vf); > +} > + > +static u32 ifcvf_mdev_get_generation(struct mdev_device *mdev) > +{ > + struct ifcvf_hw *vf = mdev_to_vf(mdev); > + > + return ioread8(&vf->common_cfg->config_generation); > +} > + > +static u32 ifcvf_mdev_get_device_id(struct mdev_device *md...