search for: memory_region_add_eventfd

Displaying 20 results from an estimated 23 matches for "memory_region_add_eventfd".

2015 Mar 11
4
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...int n, bool assign, bool set_handler) > > { > > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy, > > } > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler); > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2, > > - true, n, notifier); > > + true, cpu_to_host_notifier16(vdev, n), > > + notifier); > > } else { > > mem...
2015 Mar 11
4
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...int n, bool assign, bool set_handler) > > { > > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy, > > } > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler); > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2, > > - true, n, notifier); > > + true, cpu_to_host_notifier16(vdev, n), > > + notifier); > > } else { > > mem...
2015 Nov 20
2
[PATCH -qemu] nvme: support Google vendor extension
..._eventfd(NvmeCQueue *cq) > +{ > + NvmeCtrl *n = cq->ctrl; > + uint16_t offset = (cq->cqid*2+1) * NVME_CAP_DSTRD(n->bar.cap); > + > + event_notifier_init(&cq->notifier, 0); > + event_notifier_set_handler(&cq->notifier, nvme_cq_notifier); > + memory_region_add_eventfd(&n->iomem, > + 0x1000 + offset, 4, true, cq->cqid*2+1, &cq->notifier); should be 0x1000 + offset, 4, false, 0, &cq->notifier > +} > + > +static void nvme_sq_notifier(EventNotifier *e) > +{ > + NvmeSQueue *sq = > + container_of(e, NvmeS...
2015 Nov 20
2
[PATCH -qemu] nvme: support Google vendor extension
..._eventfd(NvmeCQueue *cq) > +{ > + NvmeCtrl *n = cq->ctrl; > + uint16_t offset = (cq->cqid*2+1) * NVME_CAP_DSTRD(n->bar.cap); > + > + event_notifier_init(&cq->notifier, 0); > + event_notifier_set_handler(&cq->notifier, nvme_cq_notifier); > + memory_region_add_eventfd(&n->iomem, > + 0x1000 + offset, 4, true, cq->cqid*2+1, &cq->notifier); should be 0x1000 + offset, 4, false, 0, &cq->notifier > +} > + > +static void nvme_sq_notifier(EventNotifier *e) > +{ > + NvmeSQueue *sq = > + container_of(e, NvmeS...
2015 Nov 20
0
[PATCH -qemu] nvme: support Google vendor extension
...+{ > > + NvmeCtrl *n = cq->ctrl; > > + uint16_t offset = (cq->cqid*2+1) * NVME_CAP_DSTRD(n->bar.cap); > > + > > + event_notifier_init(&cq->notifier, 0); > > + event_notifier_set_handler(&cq->notifier, nvme_cq_notifier); > > + memory_region_add_eventfd(&n->iomem, > > + 0x1000 + offset, 4, true, cq->cqid*2+1, &cq->notifier); > > should be 0x1000 + offset, 4, false, 0, &cq->notifier > > > +} > > + > > +static void nvme_sq_notifier(EventNotifier *e) > > +{ > > + NvmeSQu...
2015 Nov 19
2
[PATCH -qemu] nvme: support Google vendor extension
On 18/11/2015 06:47, Ming Lin wrote: > @@ -726,7 +798,11 @@ static void nvme_process_db(NvmeCtrl *n, hwaddr addr, int val) > } > > start_sqs = nvme_cq_full(cq) ? 1 : 0; > - cq->head = new_head; > + /* When the mapped pointer memory area is setup, we don't rely on > + * the MMIO written values to update the head pointer. */ >
2015 Nov 19
2
[PATCH -qemu] nvme: support Google vendor extension
On 18/11/2015 06:47, Ming Lin wrote: > @@ -726,7 +798,11 @@ static void nvme_process_db(NvmeCtrl *n, hwaddr addr, int val) > } > > start_sqs = nvme_cq_full(cq) ? 1 : 0; > - cq->head = new_head; > + /* When the mapped pointer memory area is setup, we don't rely on > + * the MMIO written values to update the head pointer. */ >
2015 Mar 12
1
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
On 12/03/2015 08:08, Michael S. Tsirkin wrote: > But common header format is simple, it's always LE. > It does not depend on target. > To me this looks like a bug in memory_region_add_eventfd, > it should do the right thing depending on device > endian-ness. I agree it seems to be a QEMU bug. Paolo
2015 Mar 12
1
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
On 12/03/2015 08:08, Michael S. Tsirkin wrote: > But common header format is simple, it's always LE. > It does not depend on target. > To me this looks like a bug in memory_region_add_eventfd, > it should do the right thing depending on device > endian-ness. I agree it seems to be a QEMU bug. Paolo
2015 Mar 11
1
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
..., bool assign, bool set_handler) > > > { > > > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy, > > > } > > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler); > > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2, > > > - true, n, notifier); > > > + true, cpu_to_host_notifier16(vdev, n), > > > + notifier); > > > } else { &g...
2015 Mar 11
1
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
..., bool assign, bool set_handler) > > > { > > > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy, > > > } > > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler); > > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2, > > > - true, n, notifier); > > > + true, cpu_to_host_notifier16(vdev, n), > > > + notifier); > > > } else { &g...
2015 Nov 20
0
[PATCH -qemu] nvme: support Google vendor extension
...cq); +} + +static void nvme_init_cq_eventfd(NvmeCQueue *cq) +{ + NvmeCtrl *n = cq->ctrl; + uint16_t offset = (cq->cqid*2+1) * NVME_CAP_DSTRD(n->bar.cap); + + event_notifier_init(&cq->notifier, 0); + event_notifier_set_handler(&cq->notifier, nvme_cq_notifier); + memory_region_add_eventfd(&n->iomem, + 0x1000 + offset, 4, true, cq->cqid*2+1, &cq->notifier); +} + +static void nvme_sq_notifier(EventNotifier *e) +{ + NvmeSQueue *sq = + container_of(e, NvmeSQueue, notifier); + + nvme_process_sq(sq); +} + +static void nvme_init_sq_eventfd(NvmeSQueue *s...
2015 Mar 12
0
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...non-critical locations allows to support odd beasts like ppc64le > and arm64be without trashing more common paths. Maybe I can add a > comment for better clarity (see below). But common header format is simple, it's always LE. It does not depend on target. To me this looks like a bug in memory_region_add_eventfd, it should do the right thing depending on device endian-ness. > > > --- > > > > > > I guess it is also a fix for virtio-1 but I didn't check. > > > > > > hw/virtio/virtio-pci.c | 11 +++++++++-- > > > 1 file changed, 9 insertions(+)...
2015 Mar 11
2
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...tIOPCIProxy *proxy, int n, bool assign, bool set_handler) { @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy, } virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler); memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2, - true, n, notifier); + true, cpu_to_host_notifier16(vdev, n), + notifier); } else { memory_region_del_eventfd(&proxy->bar, VIRTIO_...
2015 Mar 12
0
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...non-critical locations allows to support odd beasts like ppc64le > and arm64be without trashing more common paths. Maybe I can add a > comment for better clarity (see below). But common header format is simple, it's always LE. It does not depend on target. To me this looks like a bug in memory_region_add_eventfd, it should do the right thing depending on device endian-ness. > > > --- > > > > > > I guess it is also a fix for virtio-1 but I didn't check. > > > > > > hw/virtio/virtio-pci.c | 11 +++++++++-- > > > 1 file changed, 9 insertions(+)...
2015 Mar 11
2
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...tIOPCIProxy *proxy, int n, bool assign, bool set_handler) { @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy, } virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler); memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2, - true, n, notifier); + true, cpu_to_host_notifier16(vdev, n), + notifier); } else { memory_region_del_eventfd(&proxy->bar, VIRTIO_...
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/standard-headers/linux/virtio_mmio.h | 141 +++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 include/standard-headers/linux/virtio_mmio.h diff --git a/include/standard-headers/linux/virtio_mmio.h b/include/standard-headers/linux/virtio_mmio.h new file mode 100644 index 0000000..c4b0968 ---
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/standard-headers/linux/virtio_mmio.h | 141 +++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 include/standard-headers/linux/virtio_mmio.h diff --git a/include/standard-headers/linux/virtio_mmio.h b/include/standard-headers/linux/virtio_mmio.h new file mode 100644 index 0000000..c4b0968 ---
2015 Mar 11
0
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...andler) > > > > { > > > > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy, > > > > } > > > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler); > > > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2, > > > > - true, n, notifier); > > > > + true, cpu_to_host_notifier16(vdev, n), > > > > + notifier); > > > &...
2015 Mar 11
0
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...andler) > > > > { > > > > @@ -150,10 +155,12 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy, > > > > } > > > > virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler); > > > > memory_region_add_eventfd(&proxy->bar, VIRTIO_PCI_QUEUE_NOTIFY, 2, > > > > - true, n, notifier); > > > > + true, cpu_to_host_notifier16(vdev, n), > > > > + notifier); > > > &...