aboutsummaryrefslogtreecommitdiff
path: root/hw/s390-virtio-bus.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-11-24 13:28:52 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-11-28 11:36:28 -0600
commitad0c93328dcb7a0ad68a68d0f66ea1949ebaaa2d (patch)
treed63b95103e8003a2aa5592b3d6bf9b8fbd92ff40 /hw/s390-virtio-bus.c
parentae0f940e6b4f5177892dd6a12762282fa9089972 (diff)
virtio: add and use virtio_set_features
vdev->guest_features is not masking features that are not supported by the guest. Fix this by introducing a common wrapper to be used by all virtio bus implementations. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/s390-virtio-bus.c')
-rw-r--r--hw/s390-virtio-bus.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index 0ce6406b6d..c4b9a99e6e 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -254,10 +254,7 @@ void s390_virtio_device_update_status(VirtIOS390Device *dev)
/* Update guest supported feature bitmap */
features = bswap32(ldl_be_phys(dev->feat_offs));
- if (vdev->set_features) {
- vdev->set_features(vdev, features);
- }
- vdev->guest_features = features;
+ virtio_set_features(vdev, features);
}
VirtIOS390Device *s390_virtio_bus_console(VirtIOS390Bus *bus)