|
|
8be556 |
From 55c12f2f8fc87cb1ab7c867310c8ff520793d06b Mon Sep 17 00:00:00 2001
|
|
|
8be556 |
From: Xiao Wang <jasowang@redhat.com>
|
|
|
8be556 |
Date: Tue, 7 Jul 2015 09:18:41 +0200
|
|
|
8be556 |
Subject: [PATCH 153/217] virtio-pci: switch to modern accessors for 1.0
|
|
|
8be556 |
|
|
|
8be556 |
Message-id: <1436260751-25015-39-git-send-email-jasowang@redhat.com>
|
|
|
8be556 |
Patchwork-id: 66813
|
|
|
8be556 |
O-Subject: [RHEL7.2 qemu-kvm-rhev PATCH V2 38/68] virtio-pci: switch to modern accessors for 1.0
|
|
|
8be556 |
Bugzilla: 1227343
|
|
|
8be556 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
8be556 |
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
|
|
8be556 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
8be556 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
8be556 |
|
|
|
8be556 |
From: "Michael S. Tsirkin" <mst@redhat.com>
|
|
|
8be556 |
|
|
|
8be556 |
virtio 1.0 config space is in LE format for all
|
|
|
8be556 |
devices, use modern wrappers when accessed through
|
|
|
8be556 |
the 1.0 BAR.
|
|
|
8be556 |
|
|
|
8be556 |
Reported-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
|
8be556 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
8be556 |
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
8be556 |
|
|
|
8be556 |
(cherry picked from commit 54c720d49d3f9741b52ac95c65a5cc990254a5d8)
|
|
|
8be556 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
8be556 |
---
|
|
|
8be556 |
hw/virtio/virtio-pci.c | 12 ++++++------
|
|
|
8be556 |
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
8be556 |
|
|
|
8be556 |
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
|
|
|
8be556 |
index a41ceee..455b90f 100644
|
|
|
8be556 |
--- a/hw/virtio/virtio-pci.c
|
|
|
8be556 |
+++ b/hw/virtio/virtio-pci.c
|
|
|
8be556 |
@@ -1162,13 +1162,13 @@ static uint64_t virtio_pci_device_read(void *opaque, hwaddr addr,
|
|
|
8be556 |
|
|
|
8be556 |
switch (size) {
|
|
|
8be556 |
case 1:
|
|
|
8be556 |
- val = virtio_config_readb(vdev, addr);
|
|
|
8be556 |
+ val = virtio_config_modern_readb(vdev, addr);
|
|
|
8be556 |
break;
|
|
|
8be556 |
case 2:
|
|
|
8be556 |
- val = virtio_config_readw(vdev, addr);
|
|
|
8be556 |
+ val = virtio_config_modern_readw(vdev, addr);
|
|
|
8be556 |
break;
|
|
|
8be556 |
case 4:
|
|
|
8be556 |
- val = virtio_config_readl(vdev, addr);
|
|
|
8be556 |
+ val = virtio_config_modern_readl(vdev, addr);
|
|
|
8be556 |
break;
|
|
|
8be556 |
}
|
|
|
8be556 |
return val;
|
|
|
8be556 |
@@ -1180,13 +1180,13 @@ static void virtio_pci_device_write(void *opaque, hwaddr addr,
|
|
|
8be556 |
VirtIODevice *vdev = opaque;
|
|
|
8be556 |
switch (size) {
|
|
|
8be556 |
case 1:
|
|
|
8be556 |
- virtio_config_writeb(vdev, addr, val);
|
|
|
8be556 |
+ virtio_config_modern_writeb(vdev, addr, val);
|
|
|
8be556 |
break;
|
|
|
8be556 |
case 2:
|
|
|
8be556 |
- virtio_config_writew(vdev, addr, val);
|
|
|
8be556 |
+ virtio_config_modern_writew(vdev, addr, val);
|
|
|
8be556 |
break;
|
|
|
8be556 |
case 4:
|
|
|
8be556 |
- virtio_config_writel(vdev, addr, val);
|
|
|
8be556 |
+ virtio_config_modern_writel(vdev, addr, val);
|
|
|
8be556 |
break;
|
|
|
8be556 |
}
|
|
|
8be556 |
}
|
|
|
8be556 |
--
|
|
|
8be556 |
1.8.3.1
|
|
|
8be556 |
|