Displaying 20 results from an estimated 70 matches for "0x107f".
Did you mean:
0x103f
2023 May 03
1
[PATCH v5 virtio 01/11] virtio: allow caller to override device id in vp_modern
...n_dev.c
+++ b/drivers/virtio/virtio_pci_modern_dev.c
@@ -218,21 +218,29 @@ int vp_modern_probe(struct virtio_pci_modern_device *mdev)
int err, common, isr, notify, device;
u32 notify_length;
u32 notify_offset;
+ int devid;
check_offsets();
- /* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
- if (pci_dev->device < 0x1000 || pci_dev->device > 0x107f)
- return -ENODEV;
-
- if (pci_dev->device < 0x1040) {
- /* Transitional devices: use the PCI subsystem device id as
- * virtio device id, same as legacy driver always did.
- */
- mdev->id.dev...
2023 Mar 23
0
[PATCH v3 virtio 1/8] virtio: allow caller to override device id and DMA mask
...b9ae8fa 100644
> --- a/drivers/virtio/virtio_pci_modern_dev.c
> +++ b/drivers/virtio/virtio_pci_modern_dev.c
> @@ -221,18 +221,25 @@ int vp_modern_probe(struct virtio_pci_modern_device *mdev)
>
> check_offsets();
>
> - /* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
> - if (pci_dev->device < 0x1000 || pci_dev->device > 0x107f)
> - return -ENODEV;
> -
> - if (pci_dev->device < 0x1040) {
> - /* Transitional devices: use the PCI subsystem device id as
> -...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...io here otherwise and we could remove more #includes.
> + int common, cfg;
> + u32 features;
> + u32 offset;
> + u8 bar;
> +
> + /* Without an IOMMU, we don't care */
> + if (noiommu)
> + return 0;
> +
> + /* Virtio only owns devices >= 0x1000 and <= 0x107f: leave the rest. */
> + if (dev->device < 0x1000 || dev->device > 0x107f)
> + return 0;
Whitespace
> +
> + /* Check whether device enforces the IOMMU correctly */
> +
> + /*
> + * All modern devices must have common and cfg capabilities. We...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...io here otherwise and we could remove more #includes.
> + int common, cfg;
> + u32 features;
> + u32 offset;
> + u8 bar;
> +
> + /* Without an IOMMU, we don't care */
> + if (noiommu)
> + return 0;
> +
> + /* Virtio only owns devices >= 0x1000 and <= 0x107f: leave the rest. */
> + if (dev->device < 0x1000 || dev->device > 0x107f)
> + return 0;
Whitespace
> +
> + /* Check whether device enforces the IOMMU correctly */
> +
> + /*
> + * All modern devices must have common and cfg capabilities. We...
2014 Dec 30
0
[PATCH RFC v2 6/7] virtio_pci: macros for PCI layout offsets.
...*/
int virtio_pci_modern_probe(struct pci_dev *pci_dev,
const struct pci_device_id *id)
@@ -479,6 +540,8 @@ int virtio_pci_modern_probe(struct pci_dev *pci_dev,
struct virtio_device_id virtio_id;
u32 notify_length;
+ check_offsets();
+
/* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
if (pci_dev->device < 0x1000 || pci_dev->device > 0x107f)
return -ENODEV;
--
MST
2014 Dec 30
0
[PATCH RFC v2 6/7] virtio_pci: macros for PCI layout offsets.
...*/
int virtio_pci_modern_probe(struct pci_dev *pci_dev,
const struct pci_device_id *id)
@@ -479,6 +540,8 @@ int virtio_pci_modern_probe(struct pci_dev *pci_dev,
struct virtio_device_id virtio_id;
u32 notify_length;
+ check_offsets();
+
/* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
if (pci_dev->device < 0x1000 || pci_dev->device > 0x107f)
return -ENODEV;
--
MST
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...gt; + u32 features;
> > > + u32 offset;
> > > + u8 bar;
> > > +
> > > + /* Without an IOMMU, we don't care */
> > > + if (noiommu)
> > > + return 0;
> > > +
> > > + /* Virtio only owns devices >= 0x1000 and <= 0x107f: leave the rest. */
> > > + if (dev->device < 0x1000 || dev->device > 0x107f)
> > > + return 0;
> >
> > Whitespace
> >
> > > +
> > > + /* Check whether device enforces the IOMMU correctly */
> > &g...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...gt; + u32 features;
> > > + u32 offset;
> > > + u8 bar;
> > > +
> > > + /* Without an IOMMU, we don't care */
> > > + if (noiommu)
> > > + return 0;
> > > +
> > > + /* Virtio only owns devices >= 0x1000 and <= 0x107f: leave the rest. */
> > > + if (dev->device < 0x1000 || dev->device > 0x107f)
> > > + return 0;
> >
> > Whitespace
> >
> > > +
> > > + /* Check whether device enforces the IOMMU correctly */
> > &g...
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...o_pci_virtio_quirk(struct vfio_pci_device *vdev, bool noiommu)
+{
+ struct pci_dev *dev = vdev->pdev;
+ int common, cfg;
+ u32 features;
+ u32 offset;
+ u8 bar;
+
+ /* Without an IOMMU, we don't care */
+ if (noiommu)
+ return 0;
+
+ /* Virtio only owns devices >= 0x1000 and <= 0x107f: leave the rest. */
+ if (dev->device < 0x1000 || dev->device > 0x107f)
+ return 0;
+
+ /* Check whether device enforces the IOMMU correctly */
+
+ /*
+ * All modern devices must have common and cfg capabilities. We use cfg
+ * capability for access so that we do...
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
...gt;
> > + int common, cfg;
> > + u32 features;
> > + u32 offset;
> > + u8 bar;
> > +
> > + /* Without an IOMMU, we don't care */
> > + if (noiommu)
> > + return 0;
> > +
> > + /* Virtio only owns devices >= 0x1000 and <= 0x107f: leave the rest. */
> > + if (dev->device < 0x1000 || dev->device > 0x107f)
> > + return 0;
>
> Whitespace
>
> > +
> > + /* Check whether device enforces the IOMMU correctly */
> > +
> > + /*
> > + * All moder...
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...+ u32 offset;
> > > > + u8 bar;
> > > > +
> > > > + /* Without an IOMMU, we don't care */
> > > > + if (noiommu)
> > > > + return 0;
> > > > +
> > > > + /* Virtio only owns devices >= 0x1000 and <= 0x107f: leave the rest. */
> > > > + if (dev->device < 0x1000 || dev->device > 0x107f)
> > > > + return 0;
> > >
> > > Whitespace
> > >
> > > > +
> > > > + /* Check whether device enforces...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...ruct device *dev = &pdev->dev;
>> + struct vp_vdpa *vp_vdpa;
>> + int common, notify, device, ret, i;
>> + struct virtio_device_id virtio_id;
>> + resource_size_t notify_pa;
>> + u16 notify_off;
>> +
>> + /* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
>> + if (pdev->device < 0x1000 || pdev->device > 0x107f)
>> + return -ENODEV;
>> +
>> + if (pdev->device < 0x1040) {
>> + /* Transitional devices: use the PCI subsystem device id as
>> + * virtio device id, same as legacy...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...ruct device *dev = &pdev->dev;
>> + struct vp_vdpa *vp_vdpa;
>> + int common, notify, device, ret, i;
>> + struct virtio_device_id virtio_id;
>> + resource_size_t notify_pa;
>> + u16 notify_off;
>> +
>> + /* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
>> + if (pdev->device < 0x1000 || pdev->device > 0x107f)
>> + return -ENODEV;
>> +
>> + if (pdev->device < 0x1040) {
>> + /* Transitional devices: use the PCI subsystem device id as
>> + * virtio device id, same as legacy...
2014 Dec 11
6
[PATCH RFC 0/5] virtio_pci: modern driver
Based on Rusty's patches.
Coding style and funny jokes are his.
Bugs and a star wars reference (should be easy to spot) are mine.
Untested, but useful as basis for beginning the qemu work.
TODO:
= simplify probing: use a common probe function, probe with modern driver
first, if that fails - probe with legacy driver.
BUGS: ATM legacy driver can win and drive a transitional device
2014 Dec 11
6
[PATCH RFC 0/5] virtio_pci: modern driver
Based on Rusty's patches.
Coding style and funny jokes are his.
Bugs and a star wars reference (should be easy to spot) are mine.
Untested, but useful as basis for beginning the qemu work.
TODO:
= simplify probing: use a common probe function, probe with modern driver
first, if that fails - probe with legacy driver.
BUGS: ATM legacy driver can win and drive a transitional device
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...e(struct pci_dev *pdev, const struct pci_device_id *id)
+{
+ struct device *dev = &pdev->dev;
+ struct vp_vdpa *vp_vdpa;
+ int common, notify, device, ret, i;
+ struct virtio_device_id virtio_id;
+ resource_size_t notify_pa;
+ u16 notify_off;
+
+ /* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
+ if (pdev->device < 0x1000 || pdev->device > 0x107f)
+ return -ENODEV;
+
+ if (pdev->device < 0x1040) {
+ /* Transitional devices: use the PCI subsystem device id as
+ * virtio device id, same as legacy driver always did.
+ */
+ virtio_id.device = pdev-...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...e(struct pci_dev *pdev, const struct pci_device_id *id)
+{
+ struct device *dev = &pdev->dev;
+ struct vp_vdpa *vp_vdpa;
+ int common, notify, device, ret, i;
+ struct virtio_device_id virtio_id;
+ resource_size_t notify_pa;
+ u16 notify_off;
+
+ /* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
+ if (pdev->device < 0x1000 || pdev->device > 0x107f)
+ return -ENODEV;
+
+ if (pdev->device < 0x1040) {
+ /* Transitional devices: use the PCI subsystem device id as
+ * virtio device id, same as legacy driver always did.
+ */
+ virtio_id.device = pdev-...
2020 Jun 10
2
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...e(struct pci_dev *pdev, const struct pci_device_id *id)
+{
+ struct device *dev = &pdev->dev;
+ struct vp_vdpa *vp_vdpa;
+ int common, notify, device, ret, i;
+ struct virtio_device_id virtio_id;
+ resource_size_t notify_pa;
+ u16 notify_off;
+
+ /* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
+ if (pdev->device < 0x1000 || pdev->device > 0x107f)
+ return -ENODEV;
+
+ if (pdev->device < 0x1040) {
+ /* Transitional devices: use the PCI subsystem device id as
+ * virtio device id, same as legacy driver always did.
+ */
+ virtio_id.device = pdev-...