search for: status_old

Displaying 13 results from an estimated 13 matches for "status_old".

2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...uct ifcvf_hw *vf = ifcvf_private_to_vf(private); >>> @@ -118,9 +172,12 @@ static void ifcvf_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); >&...
2023 May 08
1
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...ce *vdpa_dev) { return container_of(vdpa_dev, struct ifcvf_adapter, vdpa); @@ -462,23 +438,15 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) static int ifcvf_vdpa_reset(struct vdpa_device *vdpa_dev) { - struct ifcvf_adapter *adapter; - struct ifcvf_hw *vf; - u8 status_old; - - vf = vdpa_to_vf(vdpa_dev); - adapter = vdpa_to_adapter(vdpa_dev); - status_old = ifcvf_get_status(vf); + struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); + u8 status = ifcvf_get_status(vf); - if (status_old == 0) - return 0; + ifcvf_stop_hw(vf); - if (status_old & VIRTIO_CONFIG_S_DRIVER_O...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...ruct ifcvf_adapter, vdpa); > @@ -462,23 +438,15 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) > > static int ifcvf_vdpa_reset(struct vdpa_device *vdpa_dev) > { > - struct ifcvf_adapter *adapter; > - struct ifcvf_hw *vf; > - u8 status_old; > - > - vf = vdpa_to_vf(vdpa_dev); > - adapter = vdpa_to_adapter(vdpa_dev); > - status_old = ifcvf_get_status(vf); > + struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); > + u8 status = ifcvf_get_status(vf); > > - if (status_old == 0) > -...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...c int ifcvf_start_datapath(void *private) > { > struct ifcvf_hw *vf = ifcvf_private_to_vf(private); > @@ -118,17 +172,34 @@ static void ifcvf_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_CO...
2020 Aug 04
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...; struct vdpa_device *vdpa = v->vdpa; > @@ -155,11 +204,15 @@ static long vhost_vdpa_set_status(struct vhost_vdpa *v, u8 __user *statusp) > { > struct vdpa_device *vdpa = v->vdpa; > const struct vdpa_config_ops *ops = vdpa->config; > - u8 status; > + u8 status, status_old; > + int nvqs = v->nvqs; > + u16 i; > > if (copy_from_user(&status, statusp, sizeof(status))) > return -EFAULT; > > + status_old = ops->get_status(vdpa); > + > /* > * Userspace shouldn't remove status bits unless reset the > * s...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...ic int ifcvf_start_datapath(void *private) > { > struct ifcvf_hw *vf = ifcvf_private_to_vf(private); > @@ -118,9 +172,12 @@ static void ifcvf_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(st...
2020 Jul 28
0
[PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...; struct vdpa_device *vdpa = v->vdpa; > @@ -155,11 +204,15 @@ static long vhost_vdpa_set_status(struct vhost_vdpa *v, u8 __user *statusp) > { > struct vdpa_device *vdpa = v->vdpa; > const struct vdpa_config_ops *ops = vdpa->config; > - u8 status; > + u8 status, status_old; > + int i, nvqs; > > if (copy_from_user(&status, statusp, sizeof(status))) > return -EFAULT; > > + status_old = ops->get_status(vdpa); > + nvqs = v->nvqs; > + > /* > * Userspace shouldn't remove status bits unless reset the > *...
2020 Aug 04
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...15 @@ static long vhost_vdpa_set_status(struct > vhost_vdpa *v, u8 __user *statusp) > ? { > ????? struct vdpa_device *vdpa = v->vdpa; > ????? const struct vdpa_config_ops *ops = vdpa->config; > -??? u8 status; > +??? u8 status, status_old; > +??? int nvqs = v->nvqs; > +??? u16 i; > ? ????? if (copy_from_user(&status, statusp, sizeof(status))) > ????????? return -EFAULT; > ? +??? status_old = ops->get_status(vdpa); > + > ????? /* > ?????...
2023 Mar 31
1
[PATCH 3/5] retire ifcvf_start_datapath and ifcvf_add_status
...struct ifcvf_adapter *adapter) { struct ifcvf_hw *vf = adapter->vf; @@ -452,13 +436,11 @@ static u8 ifcvf_vdpa_get_status(struct vdpa_device *vdpa_dev) static void ifcvf_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 = vdpa_to_adapter(vdpa_dev); status_old = ifcvf_get_status(vf); if (status_old == status) @@ -473,11 +455,6 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) ifcvf_set_status(vf, status); return; } -...
2020 Aug 05
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...5 @@ static long vhost_vdpa_set_status(struct >>> vhost_vdpa *v, u8 __user *statusp) >>> ? { >>> ????? struct vdpa_device *vdpa = v->vdpa; >>> ????? const struct vdpa_config_ops *ops = vdpa->config; >>> -??? u8 status; >>> +??? u8 status, status_old; >>> +??? int nvqs = v->nvqs; >>> +??? u16 i; >>> ? ????? if (copy_from_user(&status, statusp, sizeof(status))) >>> ????????? return -EFAULT; >>> ? +??? status_old = ops->get_status(vdpa); >>> + >>> ????? /* >>> ?????...
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
2020 Aug 05
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...gt;>>>> vhost_vdpa *v, u8 __user *statusp) >>>>> ? { >>>>> ????? struct vdpa_device *vdpa = v->vdpa; >>>>> ????? const struct vdpa_config_ops *ops = vdpa->config; >>>>> -??? u8 status; >>>>> +??? u8 status, status_old; >>>>> +??? int nvqs = v->nvqs; >>>>> +??? u16 i; >>>>> ? ????? if (copy_from_user(&status, statusp, sizeof(status))) >>>>> ????????? return -EFAULT; >>>>> ? +??? status_old = ops->get_status(vdpa); >>>&gt...