From ad0c93328dcb7a0ad68a68d0f66ea1949ebaaa2d Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 24 Nov 2011 13:28:52 +0100 Subject: 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 Signed-off-by: Anthony Liguori --- hw/s390-virtio-bus.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'hw/s390-virtio-bus.c') diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c index 0ce6406b6..c4b9a99e6 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) -- cgit v1.2.3