search for: queue_sel

Displaying 20 results from an estimated 105 matches for "queue_sel".

2013 May 29
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
.../* TODO: more exact limit? */ return VIRTIO_PCI_QUEUE_MAX; case offsetof(struct virtio_pci_common_cfg, device_status): + assert(size == sizeof cfg.device_status); return vdev->status; /* About a specific virtqueue. */ case offsetof(struct virtio_pci_common_cfg, queue_select): + assert(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_...
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,
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...f(struct virtio_pci_common_cfg, num_queues): + /* TODO: more exact limit? */ + return VIRTIO_PCI_QUEUE_MAX; + case offsetof(struct virtio_pci_common_cfg, device_status): + return vdev->status; + + /* About a 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); + c...
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...f(struct virtio_pci_common_cfg, num_queues): + /* TODO: more exact limit? */ + return VIRTIO_PCI_QUEUE_MAX; + case offsetof(struct virtio_pci_common_cfg, device_status): + return vdev->status; + + /* About a 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); + c...
2013 May 28
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
..._queues): > + /* TODO: more exact limit? */ > + return VIRTIO_PCI_QUEUE_MAX; > + case offsetof(struct virtio_pci_common_cfg, device_status): > + return vdev->status; > + > + /* About a 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, vd...
2019 Sep 10
1
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...+/* State of each mdev device */ > +struct mvnet_state { > + struct mvnet_virtqueue vqs[2]; > + struct work_struct work; > + spinlock_t lock; > + struct mdev_device *mdev; > + struct virtio_net_config config; > + struct virtio_mdev_callback *cbs; > + void *buffer; > + u32 queue_sel; > + u32 driver_features_sel; > + u32 driver_features[2]; > + u32 device_features_sel; > + u32 status; > + u32 generation; > + u32 num; > + struct list_head next; > +}; > + > +static struct mutex mdev_list_lock; > +static struct list_head mdev_devices_list; > + &...
2019 Sep 10
0
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...(1ULL << VIRTIO_F_IOMMU_PLATFORM) ; + +/* State of each mdev device */ +struct mvnet_state { + struct mvnet_virtqueue vqs[2]; + struct work_struct work; + spinlock_t lock; + struct mdev_device *mdev; + struct virtio_net_config config; + struct virtio_mdev_callback *cbs; + void *buffer; + u32 queue_sel; + u32 driver_features_sel; + u32 driver_features[2]; + u32 device_features_sel; + u32 status; + u32 generation; + u32 num; + struct list_head next; +}; + +static struct mutex mdev_list_lock; +static struct list_head mdev_devices_list; + +static void mvnet_queue_ready(struct mvnet_state *mvnet, uns...
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
.../virtio-mmio.c > @@ -244,9 +244,13 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value, > case VIRTIO_MMIO_QUEUENUM: > DPRINTF("mmio_queue write %d max %d\n", (int)value, VIRTQUEUE_MAX_SIZE); > virtio_queue_set_num(vdev, vdev->queue_sel, value); > + /* Note: only call this function for legacy devices */ > + virtio_queue_update_rings(vdev, vdev->queue_sel); > break; > case VIRTIO_MMIO_QUEUEALIGN: > + /* Note: this is only valid for legacy devices */ > virtio_queue_set...
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
.../virtio-mmio.c > @@ -244,9 +244,13 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value, > case VIRTIO_MMIO_QUEUENUM: > DPRINTF("mmio_queue write %d max %d\n", (int)value, VIRTQUEUE_MAX_SIZE); > virtio_queue_set_num(vdev, vdev->queue_sel, value); > + /* Note: only call this function for legacy devices */ > + virtio_queue_update_rings(vdev, vdev->queue_sel); > break; > case VIRTIO_MMIO_QUEUEALIGN: > + /* Note: this is only valid for legacy devices */ > virtio_queue_set...
2013 May 29
1
[RFC 7/11] virtio_pci: new, capability-aware driver.
...the accesses aren't atomic for that. > > Cheers, > Rusty. I mean the struct should have separate _lo and _hi fields. Otherwise I have to do: + case offsetof(struct virtio_pci_common_cfg, queue_desc): + assert(size == 4); + return virtio_queue_get_desc_addr(vdev, vdev->queue_sel) & low; + case offsetof(struct virtio_pci_common_cfg, queue_desc) + 4: + assert(size == 4); + return virtio_queue_get_desc_addr(vdev, vdev->queue_sel) >> 32; Would be nicer as: + case offsetof(struct virtio_pci_common_cfg, queue_desc_lo): + assert(size == sizeof cfg.qu...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...#define VIRTIO_PCI_GUEST_FEATURES 4 + +/* A 32-bit r/w PFN for the currently selected queue */ +#define VIRTIO_PCI_QUEUE_PFN 8 + +/* A 16-bit r/o queue size for the currently selected queue */ +#define VIRTIO_PCI_QUEUE_NUM 12 + +/* A 16-bit r/w queue selector */ +#define VIRTIO_PCI_QUEUE_SEL 14 + +/* A 16-bit r/w queue notifier */ +#define VIRTIO_PCI_QUEUE_NOTIFY 16 + +/* An 8-bit device status register. */ +#define VIRTIO_PCI_STATUS 18 + +/* An 8-bit r/o interrupt status register. Reading the value will return the + * current contents of the ISR and will also c...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...#define VIRTIO_PCI_GUEST_FEATURES 4 + +/* A 32-bit r/w PFN for the currently selected queue */ +#define VIRTIO_PCI_QUEUE_PFN 8 + +/* A 16-bit r/o queue size for the currently selected queue */ +#define VIRTIO_PCI_QUEUE_NUM 12 + +/* A 16-bit r/w queue selector */ +#define VIRTIO_PCI_QUEUE_SEL 14 + +/* A 16-bit r/w queue notifier */ +#define VIRTIO_PCI_QUEUE_NOTIFY 16 + +/* An 8-bit device status register. */ +#define VIRTIO_PCI_STATUS 18 + +/* An 8-bit r/o interrupt status register. Reading the value will return the + * current contents of the ISR and will also c...
2015 Jan 22
2
[Qemu-devel] [PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
.../virtio-mmio.c > @@ -244,8 +244,11 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value, > case VIRTIO_MMIO_QUEUENUM: > DPRINTF("mmio_queue write %d max %d\n", (int)value, VIRTQUEUE_MAX_SIZE); > virtio_queue_set_num(vdev, vdev->queue_sel, value); > + /* Note: only call this function for legacy devices */ It's not clear to me if this is an assertion that this *does* only call the function for legacy devices or a fixme, that it *should* only call the function for legacy devices. > + virtio_queue_update_rings...
2015 Jan 22
2
[Qemu-devel] [PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
.../virtio-mmio.c > @@ -244,8 +244,11 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value, > case VIRTIO_MMIO_QUEUENUM: > DPRINTF("mmio_queue write %d max %d\n", (int)value, VIRTQUEUE_MAX_SIZE); > virtio_queue_set_num(vdev, vdev->queue_sel, value); > + /* Note: only call this function for legacy devices */ It's not clear to me if this is an assertion that this *does* only call the function for legacy devices or a fixme, that it *should* only call the function for legacy devices. > + virtio_queue_update_rings...
2014 Dec 03
0
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...> @@ -244,9 +244,13 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value, > > case VIRTIO_MMIO_QUEUENUM: > > DPRINTF("mmio_queue write %d max %d\n", (int)value, VIRTQUEUE_MAX_SIZE); > > virtio_queue_set_num(vdev, vdev->queue_sel, value); > > + /* Note: only call this function for legacy devices */ > > + virtio_queue_update_rings(vdev, vdev->queue_sel); > > break; > > case VIRTIO_MMIO_QUEUEALIGN: > > + /* Note: this is only valid for legacy devices */ >...
2014 Dec 03
0
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...> @@ -244,9 +244,13 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value, > > case VIRTIO_MMIO_QUEUENUM: > > DPRINTF("mmio_queue write %d max %d\n", (int)value, VIRTQUEUE_MAX_SIZE); > > virtio_queue_set_num(vdev, vdev->queue_sel, value); > > + /* Note: only call this function for legacy devices */ > > + virtio_queue_update_rings(vdev, vdev->queue_sel); > > break; > > case VIRTIO_MMIO_QUEUEALIGN: > > + /* Note: this is only valid for legacy devices */ >...
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
...r - Write Only */ +#define VIRTIO_MMIO_DRIVER_FEATURES_SEL 0x024 + + +#ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */ + +/* Guest's memory page size in bytes - Write Only */ +#define VIRTIO_MMIO_GUEST_PAGE_SIZE 0x028 + +#endif + + +/* Queue selector - Write Only */ +#define VIRTIO_MMIO_QUEUE_SEL 0x030 + +/* Maximum size of the currently selected queue - Read Only */ +#define VIRTIO_MMIO_QUEUE_NUM_MAX 0x034 + +/* Queue size for the currently selected queue - Write Only */ +#define VIRTIO_MMIO_QUEUE_NUM 0x038 + + +#ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */ + +/* Used Ring ali...
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
...r - Write Only */ +#define VIRTIO_MMIO_DRIVER_FEATURES_SEL 0x024 + + +#ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */ + +/* Guest's memory page size in bytes - Write Only */ +#define VIRTIO_MMIO_GUEST_PAGE_SIZE 0x028 + +#endif + + +/* Queue selector - Write Only */ +#define VIRTIO_MMIO_QUEUE_SEL 0x030 + +/* Maximum size of the currently selected queue - Read Only */ +#define VIRTIO_MMIO_QUEUE_NUM_MAX 0x034 + +/* Queue size for the currently selected queue - Write Only */ +#define VIRTIO_MMIO_QUEUE_NUM 0x038 + + +#ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */ + +/* Used Ring ali...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...65c6..108af06 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -134,7 +134,10 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, vdev->features = value; break; case SYBORG_VIRTIO_QUEUE_BASE: - virtio_queue_set_addr(vdev, vdev->queue_sel, value); + if (value == 0) + virtio_reset(vdev); + else + virtio_queue_set_addr(vdev, vdev->queue_sel, value); break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static CPUWriteMemoryFunc *sybor...