diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2015-06-04 12:34:25 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-06-10 18:15:05 +0200 |
commit | 54c720d49d3f9741b52ac95c65a5cc990254a5d8 (patch) | |
tree | 28f6d773e89196c89363161c628fe862f20bee1b /hw/virtio | |
parent | adfb743c90c7aa5e92907ce875e4f35747ee1963 (diff) | |
download | qemu-54c720d49d3f9741b52ac95c65a5cc990254a5d8.tar.gz qemu-54c720d49d3f9741b52ac95c65a5cc990254a5d8.tar.bz2 qemu-54c720d49d3f9741b52ac95c65a5cc990254a5d8.zip |
virtio-pci: switch to modern accessors for 1.0
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 <rusty@rustcorp.com.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r-- | hw/virtio/virtio-pci.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 7805bddc74..d6d76684fc 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; } } |