diff options
author | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2013-12-17 15:22:06 +1000 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2014-02-11 22:57:32 +1000 |
commit | 5ce5944dc0ffdc43c11b5cad11e526f699aabe4c (patch) | |
tree | 5969aafd8a4716d4bc43422711c38b8182a13bc5 /hw/virtio | |
parent | 2198a121434b806636318d62c89595c1955e825a (diff) | |
download | qemu-5ce5944dc0ffdc43c11b5cad11e526f699aabe4c.zip qemu-5ce5944dc0ffdc43c11b5cad11e526f699aabe4c.tar.gz qemu-5ce5944dc0ffdc43c11b5cad11e526f699aabe4c.tar.bz2 |
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>
Diffstat (limited to 'hw/virtio')
-rw-r--r-- | hw/virtio/virtio.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 4606e68..aeabf3a 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -180,21 +180,23 @@ static inline void vring_used_idx_set(VirtQueue *vq, uint16_t val) { hwaddr pa; pa = vq->vring.used + offsetof(VRingUsed, idx); - stw_phys(pa, val); + stw_phys(&address_space_memory, pa, val); } static inline void vring_used_flags_set_bit(VirtQueue *vq, int mask) { hwaddr pa; pa = vq->vring.used + offsetof(VRingUsed, flags); - stw_phys(pa, lduw_phys(&address_space_memory, pa) | mask); + stw_phys(&address_space_memory, + pa, lduw_phys(&address_space_memory, pa) | mask); } static inline void vring_used_flags_unset_bit(VirtQueue *vq, int mask) { hwaddr pa; pa = vq->vring.used + offsetof(VRingUsed, flags); - stw_phys(pa, lduw_phys(&address_space_memory, pa) & ~mask); + stw_phys(&address_space_memory, + pa, lduw_phys(&address_space_memory, pa) & ~mask); } static inline void vring_avail_event(VirtQueue *vq, uint16_t val) @@ -204,7 +206,7 @@ static inline void vring_avail_event(VirtQueue *vq, uint16_t val) return; } pa = vq->vring.used + offsetof(VRingUsed, ring[vq->vring.num]); - stw_phys(pa, val); + stw_phys(&address_space_memory, pa, val); } void virtio_queue_set_notification(VirtQueue *vq, int enable) |