search for: virtio_mmio_int_config

Displaying 20 results from an estimated 36 matches for "virtio_mmio_int_config".

2014 Sep 22
1
[PATCH] virtio: unify config_changed handling
...long status; unsigned long flags; irqreturn_t ret = IRQ_NONE; @@ -244,9 +242,8 @@ static irqreturn_t vm_interrupt(int irq, void *opaque) status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); - if (unlikely(status & VIRTIO_MMIO_INT_CONFIG) - && vdrv && vdrv->config_changed) { - vdrv->config_changed(&vm_dev->vdev); + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { + virtio_config_changed(&vm_dev->vdev); ret = IRQ_HANDLED; } diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/v...
2014 Sep 22
1
[PATCH] virtio: unify config_changed handling
...long status; unsigned long flags; irqreturn_t ret = IRQ_NONE; @@ -244,9 +242,8 @@ static irqreturn_t vm_interrupt(int irq, void *opaque) status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); - if (unlikely(status & VIRTIO_MMIO_INT_CONFIG) - && vdrv && vdrv->config_changed) { - vdrv->config_changed(&vm_dev->vdev); + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { + virtio_config_changed(&vm_dev->vdev); ret = IRQ_HANDLED; } diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/v...
2014 Oct 25
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...+ struct virtio_mmio_device *vm_dev = opaque; + struct virtio_mmio_vq_info *info; + unsigned long status; + unsigned long flags; + irqreturn_t ret = IRQ_NONE; + /* Read the interrupt reason and reset it */ + status = *vm_dev->isr_mem; + *vm_dev->isr_mem = 0x0; + + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { + virtio_config_changed(&vm_dev->vdev); + ret = IRQ_HANDLED; + } + + spin_lock_irqsave(&vm_dev->lock, flags); + list_for_each_entry(info, &vm_dev->virtqueues, node) + ret |= vring_interrupt(irq, info->vq); + spin_unlock_irqrestore(&vm_dev->lock, flags); + + ret...
2014 Oct 25
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...+ struct virtio_mmio_device *vm_dev = opaque; + struct virtio_mmio_vq_info *info; + unsigned long status; + unsigned long flags; + irqreturn_t ret = IRQ_NONE; + /* Read the interrupt reason and reset it */ + status = *vm_dev->isr_mem; + *vm_dev->isr_mem = 0x0; + + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { + virtio_config_changed(&vm_dev->vdev); + ret = IRQ_HANDLED; + } + + spin_lock_irqsave(&vm_dev->lock, flags); + list_for_each_entry(info, &vm_dev->virtqueues, node) + ret |= vring_interrupt(irq, info->vq); + spin_unlock_irqrestore(&vm_dev->lock, flags); + + ret...
2014 Oct 05
0
[PATCH 02/16] virtio: unify config_changed handling
...long status; unsigned long flags; irqreturn_t ret = IRQ_NONE; @@ -244,9 +242,8 @@ static irqreturn_t vm_interrupt(int irq, void *opaque) status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); - if (unlikely(status & VIRTIO_MMIO_INT_CONFIG) - && vdrv && vdrv->config_changed) { - vdrv->config_changed(&vm_dev->vdev); + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { + virtio_config_changed(&vm_dev->vdev); ret = IRQ_HANDLED; } diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/v...
2014 Oct 06
0
[PATCH v2 02/15] virtio: unify config_changed handling
...long status; unsigned long flags; irqreturn_t ret = IRQ_NONE; @@ -244,9 +242,8 @@ static irqreturn_t vm_interrupt(int irq, void *opaque) status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); - if (unlikely(status & VIRTIO_MMIO_INT_CONFIG) - && vdrv && vdrv->config_changed) { - vdrv->config_changed(&vm_dev->vdev); + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { + virtio_config_changed(&vm_dev->vdev); ret = IRQ_HANDLED; } diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/v...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...atus; >> irqreturn_t ret = IRQ_NONE; >> >> /* Read and acknowledge interrupts */ >> status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); >> writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); >> >> - if (unlikely(status & VIRTIO_MMIO_INT_CONFIG) >> - && vdrv && vdrv->config_changed) { >> - vdrv->config_changed(&vm_dev->vdev); >> - ret = IRQ_HANDLED; >> - } >> + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) >> + return vm_config_changed(irq, opaque); >> >...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...atus; >> irqreturn_t ret = IRQ_NONE; >> >> /* Read and acknowledge interrupts */ >> status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); >> writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); >> >> - if (unlikely(status & VIRTIO_MMIO_INT_CONFIG) >> - && vdrv && vdrv->config_changed) { >> - vdrv->config_changed(&vm_dev->vdev); >> - ret = IRQ_HANDLED; >> - } >> + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) >> + return vm_config_changed(irq, opaque); >> >...
2014 Oct 27
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...eset it */ >> + status = *vm_dev->isr_mem; >> + *vm_dev->isr_mem = 0x0; > > you are reading and modifying shared memory > without atomics and any memory barriers. > Why is this safe? > good catch, a stupid mistake. >> + >> + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { >> + virtio_config_changed(&vm_dev->vdev); >> + ret = IRQ_HANDLED; >> + } >> + >> + spin_lock_irqsave(&vm_dev->lock, flags); >> + list_for_each_entry(info, &vm_dev->virtqueues, node) >> + ret |= vring_interrupt(irq, info->vq);...
2014 Oct 27
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...eset it */ >> + status = *vm_dev->isr_mem; >> + *vm_dev->isr_mem = 0x0; > > you are reading and modifying shared memory > without atomics and any memory barriers. > Why is this safe? > good catch, a stupid mistake. >> + >> + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { >> + virtio_config_changed(&vm_dev->vdev); >> + ret = IRQ_HANDLED; >> + } >> + >> + spin_lock_irqsave(&vm_dev->lock, flags); >> + list_for_each_entry(info, &vm_dev->virtqueues, node) >> + ret |= vring_interrupt(irq, info->vq);...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...que; > + unsigned long status; > irqreturn_t ret = IRQ_NONE; > > /* Read and acknowledge interrupts */ > status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); > writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); > > - if (unlikely(status & VIRTIO_MMIO_INT_CONFIG) > - && vdrv && vdrv->config_changed) { > - vdrv->config_changed(&vm_dev->vdev); > - ret = IRQ_HANDLED; > - } > + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) > + return vm_config_changed(irq, opaque); > > - if (likely(status & V...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...et = IRQ_NONE; > >> > >> /* Read and acknowledge interrupts */ > >> status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); > >> writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); > >> > >> - if (unlikely(status & VIRTIO_MMIO_INT_CONFIG) > >> - && vdrv && vdrv->config_changed) { > >> - vdrv->config_changed(&vm_dev->vdev); > >> - ret = IRQ_HANDLED; > >> - } > >> + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) > >> + return vm_config_changed...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...struct virtio_mmio_device *vm_dev = opaque; + unsigned long status; irqreturn_t ret = IRQ_NONE; /* Read and acknowledge interrupts */ status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); - if (unlikely(status & VIRTIO_MMIO_INT_CONFIG) - && vdrv && vdrv->config_changed) { - vdrv->config_changed(&vm_dev->vdev); - ret = IRQ_HANDLED; - } + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) + return vm_config_changed(irq, opaque); - if (likely(status & VIRTIO_MMIO_INT_VRING)) { - spin_lock_ir...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...struct virtio_mmio_device *vm_dev = opaque; + unsigned long status; irqreturn_t ret = IRQ_NONE; /* Read and acknowledge interrupts */ status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); - if (unlikely(status & VIRTIO_MMIO_INT_CONFIG) - && vdrv && vdrv->config_changed) { - vdrv->config_changed(&vm_dev->vdev); - ret = IRQ_HANDLED; - } + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) + return vm_config_changed(irq, opaque); - if (likely(status & VIRTIO_MMIO_INT_VRING)) { - spin_lock_ir...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...irqreturn_t vm_interrupt(int irq, void *opaque) > > /* Read and acknowledge interrupts */ > status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); > - writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); > > if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { > + writel(status & VIRTIO_MMIO_INT_CONFIG, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); > virtio_config_changed(&vm_dev->vdev); > ret = IRQ_HANDLED; > } > > if (likely(status & VIRTIO_MMIO_INT_VRING...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...irqreturn_t vm_interrupt(int irq, void *opaque) > > /* Read and acknowledge interrupts */ > status = readl(vm_dev->base + VIRTIO_MMIO_INTERRUPT_STATUS); > - writel(status, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); > > if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { > + writel(status & VIRTIO_MMIO_INT_CONFIG, vm_dev->base + VIRTIO_MMIO_INTERRUPT_ACK); > virtio_config_changed(&vm_dev->vdev); > ret = IRQ_HANDLED; > } > > if (likely(status & VIRTIO_MMIO_INT_VRING...
2014 Oct 26
0
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...return_t ret = IRQ_NONE; > > + /* Read the interrupt reason and reset it */ > + status = *vm_dev->isr_mem; > + *vm_dev->isr_mem = 0x0; you are reading and modifying shared memory without atomics and any memory barriers. Why is this safe? > + > + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { > + virtio_config_changed(&vm_dev->vdev); > + ret = IRQ_HANDLED; > + } > + > + spin_lock_irqsave(&vm_dev->lock, flags); > + list_for_each_entry(info, &vm_dev->virtqueues, node) > + ret |= vring_interrupt(irq, info->vq); > + spin_unlock_irqresto...
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote: > No, that's it I think. Please send a diff for the documentation, since > I'm updating the LyX master and I've already applied your previous > version. Here it goes (below). Also do you think you would be able to merge the driver (corresponding v4 patch follows) in the 3.2 merge window that seems to have just opened?
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote: > No, that's it I think. Please send a diff for the documentation, since > I'm updating the LyX master and I've already applied your previous > version. Here it goes (below). Also do you think you would be able to merge the driver (corresponding v4 patch follows) in the 3.2 merge window that seems to have just opened?
2014 Oct 27
0
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...; >> + *vm_dev->isr_mem = 0x0; > > > > you are reading and modifying shared memory > > without atomics and any memory barriers. > > Why is this safe? > > > > good catch, a stupid mistake. > > >> + > >> + if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) { > >> + virtio_config_changed(&vm_dev->vdev); > >> + ret = IRQ_HANDLED; > >> + } > >> + > >> + spin_lock_irqsave(&vm_dev->lock, flags); > >> + list_for_each_entry(info, &vm_dev->virtqueues, node) > >> + ret |=...