The feature bitmap in the s390 virtio machine is little endian. To
address for that, we need to bswap the values after reading them out.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
cur_offs += num_vq * VIRTIO_VQCONFIG_LEN;
/* Sync feature bitmap */
- stl_phys(cur_offs, dev->host_features);
+ stl_phys(cur_offs, bswap32(dev->host_features));
dev->feat_offs = cur_offs + dev->feat_len;
cur_offs += dev->feat_len * 2;
/* Update guest supported feature bitmap */
- features = ldl_phys(dev->feat_offs);
+ features = bswap32(ldl_phys(dev->feat_offs));
if (vdev->set_features) {
vdev->set_features(vdev, features);
}