search for: vp_synchronize_vector

Displaying 20 results from an estimated 54 matches for "vp_synchronize_vector".

Did you mean: vp_synchronize_vectors
2016 Apr 03
1
[PATCH] virtio: virtio 1.0 cs04 spec compliance for reset
...status to return 0 before reinitializing the device. + * This will flush out the status write, and flush in device writes, + * including MSI-X interrupts, if any. + */ + while (vp_ioread8(&vp_dev->common->device_status)) + msleep(1); /* Flush pending VQ/configuration callbacks. */ vp_synchronize_vectors(vdev); } -- MST
2016 Apr 03
1
[PATCH] virtio: virtio 1.0 cs04 spec compliance for reset
...status to return 0 before reinitializing the device. + * This will flush out the status write, and flush in device writes, + * including MSI-X interrupts, if any. + */ + while (vp_ioread8(&vp_dev->common->device_status)) + msleep(1); /* Flush pending VQ/configuration callbacks. */ vp_synchronize_vectors(vdev); } -- MST
2011 Nov 17
1
[PATCH] virtio-pci: make reset operation safer
...index d242fcc..cb1090e 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -321,11 +321,29 @@ static void vp_set_status(struct virtio_device *vdev, u8 status) iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS); } +/* wait for pending irq handlers */ +static void vp_synchronize_vectors(struct virtio_device *vdev) +{ + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + int i; + + if (vp_dev->intx_enabled) + synchronize_irq(vp_dev->pci_dev->irq); + + for (i = 0; i < vp_dev->msix_vectors; ++i) + synchronize_irq(vp_dev->msix_entries[i].vector); +} + static...
2011 Nov 17
1
[PATCH] virtio-pci: make reset operation safer
...index d242fcc..cb1090e 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -321,11 +321,29 @@ static void vp_set_status(struct virtio_device *vdev, u8 status) iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS); } +/* wait for pending irq handlers */ +static void vp_synchronize_vectors(struct virtio_device *vdev) +{ + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + int i; + + if (vp_dev->intx_enabled) + synchronize_irq(vp_dev->pci_dev->irq); + + for (i = 0; i < vp_dev->msix_vectors; ++i) + synchronize_irq(vp_dev->msix_entries[i].vector); +} + static...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
...P_MSIX_CONFIG_VECTOR = 0, + VP_MSIX_VQ_VECTOR = 1, +}; + +/* Convert a generic virtio device to our structure */ +static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) +{ + return container_of(vdev, struct virtio_pci_device, vdev); +} + +/* wait for pending irq handlers */ +void vp_synchronize_vectors(struct virtio_device *vdev); +/* the notify function used when creating a virt queue */ +bool vp_notify(struct virtqueue *vq); +/* the config->del_vqs() implementation */ +void vp_del_vqs(struct virtio_device *vdev); +/* the config->find_vqs() implementation */ +int vp_find_vqs(struct virtio...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
...P_MSIX_CONFIG_VECTOR = 0, + VP_MSIX_VQ_VECTOR = 1, +}; + +/* Convert a generic virtio device to our structure */ +static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) +{ + return container_of(vdev, struct virtio_pci_device, vdev); +} + +/* wait for pending irq handlers */ +void vp_synchronize_vectors(struct virtio_device *vdev); +/* the notify function used when creating a virt queue */ +bool vp_notify(struct virtqueue *vq); +/* the config->del_vqs() implementation */ +void vp_del_vqs(struct virtio_device *vdev); +/* the config->find_vqs() implementation */ +int vp_find_vqs(struct virtio...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
...P_MSIX_CONFIG_VECTOR = 0, + VP_MSIX_VQ_VECTOR = 1, +}; + +/* Convert a generic virtio device to our structure */ +static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) +{ + return container_of(vdev, struct virtio_pci_device, vdev); +} + +/* wait for pending irq handlers */ +void vp_synchronize_vectors(struct virtio_device *vdev); +/* the notify function used when creating a virt queue */ +bool vp_notify(struct virtqueue *vq); +/* the config->del_vqs() implementation */ +void vp_del_vqs(struct virtio_device *vdev); +/* the config->find_vqs() implementation */ +int vp_find_vqs(struct virtio...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
...P_MSIX_CONFIG_VECTOR = 0, + VP_MSIX_VQ_VECTOR = 1, +}; + +/* Convert a generic virtio device to our structure */ +static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) +{ + return container_of(vdev, struct virtio_pci_device, vdev); +} + +/* wait for pending irq handlers */ +void vp_synchronize_vectors(struct virtio_device *vdev); +/* the notify function used when creating a virt queue */ +bool vp_notify(struct virtqueue *vq); +/* the config->del_vqs() implementation */ +void vp_del_vqs(struct virtio_device *vdev); +/* the config->find_vqs() implementation */ +int vp_find_vqs(struct virtio...
2017 Feb 15
3
[PATCH net-next] virito-net: set queues after reset during xdp_set
...00000000000000 DR2: 0000000000000000 [ 74.336373] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 74.336895] Call Trace: [ 74.337086] skb_release_all+0xd/0x30 [ 74.337356] consume_skb+0x2c/0x90 [ 74.337607] free_unused_bufs+0x1ff/0x270 [virtio_net] [ 74.337988] ? vp_synchronize_vectors+0x3b/0x60 [virtio_pci] [ 74.338398] virtnet_xdp+0x21e/0x440 [virtio_net] [ 74.338741] dev_change_xdp_fd+0x101/0x140 [ 74.339048] do_setlink+0xcf4/0xd20 [ 74.339304] ? symcmp+0xf/0x20 [ 74.339529] ? mls_level_isvalid+0x52/0x60 [ 74.339828] ? mls_range_isvalid+0x43/0x50 [ 74.3401...
2017 Feb 15
3
[PATCH net-next] virito-net: set queues after reset during xdp_set
...00000000000000 DR2: 0000000000000000 [ 74.336373] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 74.336895] Call Trace: [ 74.337086] skb_release_all+0xd/0x30 [ 74.337356] consume_skb+0x2c/0x90 [ 74.337607] free_unused_bufs+0x1ff/0x270 [virtio_net] [ 74.337988] ? vp_synchronize_vectors+0x3b/0x60 [virtio_pci] [ 74.338398] virtnet_xdp+0x21e/0x440 [virtio_net] [ 74.338741] dev_change_xdp_fd+0x101/0x140 [ 74.339048] do_setlink+0xcf4/0xd20 [ 74.339304] ? symcmp+0xf/0x20 [ 74.339529] ? mls_level_isvalid+0x52/0x60 [ 74.339828] ? mls_range_isvalid+0x43/0x50 [ 74.3401...
2023 Apr 11
0
[PATCH] virtio_pci: Wait for legacy device to be reset
...interrupts, if any. */ > > > - vp_legacy_get_status(&vp_dev->ldev); > > > + while (vp_legacy_get_status(&vp_dev->ldev)) > > > + msleep(1); > > > /* Flush pending VQ/configuration callbacks. */ > > > vp_synchronize_vectors(vdev); > > > } > > > -- > > > 2.25.1 > > > >
2013 Jun 19
0
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...gt;msix_vectors = nvectors; > vp_dev->msix_enabled = 1; > > /* Set the vector used for configuration */ This introduces a bug. The assumption was that vp_free_vectors is only set if msix is successfully enabled, so it's not cleared by vp_free_vectors. So there are places like vp_synchronize_vectors that assume that msix_vectors is only set if msix works fine. If you change the assumption, and assign msix_vectors even if msix can later fail, need too clear it unconditionally. Like this (untested) Signed-off-by: Michael S. Tsirkin <mst at redhat.com> diff --git a/drivers/virtio/virti...
2014 Dec 08
0
[PATCH v2 10/10] virtio_pci: rename virtio_pci -> virtio_pci_common
...o drivers/virtio/virtio_pci_common.c index 5d6bc77..953057d 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci_common.c @@ -17,7 +17,7 @@ * */ -#include "virtio_pci_legacy.c" +#include "virtio_pci_common.h" /* wait for pending irq handlers */ void vp_synchronize_vectors(struct virtio_device *vdev) diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index 1ca4422..db00119 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c @@ -17,7 +17,7 @@ * */ -#include "virtio_pci.h" +#include...
2015 Jan 15
1
[PATCH] virtio_pci: add module param to force legacy mode
...tio_pci_common.h" +static bool force_legacy = false; + +#if IS_ENABLED(CONFIG_VIRTIO_PCI_LEGACY) +module_param(force_legacy, bool, 0444); +MODULE_PARM_DESC(force_legacy, + "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 tr...
2014 Dec 08
0
[PATCH v2 10/10] virtio_pci: rename virtio_pci -> virtio_pci_common
...o drivers/virtio/virtio_pci_common.c index 5d6bc77..953057d 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci_common.c @@ -17,7 +17,7 @@ * */ -#include "virtio_pci_legacy.c" +#include "virtio_pci_common.h" /* wait for pending irq handlers */ void vp_synchronize_vectors(struct virtio_device *vdev) diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index 1ca4422..db00119 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c @@ -17,7 +17,7 @@ * */ -#include "virtio_pci.h" +#include...
2015 Jan 15
1
[PATCH] virtio_pci: add module param to force legacy mode
...tio_pci_common.h" +static bool force_legacy = false; + +#if IS_ENABLED(CONFIG_VIRTIO_PCI_LEGACY) +module_param(force_legacy, bool, 0444); +MODULE_PARM_DESC(force_legacy, + "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 tr...
2014 Dec 08
11
[PATCH 0/9] virtio_pci: split out legacy device support
virtio 1.0 support for virtio-pci isn't ready yet. Therefore, this patchset doesn't make any functional changes. Instead, this simply refactors virtio-pci, splitting legacy device support code out to a separate file: virtio_pci_legacy.c For virtio 1.0, all that's left is to add virtio_pci_modern.c supporting get_features finalize_features get (config) set (config) get_status
2014 Dec 08
11
[PATCH 0/9] virtio_pci: split out legacy device support
virtio 1.0 support for virtio-pci isn't ready yet. Therefore, this patchset doesn't make any functional changes. Instead, this simply refactors virtio-pci, splitting legacy device support code out to a separate file: virtio_pci_legacy.c For virtio 1.0, all that's left is to add virtio_pci_modern.c supporting get_features finalize_features get (config) set (config) get_status
2017 Feb 17
0
[PATCH net-next] virito-net: set queues after reset during xdp_set
...000000 > [ 74.336373] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > [ 74.336895] Call Trace: > [ 74.337086] skb_release_all+0xd/0x30 > [ 74.337356] consume_skb+0x2c/0x90 > [ 74.337607] free_unused_bufs+0x1ff/0x270 [virtio_net] > [ 74.337988] ? vp_synchronize_vectors+0x3b/0x60 [virtio_pci] > [ 74.338398] virtnet_xdp+0x21e/0x440 [virtio_net] > [ 74.338741] dev_change_xdp_fd+0x101/0x140 > [ 74.339048] do_setlink+0xcf4/0xd20 > [ 74.339304] ? symcmp+0xf/0x20 > [ 74.339529] ? mls_level_isvalid+0x52/0x60 > [ 74.339828] ? mls_range...
2013 Jun 19
2
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
vp_dev->msix_vectors should be initialized before allocating msix_affinity_masks, otherwise vp_free_vectors will not free these objects. unreferenced object 0xffff88010f969d88 (size 512): comm "systemd-udevd", pid 158, jiffies 4294673645 (age 80.545s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00