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/syborg_virtio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hw/syborg_virtio.c') diff --git a/hw/syborg_virtio.c b/hw/syborg_virtio.c index 00c7be8c8f..6de952c938 100644 --- a/hw/syborg_virtio.c +++ b/hw/syborg_virtio.c @@ -131,9 +131,7 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, } switch (offset >> 2) { case SYBORG_VIRTIO_GUEST_FEATURES: - if (vdev->set_features) - vdev->set_features(vdev, value); - vdev->guest_features = value; + virtio_set_features(vdev, value); break; case SYBORG_VIRTIO_QUEUE_BASE: if (value == 0) -- cgit 1.4.1