Skip to contentSkip to conversation

virtio fix for 2.4

GIT PULL Applied Michael S. Tsirkin 2 participants 3 messages Aug 5, 2015

lore
Share & tools
lore
#0 lore raw

The following changes since commit 2be4f242b50a84bf360df02480b173bfed161107:

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-08-04 16:51:24 +0100)

are available in the git repository at:

git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream

for you to fetch changes up to 74aae7b22b8a67cf31937b2f4bdefe2881e799e9:

virtio: fix 1.0 virtqueue migration (2015-08-05 16:56:34 +0300)

----------------------------------------------------------------
virtio fix for 2.4

Fixes migration in virtio 1 mode.
We still have a known bug with memory hotplug, it doesn't look like we can fix that in time for 2.4.

----------------------------------------------------------------
Jason Wang (1):
virtio: fix 1.0 virtqueue migration

 include/hw/virtio/virtio.h |  6 +++++
 hw/virtio/virtio.c         | 56 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)
#1 lore raw

[Qemu-devel] [PULL 1/1] virtio: fix 1.0 virtqueue migration

From: Jason Wang <[email protected]>

1.0 does not requires physically-contiguous pages layout for a virtqueue. So we could not infer avail and used from desc. This means we need to migrate vring.avail and vring.used when host support virtio 1.0. This fixes malfunction of virtio 1.0 device after migration.

Cc Michael S. Tsirkin <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Dr. David Alan Gilbert <[email protected]>
---
 include/hw/virtio/virtio.h |  6 +++++
 hw/virtio/virtio.c         | 56 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)
include/hw/virtio/virtio.h +6 -0
index 59f0763..cccae89 100644
@@ -272,6 +272,12 @@ static inline bool virtio_has_feature(VirtIODevice *vdev, unsigned int fbit)
     return __virtio_has_feature(vdev->guest_features, fbit);
 }
 
+static inline bool virtio_host_has_feature(VirtIODevice *vdev,
+                                           unsigned int fbit)
+{
+    return __virtio_has_feature(vdev->host_features, fbit);
+}
+
 static inline bool virtio_is_big_endian(VirtIODevice *vdev)
 {
     if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
hw/virtio/virtio.c +56 -0

68 lines not on this page · raw message

Signature · 1 line
MST
#2 lore raw
In reply to Michael S. Tsirkin
Quoted 19 lines · Michael S. Tsirkin

The following changes since commit 2be4f242b50a84bf360df02480b173bfed161107:

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-08-04 16:51:24 +0100)

are available in the git repository at:

git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream

for you to fetch changes up to 74aae7b22b8a67cf31937b2f4bdefe2881e799e9:

virtio: fix 1.0 virtqueue migration (2015-08-05 16:56:34 +0300)

----------------------------------------------------------------
virtio fix for 2.4

Fixes migration in virtio 1 mode.
We still have a known bug with memory hotplug, it doesn't look like we can fix that in time for 2.4.

Quoted 5 lines

----------------------------------------------------------------
Jason Wang (1):
virtio: fix 1.0 virtqueue migration

Applied, thanks.

-- PMM