search for: virtio_pci_modern_prob

Displaying 20 results from an estimated 53 matches for "virtio_pci_modern_prob".

2015 Jan 15
1
[PATCH] virtio_pci_modern: validate features
...vers/virtio/virtio_pci_modern.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 17f0228..a8fd267 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -570,6 +570,7 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev) int err, common, isr, notify, device; u32 notify_length; u32 notify_offset; + u64 features; check_offsets(); @@ -676,12 +677,19 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev) vp_dev->vdev.config = &virtio_pci_config_nodev_op...
2015 Jan 15
1
[PATCH] virtio_pci_modern: validate features
...vers/virtio/virtio_pci_modern.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 17f0228..a8fd267 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -570,6 +570,7 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev) int err, common, isr, notify, device; u32 notify_length; u32 notify_offset; + u64 features; check_offsets(); @@ -676,12 +677,19 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev) vp_dev->vdev.config = &virtio_pci_config_nodev_op...
2015 Jun 24
1
[PATCH] virtio-pci: alloc only resources actually used.
...if (type == cfg_type) { if (pci_resource_len(dev, bar) && - pci_resource_flags(dev, bar) & ioresource_types) + pci_resource_flags(dev, bar) & ioresource_types) { + *bars |= (1 << bar); return pos; + } } } return 0; @@ -617,7 +619,8 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev) /* check for a common config: if not, use legacy mode (bar 0). */ common = virtio_pci_find_capability(pci_dev, VIRTIO_PCI_CAP_COMMON_CFG, - IORESOURCE_IO | IORESOURCE_MEM); + IORESOURCE_IO | IORESOURCE_MEM, + &vp_dev->modern_ba...
2015 Jun 24
1
[PATCH] virtio-pci: alloc only resources actually used.
...if (type == cfg_type) { if (pci_resource_len(dev, bar) && - pci_resource_flags(dev, bar) & ioresource_types) + pci_resource_flags(dev, bar) & ioresource_types) { + *bars |= (1 << bar); return pos; + } } } return 0; @@ -617,7 +619,8 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev) /* check for a common config: if not, use legacy mode (bar 0). */ common = virtio_pci_find_capability(pci_dev, VIRTIO_PCI_CAP_COMMON_CFG, - IORESOURCE_IO | IORESOURCE_MEM); + IORESOURCE_IO | IORESOURCE_MEM, + &vp_dev->modern_ba...
2015 Jun 23
1
[PATCH] virtio-pci: alloc only resources actually used.
..., if (type == cfg_type) { if (pci_resource_len(dev, bar) && - pci_resource_flags(dev, bar) & ioresource_types) + pci_resource_flags(dev, bar) & ioresource_types) { + *bars = (1 << bar); return pos; + } } } return 0; @@ -617,7 +619,8 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev) /* check for a common config: if not, use legacy mode (bar 0). */ common = virtio_pci_find_capability(pci_dev, VIRTIO_PCI_CAP_COMMON_CFG, - IORESOURCE_IO | IORESOURCE_MEM); + IORESOURCE_IO | IORESOURCE_MEM, + &vp_dev->modern_ba...
2015 Jun 23
1
[PATCH] virtio-pci: alloc only resources actually used.
..., if (type == cfg_type) { if (pci_resource_len(dev, bar) && - pci_resource_flags(dev, bar) & ioresource_types) + pci_resource_flags(dev, bar) & ioresource_types) { + *bars = (1 << bar); return pos; + } } } return 0; @@ -617,7 +619,8 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev) /* check for a common config: if not, use legacy mode (bar 0). */ common = virtio_pci_find_capability(pci_dev, VIRTIO_PCI_CAP_COMMON_CFG, - IORESOURCE_IO | IORESOURCE_MEM); + IORESOURCE_IO | IORESOURCE_MEM, + &vp_dev->modern_ba...
2015 Jan 15
1
[PATCH] virtio_pci: add module param to force legacy mode
...+ "Force legacy mode for transitional virtio 1 devices"); +#endif + /* wait for pending irq handlers */ void vp_synchronize_vectors(struct virtio_device *vdev) { @@ -505,13 +513,24 @@ static int virtio_pci_probe(struct pci_dev *pci_dev, if (rc) goto err_request_regions; - rc = virtio_pci_modern_probe(vp_dev); - if (rc != -ENODEV) - return rc; + if (force_legacy) { + rc = virtio_pci_legacy_probe(vp_dev); + /* Also try modern mode if we can't map BAR0 (no IO space). */ + if (rc != -ENODEV && rc != -ENOMEM) + return rc; - rc = virtio_pci_legacy_probe(vp_dev); - if (rc) - goto...
2015 Jan 20
0
[PATCH 04/05] fixup! virtio_pci: add module param to force legacy mode
...virtio_pci_common.c @@ -516,18 +516,14 @@ static int virtio_pci_probe(struct pci_dev *pci_dev, if (force_legacy) { rc = virtio_pci_legacy_probe(vp_dev); /* Also try modern mode if we can't map BAR0 (no IO space). */ - if (rc != -ENODEV && rc != -ENOMEM) - return rc; - - rc = virtio_pci_modern_probe(vp_dev); + if (rc == -ENODEV || rc == -ENOMEM) + rc = virtio_pci_modern_probe(vp_dev); if (rc) goto err_probe; } else { rc = virtio_pci_modern_probe(vp_dev); - if (rc != -ENODEV) - return rc; - - rc = virtio_pci_legacy_probe(vp_dev); + if (rc == -ENODEV) + rc = virtio_pci_leg...
2015 Jan 15
1
[PATCH] virtio_pci: add module param to force legacy mode
...+ "Force legacy mode for transitional virtio 1 devices"); +#endif + /* wait for pending irq handlers */ void vp_synchronize_vectors(struct virtio_device *vdev) { @@ -505,13 +513,24 @@ static int virtio_pci_probe(struct pci_dev *pci_dev, if (rc) goto err_request_regions; - rc = virtio_pci_modern_probe(vp_dev); - if (rc != -ENODEV) - return rc; + if (force_legacy) { + rc = virtio_pci_legacy_probe(vp_dev); + /* Also try modern mode if we can't map BAR0 (no IO space). */ + if (rc != -ENODEV && rc != -ENOMEM) + return rc; - rc = virtio_pci_legacy_probe(vp_dev); - if (rc) - goto...
2015 Jan 20
0
[PATCH 04/05] fixup! virtio_pci: add module param to force legacy mode
...virtio_pci_common.c @@ -516,18 +516,14 @@ static int virtio_pci_probe(struct pci_dev *pci_dev, if (force_legacy) { rc = virtio_pci_legacy_probe(vp_dev); /* Also try modern mode if we can't map BAR0 (no IO space). */ - if (rc != -ENODEV && rc != -ENOMEM) - return rc; - - rc = virtio_pci_modern_probe(vp_dev); + if (rc == -ENODEV || rc == -ENOMEM) + rc = virtio_pci_modern_probe(vp_dev); if (rc) goto err_probe; } else { rc = virtio_pci_modern_probe(vp_dev); - if (rc != -ENODEV) - return rc; - - rc = virtio_pci_legacy_probe(vp_dev); + if (rc == -ENODEV) + rc = virtio_pci_leg...
2015 Jan 21
14
[PATCH pre-squash 00/14] virtio 1.0: virtio-pci fixup
This is just the full patchset reposted with fixups in correct order, before squashing them. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git virtio-next
2015 Jan 21
14
[PATCH pre-squash 00/14] virtio 1.0: virtio-pci fixup
This is just the full patchset reposted with fixups in correct order, before squashing them. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git virtio-next
2015 Jan 21
9
[PATCH post-squash 0/9] virtio 1.0: virtio-pci fixup
This is just repost of all patches with fixups squashed in - convenient if you just want to remove old ones from queue and apply new ones. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree:
2015 Jan 21
9
[PATCH post-squash 0/9] virtio 1.0: virtio-pci fixup
This is just repost of all patches with fixups squashed in - convenient if you just want to remove old ones from queue and apply new ones. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree:
2014 Dec 30
0
[PATCH RFC v2 6/7] virtio_pci: macros for PCI layout offsets.
...irtio_pci_common_cfg, queue_avail_hi)); + BUILD_BUG_ON(VIRTIO_PCI_COMMON_Q_USEDLO != + offsetof(struct virtio_pci_common_cfg, queue_used_lo)); + BUILD_BUG_ON(VIRTIO_PCI_COMMON_Q_USEDHI != + offsetof(struct virtio_pci_common_cfg, queue_used_hi)); +} + /* the PCI probing function */ 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...
2014 Dec 30
0
[PATCH RFC v2 6/7] virtio_pci: macros for PCI layout offsets.
...irtio_pci_common_cfg, queue_avail_hi)); + BUILD_BUG_ON(VIRTIO_PCI_COMMON_Q_USEDLO != + offsetof(struct virtio_pci_common_cfg, queue_used_lo)); + BUILD_BUG_ON(VIRTIO_PCI_COMMON_Q_USEDHI != + offsetof(struct virtio_pci_common_cfg, queue_used_hi)); +} + /* the PCI probing function */ 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...
2015 Feb 11
2
[RFC 0/2] virtio_pci: patches never to apply.
This should allow testing when QEMU gets VIRTIO_PCI_CAP_PCI_CFG support, but I'm pretty sure we should never allow these patches upstream. Tested with lguest (in virtio-next), which supports VIRTIO_PCI_CAP_PCI_CFG. Rusty Russell (2): virtio_pci: abstract all MMIO accesses. virtio: Introducing virtio_pci.no_mmio, the worst boot option in history. drivers/virtio/virtio_pci_common.c |
2015 Feb 11
2
[RFC 0/2] virtio_pci: patches never to apply.
This should allow testing when QEMU gets VIRTIO_PCI_CAP_PCI_CFG support, but I'm pretty sure we should never allow these patches upstream. Tested with lguest (in virtio-next), which supports VIRTIO_PCI_CAP_PCI_CFG. Rusty Russell (2): virtio_pci: abstract all MMIO accesses. virtio: Introducing virtio_pci.no_mmio, the worst boot option in history. drivers/virtio/virtio_pci_common.c |
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...so we can dispatch IRQs */ spinlock_t lock; struct list_head virtqueues; @@ -131,5 +151,8 @@ void virtio_pci_release_dev(struct device *); int virtio_pci_legacy_probe(struct pci_dev *pci_dev, const struct pci_device_id *id); void virtio_pci_legacy_remove(struct pci_dev *pci_dev); +int virtio_pci_modern_probe(struct pci_dev *pci_dev, + const struct pci_device_id *id); +void virtio_pci_modern_remove(struct pci_dev *pci_dev); #endif diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index 2ef9529..7bc69a4 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/dri...
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...so we can dispatch IRQs */ spinlock_t lock; struct list_head virtqueues; @@ -131,5 +151,8 @@ void virtio_pci_release_dev(struct device *); int virtio_pci_legacy_probe(struct pci_dev *pci_dev, const struct pci_device_id *id); void virtio_pci_legacy_remove(struct pci_dev *pci_dev); +int virtio_pci_modern_probe(struct pci_dev *pci_dev, + const struct pci_device_id *id); +void virtio_pci_modern_remove(struct pci_dev *pci_dev); #endif diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index 2ef9529..7bc69a4 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/dri...