mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
exec: Make stw_*_phys input an AddressSpace
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
parent
2198a12143
commit
5ce5944dc0
14 changed files with 46 additions and 39 deletions
|
@ -680,7 +680,8 @@ static void css_update_chnmon(SubchDev *sch)
|
|||
count = lduw_phys(&address_space_memory,
|
||||
channel_subsys->chnmon_area + offset);
|
||||
count++;
|
||||
stw_phys(channel_subsys->chnmon_area + offset, count);
|
||||
stw_phys(&address_space_memory,
|
||||
channel_subsys->chnmon_area + offset, count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -77,10 +77,10 @@ void s390_virtio_reset_idx(VirtIOS390Device *dev)
|
|||
for (i = 0; i < num_vq; i++) {
|
||||
idx_addr = virtio_queue_get_avail_addr(dev->vdev, i) +
|
||||
VIRTIO_VRING_AVAIL_IDX_OFFS;
|
||||
stw_phys(idx_addr, 0);
|
||||
stw_phys(&address_space_memory, idx_addr, 0);
|
||||
idx_addr = virtio_queue_get_used_addr(dev->vdev, i) +
|
||||
VIRTIO_VRING_USED_IDX_OFFS;
|
||||
stw_phys(idx_addr, 0);
|
||||
stw_phys(&address_space_memory, idx_addr, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,9 @@ void s390_virtio_device_sync(VirtIOS390Device *dev)
|
|||
virtio_queue_set_vector(dev->vdev, i, i);
|
||||
stq_be_phys(&address_space_memory,
|
||||
vq + VIRTIO_VQCONFIG_OFFS_ADDRESS, vring);
|
||||
stw_be_phys(vq + VIRTIO_VQCONFIG_OFFS_NUM, virtio_queue_get_num(dev->vdev, i));
|
||||
stw_be_phys(&address_space_memory,
|
||||
vq + VIRTIO_VQCONFIG_OFFS_NUM,
|
||||
virtio_queue_get_num(dev->vdev, i));
|
||||
}
|
||||
|
||||
cur_offs = dev->dev_offs;
|
||||
|
|
|
@ -474,7 +474,8 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
|
|||
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);
|
||||
stw_phys(&address_space_memory,
|
||||
ccw.cda + sizeof(vq_config.index), vq_config.num_max);
|
||||
sch->curr_status.scsw.count = ccw.count - sizeof(vq_config);
|
||||
ret = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue