[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] virtio: set guest_features before calling set_f
From: |
Alon Levy |
Subject: |
[Qemu-devel] [PATCH 1/2] virtio: set guest_features before calling set_features callback, not after |
Date: |
Mon, 23 Apr 2012 14:26:23 +0300 |
We could drop the features parameter but that's a little more work and
it's not really needed.
Signed-off-by: Alon Levy <address@hidden>
---
hw/virtio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio.c b/hw/virtio.c
index 064aecf..aeddc81 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -770,10 +770,10 @@ int virtio_set_features(VirtIODevice *vdev, uint32_t val)
bool bad = (val & ~supported_features) != 0;
val &= supported_features;
+ vdev->guest_features = val;
if (vdev->set_features) {
vdev->set_features(vdev, val);
}
- vdev->guest_features = val;
return bad ? -1 : 0;
}
--
1.7.10