search for: msix_enable

Displaying 20 results from an estimated 225 matches for "msix_enable".

Did you mean: msix_enabled
2017 Jan 27
0
[PATCH 3/9] virtio_pci: don't duplicate the msix_enable flag in struct pci_dev
...git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index 5880e86..9c4ad7d3f 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c @@ -125,7 +125,7 @@ void vp_del_vqs(struct virtio_device *vdev) vp_remove_vqs(vdev); - if (vp_dev->msix_enabled) { + if (vp_dev->pci_dev->msix_enabled) { for (i = 0; i < vp_dev->msix_vectors; i++) free_cpumask_var(vp_dev->msix_affinity_masks[i]); @@ -245,7 +245,6 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs, allocated_vectors++; } - vp_dev->msix...
2018 Dec 07
2
[PATCH 1/1] virtio: remove deprecated VIRTIO_PCI_CONFIG()
...drivers/virtio/virtio_pci_legacy.c @@ -52,7 +52,8 @@ static void vp_get(struct virtio_device *vdev, unsigned offset, { struct virtio_pci_device *vp_dev = to_vp_device(vdev); void __iomem *ioaddr = vp_dev->ioaddr + - VIRTIO_PCI_CONFIG(vp_dev) + offset; + VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) + + offset; u8 *ptr = buf; int i; @@ -67,7 +68,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset, { struct virtio_pci_device *vp_dev = to_vp_device(vdev); void __iomem *ioaddr = vp_dev->ioaddr + - VIRTIO_PCI_CONFIG(vp_dev) + offset; + VIRTIO_PCI_CONFIG_OFF(v...
2018 Dec 07
2
[PATCH 1/1] virtio: remove deprecated VIRTIO_PCI_CONFIG()
...drivers/virtio/virtio_pci_legacy.c @@ -52,7 +52,8 @@ static void vp_get(struct virtio_device *vdev, unsigned offset, { struct virtio_pci_device *vp_dev = to_vp_device(vdev); void __iomem *ioaddr = vp_dev->ioaddr + - VIRTIO_PCI_CONFIG(vp_dev) + offset; + VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) + + offset; u8 *ptr = buf; int i; @@ -67,7 +68,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset, { struct virtio_pci_device *vp_dev = to_vp_device(vdev); void __iomem *ioaddr = vp_dev->ioaddr + - VIRTIO_PCI_CONFIG(vp_dev) + offset; + VIRTIO_PCI_CONFIG_OFF(v...
2013 May 16
2
[PATCH] virtio_pci: fix macro exported in uapi
macro VIRTIO_PCI_CONFIG except in the unlikely event userspace actually has a structure with a field named msix_enabled. Get the msix_enabled by value instead, to make it useful for userspace. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/virtio/virtio_pci.c | 8 ++++---- include/uapi/linux/virtio_pci.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/vi...
2013 May 16
2
[PATCH] virtio_pci: fix macro exported in uapi
macro VIRTIO_PCI_CONFIG except in the unlikely event userspace actually has a structure with a field named msix_enabled. Get the msix_enabled by value instead, to make it useful for userspace. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/virtio/virtio_pci.c | 8 ++++---- include/uapi/linux/virtio_pci.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/vi...
2014 Sep 15
3
[PATCH] virtio_pci: properly clean up MSI-X state when initialization fails
From: Anthony Liguori <aliguori at amazon.com> If MSI-X initialization fails after setting msix_enabled = 1, then the device is left in an inconsistent state. This would normally only happen if there was a bug in the device emulation but it still should be handled correctly. Cc: Matt Wilson <msw at amazon.com> Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: Michael Tsirkin <mst at...
2014 Sep 15
3
[PATCH] virtio_pci: properly clean up MSI-X state when initialization fails
From: Anthony Liguori <aliguori at amazon.com> If MSI-X initialization fails after setting msix_enabled = 1, then the device is left in an inconsistent state. This would normally only happen if there was a bug in the device emulation but it still should be handled correctly. Cc: Matt Wilson <msw at amazon.com> Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: Michael Tsirkin <mst at...
2016 Nov 06
8
virtio_pci irq handling cleanups
Hi Michael, this series contains a couple cleanups for the virtio_pci interrupt handling code, including a switch to the new pci_irq_alloc_vectors helper. All these are in preparation of taking advantage of the new PCI layer / core IRQ interrupt affinity handling, for which I will send out a series once this and some core interrupt handling changes are in.
2016 Nov 06
8
virtio_pci irq handling cleanups
Hi Michael, this series contains a couple cleanups for the virtio_pci interrupt handling code, including a switch to the new pci_irq_alloc_vectors helper. All these are in preparation of taking advantage of the new PCI layer / core IRQ interrupt affinity handling, for which I will send out a series once this and some core interrupt handling changes are in.
2014 Aug 20
1
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...- a/arch/powerpc/kernel/eeh_driver.c > +++ b/arch/powerpc/kernel/eeh_driver.c > @@ -123,7 +123,7 @@ static void eeh_disable_irq(struct pci_dev *dev) > * effectively disabled by the DMA Stopped state > * when an EEH error occurs. > */ > - if (dev->msi_enabled || dev->msix_enabled) > + if (pci_dev_msi_enabled(dev, MSI_TYPE | MSIX_TYPE)) > return; > > if (!irq_has_action(dev->irq)) > diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index > 059a76c..4597940 100644 > --- a/arch/x86/pci/common.c > +++ b/arch/x86/pci/common.c > @@ -6...
2014 Aug 20
1
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...- a/arch/powerpc/kernel/eeh_driver.c > +++ b/arch/powerpc/kernel/eeh_driver.c > @@ -123,7 +123,7 @@ static void eeh_disable_irq(struct pci_dev *dev) > * effectively disabled by the DMA Stopped state > * when an EEH error occurs. > */ > - if (dev->msi_enabled || dev->msix_enabled) > + if (pci_dev_msi_enabled(dev, MSI_TYPE | MSIX_TYPE)) > return; > > if (!irq_has_action(dev->irq)) > diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index > 059a76c..4597940 100644 > --- a/arch/x86/pci/common.c > +++ b/arch/x86/pci/common.c > @@ -6...
2014 Sep 15
1
[PATCH] virtio_pci: properly clean up MSI-X state when initialization fails
Hi Michael, On Mon, Sep 15, 2014 at 1:32 AM, Michael S. Tsirkin <mst at redhat.com> wrote: > On Sun, Sep 14, 2014 at 08:23:26PM -0700, Anthony Liguori wrote: >> From: Anthony Liguori <aliguori at amazon.com> >> >> If MSI-X initialization fails after setting msix_enabled = 1, then >> the device is left in an inconsistent state. This would normally >> only happen if there was a bug in the device emulation but it still >> should be handled correctly. > > This might happen if host runs out of resources when trying > to map VQs to vectors,...
2014 Sep 15
1
[PATCH] virtio_pci: properly clean up MSI-X state when initialization fails
Hi Michael, On Mon, Sep 15, 2014 at 1:32 AM, Michael S. Tsirkin <mst at redhat.com> wrote: > On Sun, Sep 14, 2014 at 08:23:26PM -0700, Anthony Liguori wrote: >> From: Anthony Liguori <aliguori at amazon.com> >> >> If MSI-X initialization fails after setting msix_enabled = 1, then >> the device is left in an inconsistent state. This would normally >> only happen if there was a bug in the device emulation but it still >> should be handled correctly. > > This might happen if host runs out of resources when trying > to map VQs to vectors,...
2014 Jul 26
0
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...dex 420da61..e3f2074 100644 --- a/arch/powerpc/kernel/eeh_driver.c +++ b/arch/powerpc/kernel/eeh_driver.c @@ -123,7 +123,7 @@ static void eeh_disable_irq(struct pci_dev *dev) * effectively disabled by the DMA Stopped state * when an EEH error occurs. */ - if (dev->msi_enabled || dev->msix_enabled) + if (pci_dev_msi_enabled(dev, MSI_TYPE | MSIX_TYPE)) return; if (!irq_has_action(dev->irq)) diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 059a76c..4597940 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -662,14 +662,15 @@ int pcibios_enable_device(s...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...SI_CONFIG_VECTOR 20 +/* A 16-bit vector for selected queue notifications. */ +#define VIRTIO_MSI_QUEUE_VECTOR 22 + /* The remaining space is defined by each driver as the per-driver * configuration space */ -#define VIRTIO_PCI_CONFIG 20 +#define VIRTIO_PCI_CONFIG(dev) ((dev)->msix_enabled ? 24 : 20) /* Virtio ABI version, this must match exactly */ #define VIRTIO_PCI_ABI_VERSION 0 diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index f7b79a2..2b6333c 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -42,6 +42,28 @@ struct virt...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...SI_CONFIG_VECTOR 20 +/* A 16-bit vector for selected queue notifications. */ +#define VIRTIO_MSI_QUEUE_VECTOR 22 + /* The remaining space is defined by each driver as the per-driver * configuration space */ -#define VIRTIO_PCI_CONFIG 20 +#define VIRTIO_PCI_CONFIG(dev) ((dev)->msix_enabled ? 24 : 20) /* Virtio ABI version, this must match exactly */ #define VIRTIO_PCI_ABI_VERSION 0 diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index f7b79a2..2b6333c 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -42,6 +42,28 @@ struct virt...
2018 Dec 07
0
[PATCH 1/1] virtio: remove deprecated VIRTIO_PCI_CONFIG()
...cy.c > @@ -52,7 +52,8 @@ static void vp_get(struct virtio_device *vdev, unsigned offset, > { > struct virtio_pci_device *vp_dev = to_vp_device(vdev); > void __iomem *ioaddr = vp_dev->ioaddr + > - VIRTIO_PCI_CONFIG(vp_dev) + offset; > + VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) + > + offset; > u8 *ptr = buf; > int i; > > @@ -67,7 +68,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset, > { > struct virtio_pci_device *vp_dev = to_vp_device(vdev); > void __iomem *ioaddr = vp_dev->ioaddr + > - VIRTIO_PCI_CONFIG(...
2013 Jun 20
3
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...ff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index a7ce730..1aba255 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -289,9 +289,9 @@ static void vp_free_vectors(struct virtio_device *vdev) pci_disable_msix(vp_dev->pci_dev); vp_dev->msix_enabled = 0; - vp_dev->msix_vectors = 0; } + vp_dev->msix_vectors = 0; vp_dev->msix_used_vectors = 0; kfree(vp_dev->msix_names); vp_dev->msix_names = NULL; @@ -309,6 +309,8 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors, unsigned i, v; int err...
2014 Sep 01
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...har config_msix_name[256]; /* Number of available vectors */ unsigned msix_vectors; /* Vectors allocated, excluding per-vq vectors if any */ @@ -282,12 +283,6 @@ static void vp_free_vectors(struct virtio_device *vdev) free_cpumask_var(vp_dev->msix_affinity_masks[i]); if (vp_dev->msix_enabled) { - /* Disable the vector used for configuration */ - iowrite16(VIRTIO_MSI_NO_VECTOR, - vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); - /* Flush the write out to device */ - ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); - pci_disable_msix(vp_dev->pci_dev); vp_dev->m...
2013 Jun 20
3
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...ff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index a7ce730..1aba255 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -289,9 +289,9 @@ static void vp_free_vectors(struct virtio_device *vdev) pci_disable_msix(vp_dev->pci_dev); vp_dev->msix_enabled = 0; - vp_dev->msix_vectors = 0; } + vp_dev->msix_vectors = 0; vp_dev->msix_used_vectors = 0; kfree(vp_dev->msix_names); vp_dev->msix_names = NULL; @@ -309,6 +309,8 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors, unsigned i, v; int err...