From: Alex Bligh <alex@alex.org.uk>
To: qemu-devel@nongnu.org
Cc: "Ryan Harper" <ryan.harper@canonical.com>,
"Serge Hallyn" <serge.hallyn@canonical.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Libvirt <libvir-list@redhat.com>,
"Serge Hallyn" <serge.hallyn@ubuntu.com>,
"Alexander Graf" <agraf@suse.de>,
"Bruce Rogers" <brogers@suse.com>,
"quintela@redhat.com" <quintela@redhat.com>,
"Alex Bligh" <alex@alex.org.uk>,
"Cole Robinson" <crobinso@redhat.com>,
"Amit Shah" <amit.shah@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
"Serge E. Hallyn" <serge@hallyn.com>
Subject: [Qemu-devel] [PATCH v3 0/2] Add machine type pc-1.0-qemu-kvm for live migrate compatibility with qemu-kvm
Date: Sun, 21 Sep 2014 15:38:57 +0100 [thread overview]
Message-ID: <1411310339-27733-1-git-send-email-alex@alex.org.uk> (raw)
This patch series adds inbound migrate capability from qemu-kvm version
1.0. The main ideas are those set out in Cole Robinson's patch here:
http://pkgs.fedoraproject.org/cgit/qemu.git/tree/0001-Fix-migration-from-qemu-kvm.patch?h=f20
however, rather than patching statically (and breaking inbound
migration on existing machine types), I have added a new machine
type (pc-1.0-qemu-kvm) without affecting any other machine types.
The existing pc-1.0 machine type is renamed to pc-1.0-qemu-git,
with pc-1.0 becoming an alias for one or another, as selected
by a configure option (defaulting to pc-1.0-qemu-git, IE no
change).
Two aproaches are taken:
* In hw/timer/i8254_common.c, the VMSTATE_UINT32_TEST macro
is used to test the version for the irq_disable flags,
allowing version 3 or more, or version 2 for an inbound
migrate from qemu-kvm (only).
* In hw/acpi/piix4.c, qemu-kvm incorrectly uses version 2 for
a version 3 structure, causing acpi_load_old to be used.
acpi_load_old detects this situation based on the machine type
and restarts the attempt to load the vmstate using a
customised VMStateDescription. The above cleaner approach is
unavailable here.
I developed this on qemu 2.0 but have forward ported it (trivially)
to master. My testing has been on a VM live-migrated-to-file from
Ubuntu Precise qemu-kvm 1.0.
I have given this a moderate degree of testing but it could do
with more.
Note that certain hardware devices (including QXL) will not
migrate properly due to a fundamental difference in their internal
state between versions.
Also note that (as expected) migration from qemu-2.x to qemu-1.0
will not work, even if the machine types are the same.
Alex Bligh (2):
Add machine type pc-1.0-qemu-kvm for live migrate compatibility with
qemu-kvm
Add configure option --enable-pc-1-0-qemu-kvm
configure | 12 ++++++++++++
hw/acpi/piix4.c | 47 +++++++++++++++++++++++++++++++++++++++++++++--
hw/i386/pc_piix.c | 38 +++++++++++++++++++++++++++++++++++++-
hw/timer/i8254_common.c | 10 +++++++++-
4 files changed, 103 insertions(+), 4 deletions(-)
--
1.7.9.5
next reply other threads:[~2014-09-21 14:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-21 14:38 Alex Bligh [this message]
2014-09-21 14:38 ` [Qemu-devel] [PATCH v3 1/2] Add machine type pc-1.0-qemu-kvm for live migrate compatibility with qemu-kvm Alex Bligh
2014-09-22 11:50 ` Michael S. Tsirkin
2014-09-22 12:28 ` Alex Bligh
2014-09-22 12:38 ` Michael S. Tsirkin
2014-09-21 14:38 ` [Qemu-devel] [PATCH v3 2/2] Add configure option --enable-pc-1-0-qemu-kvm Alex Bligh
2014-09-22 11:36 ` Michael S. Tsirkin
2014-09-22 11:42 ` [Qemu-devel] [libvirt] " Daniel P. Berrange
2014-09-22 11:53 ` Michael S. Tsirkin
2014-09-22 15:24 ` Markus Armbruster
2014-09-22 15:36 ` Michael S. Tsirkin
2014-09-22 15:47 ` Serge Hallyn
2014-09-22 15:44 ` Paolo Bonzini
2014-09-22 17:30 ` Alex Bligh
2014-09-22 19:10 ` Paolo Bonzini
2014-09-22 19:36 ` Alex Bligh
2014-09-23 0:12 ` Serge Hallyn
2014-09-22 11:50 ` [Qemu-devel] " Alex Bligh
2014-09-22 12:10 ` Michael S. Tsirkin
2014-09-22 13:05 ` Alex Bligh
2014-09-22 15:45 ` Andreas Färber
2014-09-22 16:54 ` Alex Bligh
2014-09-22 17:26 ` Markus Armbruster
2014-09-23 3:46 ` Michael S. Tsirkin
2014-09-23 3:44 ` Michael S. Tsirkin
2014-09-22 15:32 ` Markus Armbruster
2014-09-22 17:21 ` Michael S. Tsirkin
2014-09-23 7:59 ` Markus Armbruster
2014-09-23 8:24 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411310339-27733-1-git-send-email-alex@alex.org.uk \
--to=alex@alex.org.uk \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=amit.shah@redhat.com \
--cc=brogers@suse.com \
--cc=crobinso@redhat.com \
--cc=libvir-list@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=ryan.harper@canonical.com \
--cc=serge.hallyn@canonical.com \
--cc=serge.hallyn@ubuntu.com \
--cc=serge@hallyn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).