Displaying 20 results from an estimated 67 matches for "queue_msix_vector".
2015 Feb 15
3
[PATCH 1/2] virtio_pci_modern: type-safe io accessors
The spec is very clear on this:
4.1.3.1 Driver Requirements: PCI Device Layout
The driver MUST access each field using the ?natural? access method,
i.e. 32-bit accesses for 32-bit fields, 16-bit accesses for 16-bit
fields and 8-bit accesses for 8-bit fields.
Add type-safe wrappers to prevent access with incorrect width.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
2015 Feb 15
3
[PATCH 1/2] virtio_pci_modern: type-safe io accessors
The spec is very clear on this:
4.1.3.1 Driver Requirements: PCI Device Layout
The driver MUST access each field using the ?natural? access method,
i.e. 32-bit accesses for 32-bit fields, 16-bit accesses for 16-bit
fields and 8-bit accesses for 8-bit fields.
Add type-safe wrappers to prevent access with incorrect width.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
2013 May 29
1
[RFC 7/11] virtio_pci: new, capability-aware driver.
On Wed, May 29, 2013 at 10:47:52AM +0930, Rusty Russell wrote:
> "Michael S. Tsirkin" <mst at redhat.com> writes:
>
> > On Mon, Dec 12, 2011 at 01:49:13PM +0200, Michael S. Tsirkin wrote:
> >> On Mon, Dec 12, 2011 at 09:15:03AM +1030, Rusty Russell wrote:
> >> > On Sun, 11 Dec 2011 11:42:56 +0200, "Michael S. Tsirkin" <mst at
2013 May 29
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...ssert(size == sizeof cfg.queue_select);
return vdev->queue_sel;
case offsetof(struct virtio_pci_common_cfg, queue_size):
+ assert(size == sizeof cfg.queue_size);
return virtio_queue_get_num(vdev, vdev->queue_sel);
case offsetof(struct virtio_pci_common_cfg, queue_msix_vector):
+ assert(size == sizeof cfg.queue_msix_vector);
return virtio_queue_vector(vdev, vdev->queue_sel);
case offsetof(struct virtio_pci_common_cfg, queue_enable):
+ assert(size == sizeof cfg.queue_enable);
/* TODO */
return 0;
case offsetof(struct virtio_pci_com...
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 |
2013 May 29
6
[PATCH RFC] virtio-pci: new config layout: using memory BAR
Anthony Liguori <aliguori at us.ibm.com> writes:
> "Michael S. Tsirkin" <mst at redhat.com> writes:
>> + case offsetof(struct virtio_pci_common_cfg, device_feature_select):
>> + return proxy->device_feature_select;
>
> Oh dear no... Please use defines like the rest of QEMU.
It is pretty ugly.
Yet the structure definitions are descriptive,
2013 May 29
6
[PATCH RFC] virtio-pci: new config layout: using memory BAR
Anthony Liguori <aliguori at us.ibm.com> writes:
> "Michael S. Tsirkin" <mst at redhat.com> writes:
>> + case offsetof(struct virtio_pci_common_cfg, device_feature_select):
>> + return proxy->device_feature_select;
>
> Oh dear no... Please use defines like the rest of QEMU.
It is pretty ugly.
Yet the structure definitions are descriptive,
2014 Dec 11
6
[PATCH RFC 0/5] virtio_pci: modern driver
Based on Rusty's patches.
Coding style and funny jokes are his.
Bugs and a star wars reference (should be easy to spot) are mine.
Untested, but useful as basis for beginning the qemu work.
TODO:
= simplify probing: use a common probe function, probe with modern driver
first, if that fails - probe with legacy driver.
BUGS: ATM legacy driver can win and drive a transitional device
2014 Dec 11
6
[PATCH RFC 0/5] virtio_pci: modern driver
Based on Rusty's patches.
Coding style and funny jokes are his.
Bugs and a star wars reference (should be easy to spot) are mine.
Untested, but useful as basis for beginning the qemu work.
TODO:
= simplify probing: use a common probe function, probe with modern driver
first, if that fails - probe with legacy driver.
BUGS: ATM legacy driver can win and drive a transitional device
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...;queue_size);
> +
> + *(u32 *)(lm_cfg + IFCVF_LM_RING_STATE_OFFSET +
> + (i / 2) * IFCVF_LM_CFG_SIZE + (i % 2) * 4) =
> + (u32)hw->vring[i].last_avail_idx |
> + ((u32)hw->vring[i].last_used_idx << 16);
> +
> + iowrite16(i + IFCVF_MSI_QUEUE_OFF, &cfg->queue_msix_vector);
> + if (ioread16(&cfg->queue_msix_vector) ==
> + VIRTIO_MSI_NO_VECTOR) {
> + IFC_ERR(ifcvf->dev,
> + "No msix vector for queue %u.\n", i);
> + return -1;
> + }
> +
> + iowrite16(1, &cfg->queue_enable);
> + }
> +
> + return...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...;queue_size);
> +
> + *(u32 *)(lm_cfg + IFCVF_LM_RING_STATE_OFFSET +
> + (i / 2) * IFCVF_LM_CFG_SIZE + (i % 2) * 4) =
> + (u32)hw->vring[i].last_avail_idx |
> + ((u32)hw->vring[i].last_used_idx << 16);
> +
> + iowrite16(i + IFCVF_MSI_QUEUE_OFF, &cfg->queue_msix_vector);
> + if (ioread16(&cfg->queue_msix_vector) ==
> + VIRTIO_MSI_NO_VECTOR) {
> + IFC_ERR(ifcvf->dev,
> + "No msix vector for queue %u.\n", i);
> + return -1;
> + }
> +
> + iowrite16(1, &cfg->queue_enable);
> + }
> +
> + return...
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...force *)map_capability(vp_dev->pci_dev,
+ vp_dev->notify_map_cap, 2, 2,
+ off * vp_dev->notify_offset_multiplier, 2,
+ NULL);
+ }
+
+ if (!vq->priv) {
+ err = -ENOMEM;
+ goto out_map;
+ }
+
+ if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
+ iowrite16(msix_vec, &cfg->queue_msix_vector);
+ msix_vec = ioread16(&cfg->queue_msix_vector);
+ if (msix_vec == VIRTIO_MSI_NO_VECTOR) {
+ err = -EBUSY;
+ goto out_assign;
+ }
+ }
+
+ return vq;
+
+out_assign:
+ if (!vp_dev->notify_base)
+ pci_iounmap(vp_dev->pci_dev, (void __iomem __force *)vq->priv);
+out_map:
+ vrin...
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...force *)map_capability(vp_dev->pci_dev,
+ vp_dev->notify_map_cap, 2, 2,
+ off * vp_dev->notify_offset_multiplier, 2,
+ NULL);
+ }
+
+ if (!vq->priv) {
+ err = -ENOMEM;
+ goto out_map;
+ }
+
+ if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
+ iowrite16(msix_vec, &cfg->queue_msix_vector);
+ msix_vec = ioread16(&cfg->queue_msix_vector);
+ if (msix_vec == VIRTIO_MSI_NO_VECTOR) {
+ err = -EBUSY;
+ goto out_assign;
+ }
+ }
+
+ return vq;
+
+out_assign:
+ if (!vp_dev->notify_base)
+ pci_iounmap(vp_dev->pci_dev, (void __iomem __force *)vq->priv);
+out_map:
+ vrin...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...% 2) * 4) =
> + (u32)hw->vring[i].last_avail_idx |
> + ((u32)hw->vring[i].last_used_idx << 16);
Is this trying to store data into part of device memory BAR?
If yes doing it like this isn't portable I think.
> +
> + iowrite16(i + IFCVF_MSI_QUEUE_OFF, &cfg->queue_msix_vector);
> + if (ioread16(&cfg->queue_msix_vector) ==
> + VIRTIO_MSI_NO_VECTOR) {
> + IFC_ERR(ifcvf->dev,
> + "No msix vector for queue %u.\n", i);
> + return -1;
> + }
> +
> + iowrite16(1, &cfg->queue_enable);
> + }
> +
> + return...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
..._SIZE + (i % 2) * 4) =
> + (u32)hw->vring[i].last_avail_idx |
> + ((u32)hw->vring[i].last_used_idx << 16);
As pointed out by Michael, it's better to formalize lm_cfg as a
structure instead of doing math here.
> +
> + iowrite16(i + IFCVF_MSI_QUEUE_OFF, &cfg->queue_msix_vector);
> + if (ioread16(&cfg->queue_msix_vector) ==
> + VIRTIO_MSI_NO_VECTOR) {
> + IFC_ERR(ifcvf->dev,
> + "No msix vector for queue %u.\n", i);
> + return -1;
> + }
> +
> + iowrite16(1, &cfg->queue_enable);
This queue_enable should be...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...;queue_size);
> +
> + *(u32 *)(lm_cfg + IFCVF_LM_RING_STATE_OFFSET +
> + (i / 2) * IFCVF_LM_CFG_SIZE + (i % 2) * 4) =
> + (u32)hw->vring[i].last_avail_idx |
> + ((u32)hw->vring[i].last_used_idx << 16);
> +
> + iowrite16(i + IFCVF_MSI_QUEUE_OFF, &cfg->queue_msix_vector);
> + if (ioread16(&cfg->queue_msix_vector) ==
> + VIRTIO_MSI_NO_VECTOR) {
> + IFC_ERR(ifcvf->dev,
> + "No msix vector for queue %u.\n", i);
> + return -1;
> + }
> +
> + iowrite16(1, &cfg->queue_enable);
> + }
> +
> + return 0...
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:
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...specific virtqueue. */
+ case offsetof(struct virtio_pci_common_cfg, queue_select):
+ return vdev->queue_sel;
+ case offsetof(struct virtio_pci_common_cfg, queue_size):
+ return virtio_queue_get_num(vdev, vdev->queue_sel);
+ case offsetof(struct virtio_pci_common_cfg, queue_msix_vector):
+ return virtio_queue_vector(vdev, vdev->queue_sel);
+ case offsetof(struct virtio_pci_common_cfg, queue_enable):
+ /* TODO */
+ return 0;
+ case offsetof(struct virtio_pci_common_cfg, queue_notify_off):
+ return vdev->queue_sel;
+ case offsetof(struct virtio_pci_comm...