From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yae1r-00011Y-RO for qemu-devel@nongnu.org; Wed, 25 Mar 2015 01:39:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yae1o-0006pd-7o for qemu-devel@nongnu.org; Wed, 25 Mar 2015 01:38:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yae1o-0006pG-08 for qemu-devel@nongnu.org; Wed, 25 Mar 2015 01:38:56 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2P5csZG005393 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 25 Mar 2015 01:38:54 -0400 Date: Wed, 25 Mar 2015 06:38:52 +0100 From: "Michael S. Tsirkin" Message-ID: <20150325063811-mutt-send-email-mst@redhat.com> References: <5511E1D4.6030908@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5511E1D4.6030908@redhat.com> Subject: Re: [Qemu-devel] virtconsole migration regression from 2.2.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cole Robinson Cc: Amit Shah , qemu-devel On Tue, Mar 24, 2015 at 06:14:44PM -0400, Cole Robinson wrote: > I'm hitting an error migrating from stock v2.2.0 to git master: > > 2015-03-24T21:42:07.731317Z qemu-system-x86_64: error while loading state for > instance 0x0 of device '0000:00:05.0/virtio-console' > 2015-03-24T21:42:07.731392Z qemu-system-x86_64: load of migration failed: > Invalid argument > > I'm using libvirt's managedsave, which is migrate to/from file. I bisected to > this commit: > > commit 9b70c1790acacae54d559d38ca69186a85040bb8 > Author: Michael S. Tsirkin > Date: Mon Feb 16 22:36:26 2015 +0100 > > virtio-serial: switch to standard-headers > > Problem seems to be that the old virtio_console_config structure was > different, missing the emerg_wr field. If I apply this patch: > > diff --git a/include/standard-headers/linux/virtio_console.h > b/include/standard-headers/linux/virtio_console.h > index 0dedc9e..242a0c5 100644 > --- a/include/standard-headers/linux/virtio_console.h > +++ b/include/standard-headers/linux/virtio_console.h > @@ -50,8 +50,6 @@ struct virtio_console_config { > uint16_t rows; > /* max. number of ports this device can hold */ > uint32_t max_nr_ports; > - /* emergency write register */ > - uint32_t emerg_wr; > } QEMU_PACKED; > > > My VMs restore correctly. I assume that change isn't acceptable as-is though... Thanks! I see the problem, will fix it shortly. > Here's the massive libvirt command line: > > /home/crobinso/src/qemu/x86_64-softmmu/qemu-system-x86_64 -name > migrateion-tester.py-vm -S -machine pc-i440fx-2.2,accel=kvm,usb=off -cpu > Opteron_G4,+nodeid_msr,+wdt,+skinit,+ibs,+osvw,+cr8legacy,+extapic,+cmp_legacy,+fxsr_opt,+mmxext,+osxsave,+monitor,+ht,+vme > -m 2048 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid > ce2a1280-78e5-7233-3f67-139dfedfdfe9 -no-user-config -nodefaults -chardev > socket,id=charmonitor,path=/var/lib/libvirt/qemu/migrateion-tester.py-vm.monitor,server,nowait > -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown > -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device > virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive > file=/mnt/data/devel/images/ztester-f18-migrate-overlay.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 > -device > virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 > -netdev tap,fd=27,id=hostnet0,vhost=on,vhostfd=28 -device > virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:40:ee:0b,bus=pci.0,addr=0x3 -chardev > spicevmc,id=charchannel0,name=vdagent -device > virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 > -chardev pty,id=charconsole0 -device > virtconsole,chardev=charconsole0,id=console0 -device usb-tablet,id=input0 > -spice > port=5901,tls-port=5902,addr=127.0.0.1,disable-ticketing,x509-dir=/etc/pki/libvirt-spice,seamless-migration=on > -device > qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,bus=pci.0,addr=0x2 > -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device > hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -incoming fd:24 -device > virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -snapshot -msg timestamp=on > > > I tried to reduce it to a minimal reproducer but I couldn't trigger it, but I > didn't try too long. I can test any proposed fix though. > > Thanks, > Cole