[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/9] s390-virtio: use specific endian ld/st_phys
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 8/9] s390-virtio: use specific endian ld/st_phys |
Date: |
Tue, 5 Jul 2011 18:28:09 +0200 |
Signed-off-by: Alexander Graf <address@hidden>
---
hw/s390-virtio-bus.c | 10 +++++-----
hw/s390-virtio.c | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index d4a12f7..dde6ba5 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -165,7 +165,7 @@ static uint64_t
s390_virtio_device_vq_token(VirtIOS390Device *dev, int vq)
(vq * VIRTIO_VQCONFIG_LEN) +
VIRTIO_VQCONFIG_OFFS_TOKEN;
- return ldq_phys(token_off);
+ return ldq_be_phys(token_off);
}
static ram_addr_t s390_virtio_device_num_vq(VirtIOS390Device *dev)
@@ -219,8 +219,8 @@ void s390_virtio_device_sync(VirtIOS390Device *dev)
vring = s390_virtio_next_ring(bus);
virtio_queue_set_addr(dev->vdev, i, vring);
virtio_queue_set_vector(dev->vdev, i, i);
- stq_phys(vq + VIRTIO_VQCONFIG_OFFS_ADDRESS, vring);
- stw_phys(vq + VIRTIO_VQCONFIG_OFFS_NUM,
virtio_queue_get_num(dev->vdev, i));
+ stq_be_phys(vq + VIRTIO_VQCONFIG_OFFS_ADDRESS, vring);
+ stw_be_phys(vq + VIRTIO_VQCONFIG_OFFS_NUM,
virtio_queue_get_num(dev->vdev, i));
}
cur_offs = dev->dev_offs;
@@ -228,7 +228,7 @@ void s390_virtio_device_sync(VirtIOS390Device *dev)
cur_offs += num_vq * VIRTIO_VQCONFIG_LEN;
/* Sync feature bitmap */
- stl_phys(cur_offs, bswap32(dev->host_features));
+ stl_le_phys(cur_offs, dev->host_features);
dev->feat_offs = cur_offs + dev->feat_len;
cur_offs += dev->feat_len * 2;
@@ -252,7 +252,7 @@ void s390_virtio_device_update_status(VirtIOS390Device *dev)
/* Update guest supported feature bitmap */
- features = bswap32(ldl_phys(dev->feat_offs));
+ features = bswap32(ldl_be_phys(dev->feat_offs));
if (vdev->set_features) {
vdev->set_features(vdev, features);
}
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index 3eba7ea..abe954d 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -193,7 +193,7 @@ static void s390_init(ram_addr_t my_ram_size,
if (kernel_filename) {
kernel_size = load_image(kernel_filename, qemu_get_ram_ptr(0));
- if (lduw_phys(KERN_IMAGE_START) != 0x0dd0) {
+ if (lduw_be_phys(KERN_IMAGE_START) != 0x0dd0) {
fprintf(stderr, "Specified image is not an s390 boot image\n");
exit(1);
}
@@ -232,8 +232,8 @@ static void s390_init(ram_addr_t my_ram_size,
}
initrd_size = load_image(initrd_filename,
qemu_get_ram_ptr(initrd_offset));
- stq_phys(INITRD_PARM_START, initrd_offset);
- stq_phys(INITRD_PARM_SIZE, initrd_size);
+ stq_be_phys(INITRD_PARM_START, initrd_offset);
+ stq_be_phys(INITRD_PARM_SIZE, initrd_size);
}
if (kernel_cmdline) {
--
1.7.3.4
- [Qemu-devel] [PATCH 0/9] Don't use ld./st._phys in hw/, Alexander Graf, 2011/07/05
- [Qemu-devel] [PATCH 4/9] msi: use specific endian ld/st_phys, Alexander Graf, 2011/07/05
- [Qemu-devel] [PATCH 7/9] ppc405_uc: use specific endian ld/st_phys, Alexander Graf, 2011/07/05
- [Qemu-devel] [PATCH 2/9] hpet: use specific endian ld/st_phys, Alexander Graf, 2011/07/05
- [Qemu-devel] [PATCH 8/9] s390-virtio: use specific endian ld/st_phys,
Alexander Graf <=
- [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Alexander Graf, 2011/07/05
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Blue Swirl, 2011/07/05
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Alexander Graf, 2011/07/05
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Blue Swirl, 2011/07/05
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Alexander Graf, 2011/07/05
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Blue Swirl, 2011/07/05
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Alexander Graf, 2011/07/05
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Paolo Bonzini, 2011/07/06
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Alexander Graf, 2011/07/06
- Re: [Qemu-devel] [PATCH 1/9] exec: add endian specific phys ld/st functions, Hannes Reinecke, 2011/07/06