[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/42] virtio-pci: switch to modern accessors for 1.0
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 16/42] virtio-pci: switch to modern accessors for 1.0 |
Date: |
Thu, 11 Jun 2015 13:58:50 +0200 |
virtio 1.0 config space is in LE format for all
devices, use modern wrappers when accessed through
the 1.0 BAR.
Reported-by: Rusty Russell <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
---
hw/virtio/virtio-pci.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 7805bdd..d6d7668 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1162,13 +1162,13 @@ static uint64_t virtio_pci_device_read(void *opaque,
hwaddr addr,
switch (size) {
case 1:
- val = virtio_config_readb(vdev, addr);
+ val = virtio_config_modern_readb(vdev, addr);
break;
case 2:
- val = virtio_config_readw(vdev, addr);
+ val = virtio_config_modern_readw(vdev, addr);
break;
case 4:
- val = virtio_config_readl(vdev, addr);
+ val = virtio_config_modern_readl(vdev, addr);
break;
}
return val;
@@ -1180,13 +1180,13 @@ static void virtio_pci_device_write(void *opaque,
hwaddr addr,
VirtIODevice *vdev = opaque;
switch (size) {
case 1:
- virtio_config_writeb(vdev, addr, val);
+ virtio_config_modern_writeb(vdev, addr, val);
break;
case 2:
- virtio_config_writew(vdev, addr, val);
+ virtio_config_modern_writew(vdev, addr, val);
break;
case 4:
- virtio_config_writel(vdev, addr, val);
+ virtio_config_modern_writel(vdev, addr, val);
break;
}
}
--
MST
- [Qemu-devel] [PULL 06/42] virtio: allow to fail setting status, (continued)
- [Qemu-devel] [PULL 06/42] virtio: allow to fail setting status, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 07/42] virtio-net: no writeable mac for virtio-1, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 08/42] virtio-net: support longer header, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 10/42] vhost_net: add version_1 feature, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 09/42] virtio-net: enable virtio 1.0, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 12/42] linux-headers: add virtio_pci, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 14/42] virtio: generation counter support, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 13/42] virtio-pci: initial virtio 1.0 support, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 11/42] vhost: 64 bit features, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 15/42] virtio: add modern config accessors, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 16/42] virtio-pci: switch to modern accessors for 1.0,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 17/42] virtio-pci: add flags to enable/disable legacy/modern, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 18/42] virtio-pci: make QEMU_VIRTIO_PCI_QUEUE_MEM_MULT smaller, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 22/42] virtio_balloon: header update, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 23/42] virtio-balloon: switch to virtio_add_feature, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 24/42] virtio-pci: add struct VirtIOPCIRegion for virtio-1 regions, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 25/42] virtio-pci: add virtio_pci_modern_regions_init(), Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 26/42] virtio-pci: add virtio_pci_modern_region_map(), Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 27/42] virtio-pci: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 29/42] virtio-pci: drop identical virtio_pci_cap, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 28/42] virtio-pci: move cap type to VirtIOPCIRegion, Michael S. Tsirkin, 2015/06/11