Displaying 20 results from an estimated 85 matches for "queue_select".
2023 May 08
1
[PATCH V2 1/5] vDPA/ifcvf: virt queue ops take immediate actions
...vf_hw *hw, u16 qid, u32 num)
{
- struct virtio_pci_common_cfg __iomem *cfg;
- u32 i;
+ struct virtio_pci_common_cfg __iomem *cfg = hw->common_cfg;
- cfg = hw->common_cfg;
- for (i = 0; i < hw->nr_vring; i++) {
- if (!hw->vring[i].ready)
- break;
+ vp_iowrite16(qid, &cfg->queue_select);
+ vp_iowrite16(num, &cfg->queue_size);
+}
- vp_iowrite16(i, &cfg->queue_select);
- vp_iowrite64_twopart(hw->vring[i].desc, &cfg->queue_desc_lo,
- &cfg->queue_desc_hi);
- vp_iowrite64_twopart(hw->vring[i].avail, &cfg->queue_avail_lo,
-...
2023 Mar 31
1
[PATCH 1/5] virt queue ops take immediate actions
...vf_hw *hw, u16 qid, u32 num)
{
- struct virtio_pci_common_cfg __iomem *cfg;
- u32 i;
+ struct virtio_pci_common_cfg __iomem *cfg = hw->common_cfg;
- cfg = hw->common_cfg;
- for (i = 0; i < hw->nr_vring; i++) {
- if (!hw->vring[i].ready)
- break;
+ vp_iowrite16(qid, &cfg->queue_select);
+ vp_iowrite16(num, &cfg->queue_size);
+}
- vp_iowrite16(i, &cfg->queue_select);
- vp_iowrite64_twopart(hw->vring[i].desc, &cfg->queue_desc_lo,
- &cfg->queue_desc_hi);
- vp_iowrite64_twopart(hw->vring[i].avail, &cfg->queue_avail_lo,
-...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...d vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
>> +{
>> + struct pci_dev *pdev = vp_vdpa->pdev;
>> + int i;
>> +
>> + for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
>> + if (vp_vdpa->vring[i].irq != -1) {
>> + vp_iowrite16(i, &vp_vdpa->common->queue_select);
>> + vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
>> + &vp_vdpa->common->queue_msix_vector);
>> + devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
>> + &vp_vdpa->vring[i]);
>> + vp_vdpa->vring[i].irq = -1;
>> + }
>...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...d vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
>> +{
>> + struct pci_dev *pdev = vp_vdpa->pdev;
>> + int i;
>> +
>> + for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
>> + if (vp_vdpa->vring[i].irq != -1) {
>> + vp_iowrite16(i, &vp_vdpa->common->queue_select);
>> + vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
>> + &vp_vdpa->common->queue_msix_vector);
>> + devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
>> + &vp_vdpa->vring[i]);
>> + vp_vdpa->vring[i].irq = -1;
>> + }
>...
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>
---
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...d8(&vp_vdpa->common->device_status);
+}
+
+static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
+{
+ struct pci_dev *pdev = vp_vdpa->pdev;
+ int i;
+
+ for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
+ if (vp_vdpa->vring[i].irq != -1) {
+ vp_iowrite16(i, &vp_vdpa->common->queue_select);
+ vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
+ &vp_vdpa->common->queue_msix_vector);
+ devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
+ &vp_vdpa->vring[i]);
+ vp_vdpa->vring[i].irq = -1;
+ }
+ }
+
+ if (vp_vdpa->vectors) {
+ pci_free_irq_vectors...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...d8(&vp_vdpa->common->device_status);
+}
+
+static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
+{
+ struct pci_dev *pdev = vp_vdpa->pdev;
+ int i;
+
+ for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
+ if (vp_vdpa->vring[i].irq != -1) {
+ vp_iowrite16(i, &vp_vdpa->common->queue_select);
+ vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
+ &vp_vdpa->common->queue_msix_vector);
+ devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
+ &vp_vdpa->vring[i]);
+ vp_vdpa->vring[i].irq = -1;
+ }
+ }
+
+ if (vp_vdpa->vectors) {
+ pci_free_irq_vectors...
2020 Jun 10
2
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...d8(&vp_vdpa->common->device_status);
+}
+
+static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
+{
+ struct pci_dev *pdev = vp_vdpa->pdev;
+ int i;
+
+ for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
+ if (vp_vdpa->vring[i].irq != -1) {
+ vp_iowrite16(i, &vp_vdpa->common->queue_select);
+ vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
+ &vp_vdpa->common->queue_msix_vector);
+ devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
+ &vp_vdpa->vring[i]);
+ vp_vdpa->vring[i].irq = -1;
+ }
+ }
+
+ if (vp_vdpa->vectors) {
+ pci_free_irq_vectors...
2020 Jun 10
2
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...d8(&vp_vdpa->common->device_status);
+}
+
+static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
+{
+ struct pci_dev *pdev = vp_vdpa->pdev;
+ int i;
+
+ for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
+ if (vp_vdpa->vring[i].irq != -1) {
+ vp_iowrite16(i, &vp_vdpa->common->queue_select);
+ vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
+ &vp_vdpa->common->queue_msix_vector);
+ devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
+ &vp_vdpa->vring[i]);
+ vp_vdpa->vring[i].irq = -1;
+ }
+ }
+
+ if (vp_vdpa->vectors) {
+ pci_free_irq_vectors...
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_pci...
2020 Jun 10
0
[PATCH V3] vdpa: introduce virtio pci driver
...)
> > > +{
> > > + struct pci_dev *pdev = vp_vdpa->pdev;
> > > + int i;
> > > +
> > > + for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
> > > + if (vp_vdpa->vring[i].irq != -1) {
> > > + vp_iowrite16(i, &vp_vdpa->common->queue_select);
> > > + vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
> > > + &vp_vdpa->common->queue_msix_vector);
> > > + devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
> > > + &vp_vdpa->vring[i]);
> > > + vp_vdpa->vring[i...
2020 May 29
0
[PATCH 5/6] vdpa: introduce virtio pci driver
...d8(&vp_vdpa->common->device_status);
+}
+
+static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
+{
+ struct pci_dev *pdev = vp_vdpa->pdev;
+ int i;
+
+ for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
+ if (vp_vdpa->vring[i].irq != -1) {
+ vp_iowrite16(i, &vp_vdpa->common->queue_select);
+ vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
+ &vp_vdpa->common->queue_msix_vector);
+ devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
+ &vp_vdpa->vring[i]);
+ vp_vdpa->vring[i].irq = -1;
+ }
+ }
+
+ if (vp_vdpa->vectors) {
+ pci_free_irq_vectors...
2020 Jun 10
0
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...; +}
> +
> +static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
> +{
> + struct pci_dev *pdev = vp_vdpa->pdev;
> + int i;
> +
> + for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
> + if (vp_vdpa->vring[i].irq != -1) {
> + vp_iowrite16(i, &vp_vdpa->common->queue_select);
> + vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
> + &vp_vdpa->common->queue_msix_vector);
> + devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
> + &vp_vdpa->vring[i]);
> + vp_vdpa->vring[i].irq = -1;
> + }
> + }
> +
> + if (v...
2020 Jun 10
0
[PATCH V3] vdpa: introduce virtio pci driver
...; +}
> +
> +static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
> +{
> + struct pci_dev *pdev = vp_vdpa->pdev;
> + int i;
> +
> + for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
> + if (vp_vdpa->vring[i].irq != -1) {
> + vp_iowrite16(i, &vp_vdpa->common->queue_select);
> + vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
> + &vp_vdpa->common->queue_msix_vector);
> + devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
> + &vp_vdpa->vring[i]);
> + vp_vdpa->vring[i].irq = -1;
> + }
> + }
> +
> + if (v...
2020 Jun 10
2
[PATCH V2] vdpa: introduce virtio pci driver
...d8(&vp_vdpa->common->device_status);
+}
+
+static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
+{
+ struct pci_dev *pdev = vp_vdpa->pdev;
+ int i;
+
+ for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
+ if (vp_vdpa->vring[i].irq != -1) {
+ vp_iowrite16(i, &vp_vdpa->common->queue_select);
+ vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
+ &vp_vdpa->common->queue_msix_vector);
+ devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
+ &vp_vdpa->vring[i]);
+ vp_vdpa->vring[i].irq = -1;
+ }
+ }
+
+ if (vp_vdpa->vectors) {
+ pci_free_irq_vectors...
2020 Jun 10
2
[PATCH V2] vdpa: introduce virtio pci driver
...d8(&vp_vdpa->common->device_status);
+}
+
+static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
+{
+ struct pci_dev *pdev = vp_vdpa->pdev;
+ int i;
+
+ for (i = 0; i < VP_VDPA_MAX_QUEUE; i++) {
+ if (vp_vdpa->vring[i].irq != -1) {
+ vp_iowrite16(i, &vp_vdpa->common->queue_select);
+ vp_iowrite16(VIRTIO_MSI_NO_VECTOR,
+ &vp_vdpa->common->queue_msix_vector);
+ devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
+ &vp_vdpa->vring[i]);
+ vp_vdpa->vring[i].irq = -1;
+ }
+ }
+
+ if (vp_vdpa->vectors) {
+ pci_free_irq_vectors...
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,
2015 Feb 10
1
[PATCH] virtio_pci: use 16-bit accessor for queue_enable.
...read16(&cfg->queue_enable))
return ERR_PTR(-ENOENT);
if (num & (num - 1)) {
@@ -394,7 +394,7 @@ static int vp_modern_find_vqs(struct virtio_device *vdev, unsigned nvqs,
*/
list_for_each_entry(vq, &vdev->vqs, list) {
iowrite16(vq->index, &vp_dev->common->queue_select);
- iowrite8(1, &vp_dev->common->queue_enable);
+ iowrite16(1, &vp_dev->common->queue_enable);
}
return 0;