virtio-mmio: fix features negotiation problem virtio-mmio should invoke virtio_set_features() when it gets VIRTIO_MMIO_GUESTFEATURES command, since some devices (at least, virtio-net) register their own set_features method and setup their features in that.
Signed-off-by: Ying-Shiuan Pan <ys...@itri.org.tw> --- hw/virtio-mmio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio-mmio.c b/hw/virtio-mmio.c index 05d886a..729faad 100644 --- a/hw/virtio-mmio.c +++ b/hw/virtio-mmio.c @@ -186,7 +186,7 @@ static void virtio_mmio_write(void *opaque, target_phys_addr_t offset, break; case VIRTIO_MMIO_GUESTFEATURES: if (!proxy->guest_features_sel) { - vdev->guest_features = value; + virtio_set_features(vdev, value); } break; case VIRTIO_MMIO_GUESTFEATURESSEL: --