diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-11-24 13:28:52 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-28 11:36:28 -0600 |
commit | ad0c93328dcb7a0ad68a68d0f66ea1949ebaaa2d (patch) | |
tree | d63b95103e8003a2aa5592b3d6bf9b8fbd92ff40 /hw/syborg_virtio.c | |
parent | ae0f940e6b4f5177892dd6a12762282fa9089972 (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/syborg_virtio.c')
-rw-r--r-- | hw/syborg_virtio.c | 4 |
1 files changed, 1 insertions, 3 deletions
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) |