From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWhxd-0002f9-QV for qemu-devel@nongnu.org; Wed, 24 Sep 2014 04:30:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWhxa-0005rY-Vi for qemu-devel@nongnu.org; Wed, 24 Sep 2014 04:30:05 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:45328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWhxa-0005jG-NL for qemu-devel@nongnu.org; Wed, 24 Sep 2014 04:30:02 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) From: Alex Bligh In-Reply-To: <87a95p78ao.fsf@blackfin.pond.sub.org> Date: Wed, 24 Sep 2014 09:29:41 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1411414496-46245-1-git-send-email-alex@alex.org.uk> <87a95p78ao.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH v4] Add machine parameter qemu-kvm-migration for live migrate compatibility with qemu-kvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Ryan Harper , Serge Hallyn , "Michael S. Tsirkin" , Libvirt , Serge Hallyn , "qemu-devel@nongnu.org" , Alexander Graf , "quintela@redhat.com" , Alex Bligh , Cole Robinson , Amit Shah , Bruce Rogers , =?iso-8859-1?Q?Andreas_F=E4rber?= , "Serge E. Hallyn" Markus, On 24 Sep 2014, at 09:05, Markus Armbruster wrote: > Alex Bligh writes: >=20 >> 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-q= emu-kvm.patch?h=3Df20 >> however, rather than patching statically (and breaking inbound >> migration on existing machine types), I have added a new machine >> parameter (qemu-kvm-migration) which when turned on affects the = pc-1.0 >> machine type. Usage: >> -machine pc-1.0,qemu-kvm-migration=3Don >=20 > Forgive me if this has been discussed already: why not simply a = separate > machine type "pc-1.0-qemu-kvm"? That's what v2 of the patch set does (and I prefer v2). However, mst wanted it done this way. >=20 >> Three aproaches are taken: >>=20 >> * cirrus-vga.vgamem_mb defaults to 16 rather than 8. In order to >> keep -global cirrus-vga.vgamem_mb working even with >> qemu-kvm-migration=3Don, this is monkey-patched into the = default >> value of the MachineState structure's = compat_props list. >=20 > This part fires only for pc-1.0, because it's in > pc_early_init_pci_1_0(). Yes, intentional. I should have noted that. That's because qemu-kvm-migration=3Don the VRAM change was designed to work only with pc-1.0. I haven't looked at trying to make other (older) qemu-kvm machine migrations work, but (with the stuff below), I would guess it would work with the appropriate command line options for VRAM size. Obviously I could put early init elsewhere. >> * 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). >>=20 >> * 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. >=20 > These parts apply to all machine types, don't they? They apply only when qemu-kvm-migration=3Don is selected, but to any machine type; however machine types newer than pc-1.0 will be exporting v3 I think anyway. >> Changes since v1: >> * Do not use a machine type, use a machine parameter. >=20 > Okay, it has been discussed already. I'd appreciate a brief recap all > the same. See above. I preferred the machine type. But I got to learn more about QOM on the way :-) --=20 Alex Bligh