Revision 04bc74ed hw/s390-virtio-bus.c
b/hw/s390-virtio-bus.c | ||
---|---|---|
166 | 166 |
(vq * VIRTIO_VQCONFIG_LEN) + |
167 | 167 |
VIRTIO_VQCONFIG_OFFS_TOKEN; |
168 | 168 |
|
169 |
return ldq_phys(token_off); |
|
169 |
return ldq_be_phys(token_off);
|
|
170 | 170 |
} |
171 | 171 |
|
172 | 172 |
static ram_addr_t s390_virtio_device_num_vq(VirtIOS390Device *dev) |
... | ... | |
220 | 220 |
vring = s390_virtio_next_ring(bus); |
221 | 221 |
virtio_queue_set_addr(dev->vdev, i, vring); |
222 | 222 |
virtio_queue_set_vector(dev->vdev, i, i); |
223 |
stq_phys(vq + VIRTIO_VQCONFIG_OFFS_ADDRESS, vring); |
|
224 |
stw_phys(vq + VIRTIO_VQCONFIG_OFFS_NUM, virtio_queue_get_num(dev->vdev, i)); |
|
223 |
stq_be_phys(vq + VIRTIO_VQCONFIG_OFFS_ADDRESS, vring);
|
|
224 |
stw_be_phys(vq + VIRTIO_VQCONFIG_OFFS_NUM, virtio_queue_get_num(dev->vdev, i));
|
|
225 | 225 |
} |
226 | 226 |
|
227 | 227 |
cur_offs = dev->dev_offs; |
... | ... | |
229 | 229 |
cur_offs += num_vq * VIRTIO_VQCONFIG_LEN; |
230 | 230 |
|
231 | 231 |
/* Sync feature bitmap */ |
232 |
stl_phys(cur_offs, bswap32(dev->host_features));
|
|
232 |
stl_le_phys(cur_offs, dev->host_features);
|
|
233 | 233 |
|
234 | 234 |
dev->feat_offs = cur_offs + dev->feat_len; |
235 | 235 |
cur_offs += dev->feat_len * 2; |
... | ... | |
253 | 253 |
|
254 | 254 |
/* Update guest supported feature bitmap */ |
255 | 255 |
|
256 |
features = bswap32(ldl_phys(dev->feat_offs)); |
|
256 |
features = bswap32(ldl_be_phys(dev->feat_offs));
|
|
257 | 257 |
if (vdev->set_features) { |
258 | 258 |
vdev->set_features(vdev, features); |
259 | 259 |
} |
Also available in: Unified diff