summaryrefslogtreecommitdiffstats
path: root/hw/s390x/virtio-ccw.c
diff options
context:
space:
mode:
authorEdgar E. Iglesias2013-12-17 05:33:56 +0100
committerEdgar E. Iglesias2014-02-11 13:57:06 +0100
commit41701aa4ee11aafebb696c2e778ce0e57bcfc84f (patch)
treee907e263d16a6fd4170b86310e8ea21fa0cf055e /hw/s390x/virtio-ccw.c
parentexec: Make ldq/ldub_*_phys input an AddressSpace (diff)
downloadqemu-41701aa4ee11aafebb696c2e778ce0e57bcfc84f.tar.gz
qemu-41701aa4ee11aafebb696c2e778ce0e57bcfc84f.tar.xz
qemu-41701aa4ee11aafebb696c2e778ce0e57bcfc84f.zip
exec: Make lduw_*_phys input an AddressSpace
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'hw/s390x/virtio-ccw.c')
-rw-r--r--hw/s390x/virtio-ccw.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index d301f00f10..50d852a56e 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -265,9 +265,11 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
info.queue = ldq_phys(&address_space_memory, ccw.cda);
info.align = ldl_phys(&address_space_memory,
ccw.cda + sizeof(info.queue));
- info.index = lduw_phys(ccw.cda + sizeof(info.queue)
+ info.index = lduw_phys(&address_space_memory,
+ ccw.cda + sizeof(info.queue)
+ sizeof(info.align));
- info.num = lduw_phys(ccw.cda + sizeof(info.queue)
+ info.num = lduw_phys(&address_space_memory,
+ ccw.cda + sizeof(info.queue)
+ sizeof(info.align)
+ sizeof(info.index));
ret = virtio_ccw_set_vqs(sch, info.queue, info.align, info.index,
@@ -469,7 +471,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
if (!ccw.cda) {
ret = -EFAULT;
} else {
- vq_config.index = lduw_phys(ccw.cda);
+ vq_config.index = lduw_phys(&address_space_memory, ccw.cda);
vq_config.num_max = virtio_queue_get_num(vdev,
vq_config.index);
stw_phys(ccw.cda + sizeof(vq_config.index), vq_config.num_max);