search for: ifcvf_hw

Displaying 20 results from an estimated 42 matches for "ifcvf_hw".

2023 May 08
1
[PATCH V2 2/5] vDPA/ifcvf: get_driver_features from virtio registers
...files changed, 29 insertions(+), 23 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c index 6c5650f73007..546e923bcd16 100644 --- a/drivers/vdpa/ifcvf/ifcvf_base.c +++ b/drivers/vdpa/ifcvf/ifcvf_base.c @@ -204,11 +204,29 @@ u64 ifcvf_get_hw_features(struct ifcvf_hw *hw) return features; } -u64 ifcvf_get_features(struct ifcvf_hw *hw) +/* return provisioned vDPA dev features */ +u64 ifcvf_get_dev_features(struct ifcvf_hw *hw) { return hw->dev_features; } +u64 ifcvf_get_driver_features(struct ifcvf_hw *hw) +{ + struct virtio_pci_common_cfg __iomem...
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
2
[PATCH 2/5] get_driver_features from virito registers
...files changed, 29 insertions(+), 23 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c index 6c5650f73007..546e923bcd16 100644 --- a/drivers/vdpa/ifcvf/ifcvf_base.c +++ b/drivers/vdpa/ifcvf/ifcvf_base.c @@ -204,11 +204,29 @@ u64 ifcvf_get_hw_features(struct ifcvf_hw *hw) return features; } -u64 ifcvf_get_features(struct ifcvf_hw *hw) +/* return provisioned vDPA dev features */ +u64 ifcvf_get_dev_features(struct ifcvf_hw *hw) { return hw->dev_features; } +u64 ifcvf_get_driver_features(struct ifcvf_hw *hw) +{ + struct virtio_pci_common_cfg __iomem...
2023 May 08
1
[PATCH V2 1/5] vDPA/ifcvf: virt queue ops take immediate actions
...3 files changed, 45 insertions(+), 39 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c index 5563b3a773c7..6c5650f73007 100644 --- a/drivers/vdpa/ifcvf/ifcvf_base.c +++ b/drivers/vdpa/ifcvf/ifcvf_base.c @@ -329,31 +329,49 @@ int ifcvf_set_vq_state(struct ifcvf_hw *hw, u16 qid, u16 num) return 0; } -static int ifcvf_hw_enable(struct ifcvf_hw *hw) +void ifcvf_set_vq_num(struct ifcvf_hw *hw, u16 qid, u32 num) { - struct virtio_pci_common_cfg __iomem *cfg; - u32 i; + struct virtio_pci_common_cfg __iomem *cfg = hw->common_cfg; - cfg = hw->common_cf...
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); } u64 ifc...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...ions(+), 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_g...
2023 Mar 31
1
[PATCH 1/5] virt queue ops take immediate actions
...3 files changed, 45 insertions(+), 39 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_base.c b/drivers/vdpa/ifcvf/ifcvf_base.c index 5563b3a773c7..6c5650f73007 100644 --- a/drivers/vdpa/ifcvf/ifcvf_base.c +++ b/drivers/vdpa/ifcvf/ifcvf_base.c @@ -329,31 +329,49 @@ int ifcvf_set_vq_state(struct ifcvf_hw *hw, u16 qid, u16 num) return 0; } -static int ifcvf_hw_enable(struct ifcvf_hw *hw) +void ifcvf_set_vq_num(struct ifcvf_hw *hw, u16 qid, u32 num) { - struct virtio_pci_common_cfg __iomem *cfg; - u32 i; + struct virtio_pci_common_cfg __iomem *cfg = hw->common_cfg; - cfg = hw->common_cf...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...4c9bdcf > --- /dev/null > +++ b/drivers/vhost/ifcvf/ifcvf_base.c > @@ -0,0 +1,390 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (C) 2019 Intel Corporation. > + */ > + > +#include "ifcvf_base.h" > + > +static void *get_cap_addr(struct ifcvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + u8 bar = cap->bar; > + u32 length = cap->length; > + u32 offset = cap->offset; > + struct ifcvf_adapter *ifcvf = > + container_of(hw, struct ifcvf_adapter, vf); > + > + if (bar >= IFCVF_PCI_MAX_RESOURCE) { > + IFC_ER...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...0659f41 > --- /dev/null > +++ b/drivers/vhost/ifcvf/ifcvf_base.c > @@ -0,0 +1,344 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (C) 2019 Intel Corporation. > + */ > + > +#include "ifcvf_base.h" > + > +static void *get_cap_addr(struct ifcvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + struct ifcvf_adapter *ifcvf; > + u32 length, offset; > + u8 bar; > + > + length = le32_to_cpu(cap->length); > + offset = le32_to_cpu(cap->offset); > + bar = le32_to_cpu(cap->bar); > + > + ifcvf = container_of(hw, struc...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...0659f41 > --- /dev/null > +++ b/drivers/vhost/ifcvf/ifcvf_base.c > @@ -0,0 +1,344 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (C) 2019 Intel Corporation. > + */ > + > +#include "ifcvf_base.h" > + > +static void *get_cap_addr(struct ifcvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + struct ifcvf_adapter *ifcvf; > + u32 length, offset; > + u8 bar; > + > + length = le32_to_cpu(cap->length); > + offset = le32_to_cpu(cap->offset); > + bar = le32_to_cpu(cap->bar); > + > + ifcvf = container_of(hw, struc...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...gt;>> @@ -0,0 +1,390 @@ >>> +// SPDX-License-Identifier: GPL-2.0-only >>> +/* >>> + * Copyright (C) 2019 Intel Corporation. >>> + */ >>> + >>> +#include "ifcvf_base.h" >>> + >>> +static void *get_cap_addr(struct ifcvf_hw *hw, struct >>> virtio_pci_cap *cap) >>> +{ >>> +??? u8 bar = cap->bar; >>> +??? u32 length = cap->length; >>> +??? u32 offset = cap->offset; >>> +??? struct ifcvf_adapter *ifcvf = >>> +??????? container_of(hw, struct ifcvf_ad...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...0659f41 > --- /dev/null > +++ b/drivers/vhost/ifcvf/ifcvf_base.c > @@ -0,0 +1,344 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (C) 2019 Intel Corporation. > + */ > + > +#include "ifcvf_base.h" > + > +static void *get_cap_addr(struct ifcvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + struct ifcvf_adapter *ifcvf; > + u32 length, offset; > + u8 bar; > + > + length = le32_to_cpu(cap->length); > + offset = le32_to_cpu(cap->offset); > + bar = le32_to_cpu(cap->bar); > + > + ifcvf = container_of(hw, struc...
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 _...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...0659f41 > --- /dev/null > +++ b/drivers/vhost/ifcvf/ifcvf_base.c > @@ -0,0 +1,344 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (C) 2019 Intel Corporation. > + */ > + > +#include "ifcvf_base.h" > + > +static void *get_cap_addr(struct ifcvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + struct ifcvf_adapter *ifcvf; > + u32 length, offset; > + u8 bar; > + > + length = le32_to_cpu(cap->length); > + offset = le32_to_cpu(cap->offset); > + bar = le32_to_cpu(cap->bar); > + > + ifcvf = container_of(hw, struc...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...> +#include <linux/pci.h> > +#include <linux/sysfs.h> > +#include "ifcvf_base.h" > + > +#define VERSION_STRING "0.1" > +#define DRIVER_AUTHOR "Intel Corporation" > +#define IFCVF_DRIVER_NAME "ifcvf" > + > +static struct ifcvf_hw *mdev_to_vf(struct mdev_device *mdev) > +{ > + struct ifcvf_asapter *adapter = mdev_get_drvdata(mdev); > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(adapter); > + > + return vf; > +} > + > +static irqreturn_t ifcvf_intr_handler(int irq, void *arg) > +{ > + struct vring_i...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...; I would expect this should be done by querying the hw. Or IFC VF can't get any update through its firmware? > +} > + > +static int ifcvf_mdev_set_features(struct mdev_device *mdev, u64 features) > +{ > + struct ifcvf_adapter *adapter = mdev_get_drvdata(mdev); > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(adapter); > + > + vf->req_features = features; > + > + return 0; > +} > + > +static u64 ifcvf_mdev_get_vq_state(struct mdev_device *mdev, u16 qid) > +{ > + struct ifcvf_adapter *adapter = mdev_get_drvdata(mdev); > + struct ifcvf_hw *vf = IFC_...
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...change it in the future. > >> >> >>> +} >>> + >>> +static int ifcvf_mdev_set_features(struct mdev_device *mdev, u64 >>> features) >>> +{ >>> +??? struct ifcvf_adapter *adapter = mdev_get_drvdata(mdev); >>> +??? struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(adapter); >>> + >>> +??? vf->req_features = features; >>> + >>> +??? return 0; >>> +} >>> + >>> +static u64 ifcvf_mdev_get_vq_state(struct mdev_device *mdev, u16 qid) >>> +{ >>> +??? struct i...
2020 Apr 26
1
[PATCH 2/2] vdpa: implement config interrupt in IFCVF
...ed, 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_status(hw); > di...
2020 Apr 26
0
[PATCH V3 2/2] vdpa: implement config interrupt in IFCVF
...ed, 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_status(hw); > di...