Received: from eggs.gnu.org ([2001:4830:134:3::10]:60489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlEcQ-0004ef-9Q for qemu-devel@nongnu.org; Fri, 16 May 2014 05:40:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlEcL-0001pb-G8 for qemu-devel@nongnu.org; Fri, 16 May 2014 05:39:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlEcL-0001pW-8H for qemu-devel@nongnu.org; Fri, 16 May 2014 05:39:53 -0400 Date: Fri, 16 May 2014 17:40:00 +0800 From: Fam Zheng Message-ID: <20140516094000.GK1941@T430.nay.redhat.com> References: <20140514154130.10746.1412.stgit@bahia.local> <20140514154137.10746.94708.stgit@bahia.local> <20140515060425.GA31192@grmbl.mre> <20140515062351.GB14456@redhat.com> <20140515064635.GB31192@grmbl.mre> <20140515090449.2db0cbe0@bahia.local> <537486D2.1060609@suse.de> <20140515120826.050cf6f8@bahia.local> <20140516091424.GJ1941@T430.nay.redhat.com> <5375D8D4.4090901@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <5375D8D4.4090901@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Kevin Wolf , Stefan Hajnoczi , Juan Quintela , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Alexander Graf , Anthony Liguori , Amit Shah , Paolo Bonzini , Greg Kurz On Fri, 05/16 11:22, Andreas F=E4rber wrote: > Am 16.05.2014 11:14, schrieb Fam Zheng: > > On Thu, 05/15 12:08, Greg Kurz wrote: > >>>> The main problem I see is that virtio sucks: as you see in patch 8= , we have > >>>> to be careful not to call vring or virtqueue stuff before the devi= ce knows > >>>> its endianness or it breaks... I need to study how the virtio-bus = gets > >>>> migrated to ensure the endian section is streamed before the devic= es. > >>> > >>> There is no ordering guarantee. The state needs to be migrated in t= he > >>> device or bus where it sits, if post-load processing is required; i= .e., > >>> if it's in VirtIODevice then something like this series, if it were= on > >>> VirtioBus exclusively (device asking bus for its endianness each ti= me > >>> and does not do post-load stuff) then endianness could be migrated = as a > >>> new bus section. Not sure if that would help the "broken" state tho= ugh? > >>> > >> > >> IIRW the "broken" state was proposed as a per-device property... > >=20 > > Yes. >=20 > Sure, and that makes sense, but we do have a 1:1 relation of bus/device= , > or does virtio-mmio support more? If device doesn't work for some > reason, we could (mis)use the bus as fallback then. >=20 FWIW, I just realized that "broken" may be loaded from device status bit = in the future, so we don't need to migrate the field separately: https://tools.oasis-open.org/issues/browse/VIRTIO-98 Fam