search for: ifcvf_set_status

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

Did you mean: ifcvf_get_status
2023 Mar 31
1
[PATCH 3/5] retire ifcvf_start_datapath and ifcvf_add_status
...5e10e 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->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_statu...
2020 Apr 26
1
[PATCH 2/2] vdpa: implement config interrupt in IFCVF
...++- > 3 files changed, 26 insertions(+), 1 deletion(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c > index b61b06e..c825d99 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_base.c > +++ b/drivers/vdpa/ifcvf/ifcvf_base.c > @@ -185,6 +185,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_sta...
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 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...------------------------- 3 files changed, 38 insertions(+), 50 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c index 79e313c5e10e..1f39290baa38 100644 --- a/drivers/vdpa/ifcvf/ifcvf_base.c +++ b/drivers/vdpa/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...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...files changed, 38 insertions(+), 50 deletions(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c > index 79e313c5e10e..1f39290baa38 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_base.c > +++ b/drivers/vdpa/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 */ >...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...old_gen = ioread8(&hw->common_cfg->config_generation); > + status = ioread8(&hw->common_cfg->device_status); > + new_gen = ioread8(&hw->common_cfg->config_generation); > + } while (old_gen != new_gen); > + > + return status; > +} > + > +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_h...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...old_gen = ioread8(&hw->common_cfg->config_generation); > + status = ioread8(&hw->common_cfg->device_status); > + new_gen = ioread8(&hw->common_cfg->config_generation); > + } while (old_gen != new_gen); > + > + return status; > +} > + > +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_h...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...old_gen = ioread8(&hw->common_cfg->config_generation); > + status = ioread8(&hw->common_cfg->device_status); > + new_gen = ioread8(&hw->common_cfg->config_generation); > + } while (old_gen != new_gen); > + > + return status; > +} > + > +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_h...
2020 Apr 26
0
[PATCH V3 2/2] vdpa: implement config interrupt in IFCVF
...++- > 3 files changed, 27 insertions(+), 1 deletion(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c > index b61b06e..c825d99 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_base.c > +++ b/drivers/vdpa/ifcvf/ifcvf_base.c > @@ -185,6 +185,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_sta...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
..._status); > + new_gen = ioread8(&hw->common_cfg->config_generation); config generation should be only used for config access not status, and even it did, it should be called from virtio core. > + } while (old_gen != new_gen); > + > + return status; > +} > + > +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_h...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...otify_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(struct ifcvf_hw *hw) > +{ > + ifcvf_set_status(hw, 0); > + > + /* flush status write */ > + ifcvf_get_status(hw); Why this flush i...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...f_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(struct ifcvf_hw *hw) >>> +{ >>> +??? ifcvf_set_status(hw, 0); >>> + >>&...
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...;>> +??????? !(status_old & VIRTIO_CONFIG_S_DRIVER_OK)) { >>> +??????? ret = ifcvf_request_irq(adapter); >>> +??????? if (ret) { >>> +??????????? status = ifcvf_get_status(vf); >>> +??????????? status |= VIRTIO_CONFIG_S_FAILED; >>> +??????????? ifcvf_set_status(vf, status); >>> +??????????? return; >>> +??????? } >>> + >> >> >> Have a hard though on the logic here. >> >> This depends on the status setting from guest or userspace. Which >> means it can not deal with e.g when qemu or userspace...
2023 May 08
1
[PATCH V2 2/5] vDPA/ifcvf: get_driver_features from virtio registers
...s/vdpa/ifcvf/ifcvf_base.h @@ -69,7 +69,6 @@ struct ifcvf_hw { phys_addr_t notify_base_pa; u32 notify_off_multiplier; u32 dev_type; - u64 req_features; u64 hw_features; /* provisioned device features */ u64 dev_features; @@ -122,7 +121,7 @@ u8 ifcvf_get_status(struct ifcvf_hw *hw); void ifcvf_set_status(struct ifcvf_hw *hw, u8 status); void io_write64_twopart(u64 val, u32 *lo, u32 *hi); void ifcvf_reset(struct ifcvf_hw *hw); -u64 ifcvf_get_features(struct ifcvf_hw *hw); +u64 ifcvf_get_dev_features(struct ifcvf_hw *hw); u64 ifcvf_get_hw_features(struct ifcvf_hw *hw); int ifcvf_verify_min_featur...
2023 Mar 31
2
[PATCH 2/5] get_driver_features from virito registers
...s/vdpa/ifcvf/ifcvf_base.h @@ -69,7 +69,6 @@ struct ifcvf_hw { phys_addr_t notify_base_pa; u32 notify_off_multiplier; u32 dev_type; - u64 req_features; u64 hw_features; /* provisioned device features */ u64 dev_features; @@ -122,7 +121,7 @@ u8 ifcvf_get_status(struct ifcvf_hw *hw); void ifcvf_set_status(struct ifcvf_hw *hw, u8 status); void io_write64_twopart(u64 val, u32 *lo, u32 *hi); void ifcvf_reset(struct ifcvf_hw *hw); -u64 ifcvf_get_features(struct ifcvf_hw *hw); +u64 ifcvf_get_dev_features(struct ifcvf_hw *hw); u64 ifcvf_get_hw_features(struct ifcvf_hw *hw); int ifcvf_verify_min_featur...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...O_CONFIG_S_DRIVER_OK) { > + if ((status & VIRTIO_CONFIG_S_DRIVER_OK) && > + !(status_old & VIRTIO_CONFIG_S_DRIVER_OK)) { > + ret = ifcvf_request_irq(adapter); > + if (ret) { > + status = ifcvf_get_status(vf); > + status |= VIRTIO_CONFIG_S_FAILED; > + ifcvf_set_status(vf, status); > + return; > + } > + > if (ifcvf_start_datapath(adapter) < 0) > IFCVF_ERR(adapter->pdev, > "Failed to set ifcvf vdpa status %u\n", > @@ -284,38 +355,6 @@ static void ifcvf_vdpa_set_config_cb(struct vdpa_device *vdpa_dev, >...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...S * 2); > + } > + > + if ((status & VIRTIO_CONFIG_S_DRIVER_OK) && > + !(status_old & VIRTIO_CONFIG_S_DRIVER_OK)) { > + ret = ifcvf_request_irq(adapter); > + if (ret) { > + status = ifcvf_get_status(vf); > + status |= VIRTIO_CONFIG_S_FAILED; > + ifcvf_set_status(vf, status); > + return; > + } > + Have a hard though on the logic here. This depends on the status setting from guest or userspace. Which means it can not deal with e.g when qemu or userspace is crashed? Do we need to care this or it's a over engineering? Thanks > if...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...g something like start_datapath here looks wired. If it just to setup the virtqueue etc, can we simply move them to e.g set_vq_num, set_vq_address, etc? > + > + if (ret) > + IFC_ERR(adapter->dev, "Failed to set mdev status %u.\n", > + status); > + } > + > + ifcvf_set_status(vf, status); > +} > + > +static u16 ifcvf_mdev_get_vq_num_max(struct mdev_device *mdev) > +{ > + struct ifcvf_hw *vf = mdev_to_vf(mdev); > + > + return vf->vring[0].size; It looks to me the only case that size is set is from ifcvf_mdev_set_vq_num()? So I don't get how i...