search for: virtio_pci_find_capability

Displaying 20 results from an estimated 57 matches for "virtio_pci_find_capability".

2020 Aug 03
1
[PATCH] virtio_pci_modern: Fix the comment of virtio_pci_find_capability()
From: Liao Pingfang <liao.pingfang at zte.com.cn> Fix the comment of virtio_pci_find_capability() by adding missing comment for the last parameter: bars. Fixes: 59a5b0f7bf74 ("virtio-pci: alloc only resources actually used.") Signed-off-by: Liao Pingfang <liao.pingfang at zte.com.cn> Signed-off-by: Yi Wang <wang.yi59 at zte.com.cn> --- drivers/virtio/virtio_pci_modern....
2015 Jun 24
1
[PATCH] virtio-pci: alloc only resources actually used.
.../drivers/virtio/virtio_pci_modern.c index e88e099..8e5cf19 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -499,7 +499,7 @@ static const struct virtio_config_ops virtio_pci_config_ops = { * Returns offset of the capability, or 0. */ static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type, - u32 ioresource_types) + u32 ioresource_types, int *bars) { int pos; @@ -520,8 +520,10 @@ static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type, if (type == cfg_type) { if (pci_resource_len(dev, bar) &&am...
2015 Jun 24
1
[PATCH] virtio-pci: alloc only resources actually used.
.../drivers/virtio/virtio_pci_modern.c index e88e099..8e5cf19 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -499,7 +499,7 @@ static const struct virtio_config_ops virtio_pci_config_ops = { * Returns offset of the capability, or 0. */ static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type, - u32 ioresource_types) + u32 ioresource_types, int *bars) { int pos; @@ -520,8 +520,10 @@ static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type, if (type == cfg_type) { if (pci_resource_len(dev, bar) &&am...
2015 Jun 23
1
[PATCH] virtio-pci: alloc only resources actually used.
.../drivers/virtio/virtio_pci_modern.c index e88e099..122ad7a 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -499,7 +499,7 @@ static const struct virtio_config_ops virtio_pci_config_ops = { * Returns offset of the capability, or 0. */ static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type, - u32 ioresource_types) + u32 ioresource_types, int *bars) { int pos; @@ -520,8 +520,10 @@ static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type, if (type == cfg_type) { if (pci_resource_len(dev, bar) &&am...
2015 Jun 23
1
[PATCH] virtio-pci: alloc only resources actually used.
.../drivers/virtio/virtio_pci_modern.c index e88e099..122ad7a 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -499,7 +499,7 @@ static const struct virtio_config_ops virtio_pci_config_ops = { * Returns offset of the capability, or 0. */ static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type, - u32 ioresource_types) + u32 ioresource_types, int *bars) { int pos; @@ -520,8 +520,10 @@ static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type, if (type == cfg_type) { if (pci_resource_len(dev, bar) &&am...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...clude <linux/pci.h> > +#include <linux/uaccess.h> Are io.h and uaccess.h needed? > +#include <linux/vfio.h> > +#include <linux/virtio_pci.h> > +#include <linux/virtio_config.h> > + > +#include "vfio_pci_private.h" > + > +/** > + * virtio_pci_find_capability - walk capabilities to find device info. > + * @dev: the pci device > + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek > + * > + * Returns offset of the capability, or 0. > + */ > +static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type) Does inlining this...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...clude <linux/pci.h> > +#include <linux/uaccess.h> Are io.h and uaccess.h needed? > +#include <linux/vfio.h> > +#include <linux/virtio_pci.h> > +#include <linux/virtio_config.h> > + > +#include "vfio_pci_private.h" > + > +/** > + * virtio_pci_find_capability - walk capabilities to find device info. > + * @dev: the pci device > + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek > + * > + * Returns offset of the capability, or 0. > + */ > +static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type) Does inlining this...
2016 Apr 18
1
[PATCH RFC 3/3] vfio: add virtio pci quirk
...gt; > +#include <linux/uaccess.h> > +#include <linux/vfio.h> > +#include <linux/virtio_pci.h> > +#include <linux/virtio_config.h> I don't see where io or uaccess are needed here. > + > +#include "vfio_pci_private.h" > + > +/** > + * virtio_pci_find_capability - walk capabilities to find device info. > + * @dev: the pci device > + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek > + * > + * Returns offset of the capability, or 0. > + */ > +static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type) This is called from...
2016 Apr 18
1
[PATCH RFC 3/3] vfio: add virtio pci quirk
...gt; > +#include <linux/uaccess.h> > +#include <linux/vfio.h> > +#include <linux/virtio_pci.h> > +#include <linux/virtio_config.h> I don't see where io or uaccess are needed here. > + > +#include "vfio_pci_private.h" > + > +/** > + * virtio_pci_find_capability - walk capabilities to find device info. > + * @dev: the pci device > + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek > + * > + * Returns offset of the capability, or 0. > + */ > +static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type) This is called from...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...ded? > > > > > +#include <linux/vfio.h> > > > +#include <linux/virtio_pci.h> > > > +#include <linux/virtio_config.h> > > > + > > > +#include "vfio_pci_private.h" > > > + > > > +/** > > > + * virtio_pci_find_capability - walk capabilities to find device info. > > > + * @dev: the pci device > > > + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek > > > + * > > > + * Returns offset of the capability, or 0. > > > + */ > > > +static inline int virtio_pci_find_capab...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...ded? > > > > > +#include <linux/vfio.h> > > > +#include <linux/virtio_pci.h> > > > +#include <linux/virtio_config.h> > > > + > > > +#include "vfio_pci_private.h" > > > + > > > +/** > > > + * virtio_pci_find_capability - walk capabilities to find device info. > > > + * @dev: the pci device > > > + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek > > > + * > > > + * Returns offset of the capability, or 0. > > > + */ > > > +static inline int virtio_pci_find_capab...
2016 Apr 18
0
[PATCH RFC 3/3] vfio: add virtio pci quirk
...ualized to prevent user modification. + */ + +#include <linux/io.h> +#include <linux/pci.h> +#include <linux/uaccess.h> +#include <linux/vfio.h> +#include <linux/virtio_pci.h> +#include <linux/virtio_config.h> + +#include "vfio_pci_private.h" + +/** + * virtio_pci_find_capability - walk capabilities to find device info. + * @dev: the pci device + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek + * + * Returns offset of the capability, or 0. + */ +static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type) +{ + int pos; + + for (pos = pci_find_capability(d...
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...ualized to prevent user modification. + */ + +#include <linux/io.h> +#include <linux/pci.h> +#include <linux/uaccess.h> +#include <linux/vfio.h> +#include <linux/virtio_pci.h> +#include <linux/virtio_config.h> + +#include "vfio_pci_private.h" + +/** + * virtio_pci_find_capability - walk capabilities to find device info. + * @dev: the pci device + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek + * + * Returns offset of the capability, or 0. + */ +static inline int virtio_pci_find_capability(struct pci_dev *dev, u8 cfg_type) +{ + int pos; + + for (pos = pci_find_capability(d...
2016 Aug 30
6
[PATCH v2 0/2] vfio: blacklist legacy virtio devices
Legacy virtio devices always bypassed an IOMMU, so using them with vfio was never safe. This adds a quirk detecting these and disabling VFIO unless the noiommu mode is used. At the moment, this only applies to virtio-pci devices. The patch might make sense on stable as well. Michael S. Tsirkin (2): vfio: report group noiommu status vfio: add virtio pci quirk
2016 Aug 30
6
[PATCH v2 0/2] vfio: blacklist legacy virtio devices
Legacy virtio devices always bypassed an IOMMU, so using them with vfio was never safe. This adds a quirk detecting these and disabling VFIO unless the noiommu mode is used. At the moment, this only applies to virtio-pci devices. The patch might make sense on stable as well. Michael S. Tsirkin (2): vfio: report group noiommu status vfio: add virtio pci quirk
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...s.h> > > Are io.h and uaccess.h needed? > > > +#include <linux/vfio.h> > > +#include <linux/virtio_pci.h> > > +#include <linux/virtio_config.h> > > + > > +#include "vfio_pci_private.h" > > + > > +/** > > + * virtio_pci_find_capability - walk capabilities to find device info. > > + * @dev: the pci device > > + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek > > + * > > + * Returns offset of the capability, or 0. > > + */ > > +static inline int virtio_pci_find_capability(struct pci_dev *dev, u8...
2016 Apr 18
5
[PATCH RFC 0/3] virtio-pci: iommu support
This is an attempt to allow enabling IOMMU for DMA. Design: - new feature bit IOMMU_PLATFORM which means host won't bypass IOMMU - virtio core uses DMA API if it sees IOMMU_PLATFORM - add quirk for vfio to disable device unless IOMMU_PLATFORM is set or the no-iommu mode is enabled - while I'm not sure how it will be used, it seems like a good idea to also have
2016 Apr 18
5
[PATCH RFC 0/3] virtio-pci: iommu support
This is an attempt to allow enabling IOMMU for DMA. Design: - new feature bit IOMMU_PLATFORM which means host won't bypass IOMMU - virtio core uses DMA API if it sees IOMMU_PLATFORM - add quirk for vfio to disable device unless IOMMU_PLATFORM is set or the no-iommu mode is enabled - while I'm not sure how it will be used, it seems like a good idea to also have
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...include <linux/vfio.h> > > > > +#include <linux/virtio_pci.h> > > > > +#include <linux/virtio_config.h> > > > > + > > > > +#include "vfio_pci_private.h" > > > > + > > > > +/** > > > > + * virtio_pci_find_capability - walk capabilities to find device info. > > > > + * @dev: the pci device > > > > + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek > > > > + * > > > > + * Returns offset of the capability, or 0. > > > > + */ > > > > +static in...
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
..._status = vp_get_status, + .set_status = vp_set_status, + .reset = vp_reset, + .find_vqs = vp_modern_find_vqs, + .del_vqs = vp_del_vqs, + .get_features = vp_get_features, + .finalize_features = vp_finalize_features, + .bus_name = vp_bus_name, + .set_vq_affinity = vp_set_vq_affinity, +}; + +/** + * virtio_pci_find_capability - walk capabilities to find device info. + * @dev: the pci device + * @cfg_type: the VIRTIO_PCI_CAP_* value we seek + * @ioresource_types: IORESOURCE_MEM and/or IORESOURCE_IO. + * + * Returns offset of the capability, or 0. + */ +static inline int virtio_pci_find_capability(struct pci_dev *dev, u8...