diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/virtio/virtio-pci.c | 2 | ||||
-rw-r--r-- | hw/virtio/virtio.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 8fc3c4ea9b..7805bddc74 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -977,7 +977,7 @@ static uint64_t virtio_pci_common_read(void *opaque, hwaddr addr, val = vdev->status; break; case VIRTIO_PCI_COMMON_CFGGENERATION: - val = 0; /* TODO */ + val = vdev->generation; break; case VIRTIO_PCI_COMMON_Q_SELECT: val = vdev->queue_sel; diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 8a6ebae368..cae5ecab19 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -930,6 +930,7 @@ void virtio_notify_config(VirtIODevice *vdev) return; vdev->isr |= 0x03; + vdev->generation++; virtio_notify_vector(vdev, vdev->config_vector); } |