virtio fix for 2.4
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(+)
[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.
--- include/hw/virtio/virtio.h | 6 +++++ hw/virtio/virtio.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+)
include/hw/virtio/virtio.h +6 -0
@@ -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
Peter Maydell
AppliedQuoted 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.gittags/for_upstreamfor you to fetch changes up to
74aae7b22b8a67cf31937b2f4bdefe2881e799e9:virtio: fix 1.0 virtqueue migration (2015-08-05 16:56:34 +0300)
----------------------------------------------------------------
virtio fix for 2.4Fixes 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
Signed-off-by Michael S. Tsirkin <[email protected]>----------------------------------------------------------------
Jason Wang (1):
virtio: fix 1.0 virtqueue migration
Applied, thanks.
-- PMM