aboutsummaryrefslogtreecommitdiff
path: root/hw/syborg_virtio.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/syborg_virtio.c
parentae0f940e6b4f5177892dd6a12762282fa9089972 (diff)
downloadqemu-ad0c93328dcb7a0ad68a68d0f66ea1949ebaaa2d.zip
qemu-ad0c93328dcb7a0ad68a68d0f66ea1949ebaaa2d.tar.gz
qemu-ad0c93328dcb7a0ad68a68d0f66ea1949ebaaa2d.tar.bz2
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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/syborg_virtio.c b/hw/syborg_virtio.c
index 00c7be8..6de952c 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)