search for: vdpa_to_vf

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

Did you mean: vdpa_to_vp
2023 May 08
1
[PATCH V2 1/5] vDPA/ifcvf: virt queue ops take immediate actions
...g[i].desc = 0; - vf->vring[i].avail = 0; - vf->vring[i].used = 0; - vf->vring[i].ready = 0; vf->vring[i].cb.callback = NULL; vf->vring[i].cb.private = NULL; } @@ -542,14 +538,14 @@ static void ifcvf_vdpa_set_vq_ready(struct vdpa_device *vdpa_dev, { struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); - vf->vring[qid].ready = ready; + ifcvf_set_vq_ready(vf, qid, ready); } static bool ifcvf_vdpa_get_vq_ready(struct vdpa_device *vdpa_dev, u16 qid) { struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); - return vf->vring[qid].ready; + return ifcvf_get_vq_ready(vf, qid); } sta...
2023 Mar 31
1
[PATCH 1/5] virt queue ops take immediate actions
...g[i].desc = 0; - vf->vring[i].avail = 0; - vf->vring[i].used = 0; - vf->vring[i].ready = 0; vf->vring[i].cb.callback = NULL; vf->vring[i].cb.private = NULL; } @@ -542,14 +538,14 @@ static void ifcvf_vdpa_set_vq_ready(struct vdpa_device *vdpa_dev, { struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); - vf->vring[qid].ready = ready; + ifcvf_set_vq_ready(vf, qid, ready); } static bool ifcvf_vdpa_get_vq_ready(struct vdpa_device *vdpa_dev, u16 qid) { struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); - return vf->vring[qid].ready; + return ifcvf_get_vq_ready(vf, qid); } 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
...urn 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_OK) { - ifcvf_stop_dat...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...2,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; > + ifc...
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...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(str...
2020 Apr 26
1
[PATCH 2/2] vdpa: implement config interrupt in IFCVF
...arg; > @@ -256,7 +266,10 @@ static void ifcvf_vdpa_set_config(struct vdpa_device *vdpa_dev, > static void ifcvf_vdpa_set_config_cb(struct vdpa_device *vdpa_dev, > struct vdpa_callback *cb) > { > - /* We don't support config interrupt */ > + struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); > + > + vf->config_cb.callback = cb->callback; > + vf->config_cb.private = cb->private; > } > > /* > @@ -292,6 +305,13 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > struct ifcvf_hw *vf = &adapter->vf; > int vec...
2023 May 08
1
[PATCH V2 2/5] vDPA/ifcvf: get_driver_features from virtio registers
...; - vf->req_features = features; + ifcvf_set_driver_features(vf, features); return 0; } @@ -436,8 +436,11 @@ static int ifcvf_vdpa_set_driver_features(struct vdpa_device *vdpa_dev, u64 feat static u64 ifcvf_vdpa_get_driver_features(struct vdpa_device *vdpa_dev) { struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); + u64 features; + + features = ifcvf_get_driver_features(vf); - return vf->req_features; + return features; } static u8 ifcvf_vdpa_get_status(struct vdpa_device *vdpa_dev) -- 2.39.1
2020 Jul 16
0
[PATCH vhost next 06/10] vdpa: Add means to communicate vq status on get_vq_state
...ivers/vdpa/ifcvf/ifcvf_main.c > index 69032ee97824..77e3b3d91167 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -240,6 +240,7 @@ static void ifcvf_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid, > { > struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); > > + state->state = vf->vring[qid].ready ? 0 : BIT(VQ_STATE_NOT_READY); > state->avail_index = ifcvf_get_vq_state(vf, qid); > } > > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c > index 599519039f8d..06d974b4bd7...
2020 Apr 26
0
[PATCH V3 2/2] vdpa: implement config interrupt in IFCVF
...arg; > @@ -256,7 +266,10 @@ static void ifcvf_vdpa_set_config(struct vdpa_device *vdpa_dev, > static void ifcvf_vdpa_set_config_cb(struct vdpa_device *vdpa_dev, > struct vdpa_callback *cb) > { > - /* We don't support config interrupt */ > + struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); > + > + vf->config_cb.callback = cb->callback; > + vf->config_cb.private = cb->private; > } > > /* > @@ -292,6 +305,13 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > struct ifcvf_hw *vf = &adapter->vf; > int vec...
2023 Mar 31
1
[PATCH 3/5] retire ifcvf_start_datapath and ifcvf_add_status
...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; } - - if (ifcvf_start_datapath(adapt...
2020 Jul 21
0
[PATCH V2 vhost next 06/10] vdpa: Modify get_vq_state() to return error code
...t; } > > -static void ifcvf_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid, > - struct vdpa_vq_state *state) > +static int ifcvf_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid, > + struct vdpa_vq_state *state) > { > struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); > > state->avail_index = ifcvf_get_vq_state(vf, qid); > + return 0; > } > > static int ifcvf_vdpa_set_vq_state(struct vdpa_device *vdpa_dev, u16 qid, > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c > index 5995190...
2020 Aug 05
0
[PATCH V4 linux-next 08/12] vdpa: Modify get_vq_state() to return error code
...t; } > > -static void ifcvf_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid, > - struct vdpa_vq_state *state) > +static int ifcvf_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid, > + struct vdpa_vq_state *state) > { > struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); > > state->avail_index = ifcvf_get_vq_state(vf, qid); > + return 0; > } > > static int ifcvf_vdpa_set_vq_state(struct vdpa_device *vdpa_dev, u16 qid, > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c > index f1c351d...
2023 Mar 31
2
[PATCH 2/5] get_driver_features from virito registers
...; - vf->req_features = features; + ifcvf_set_driver_features(vf, features); return 0; } @@ -436,8 +436,11 @@ static int ifcvf_vdpa_set_driver_features(struct vdpa_device *vdpa_dev, u64 feat static u64 ifcvf_vdpa_get_driver_features(struct vdpa_device *vdpa_dev) { struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); + u64 features; + + features = ifcvf_get_driver_features(vf); - return vf->req_features; + return features; } static u8 ifcvf_vdpa_get_status(struct vdpa_device *vdpa_dev) -- 2.39.1
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...> 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_CONFIG_S_DRIVER_OK)) { > ifcvf_stop_datapath(...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...{ > 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(struct vdpa_device *vdpa_dev, u8 status) > re...