From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlElE-0000go-OT for qemu-devel@nongnu.org; Fri, 16 May 2014 05:49:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlEl6-0004qw-OF for qemu-devel@nongnu.org; Fri, 16 May 2014 05:49:04 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:40942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlEl6-0004qm-FQ for qemu-devel@nongnu.org; Fri, 16 May 2014 05:48:56 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 May 2014 10:48:54 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 507631B08061 for ; Fri, 16 May 2014 10:49:08 +0100 (BST) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s4G9mq2s655618 for ; Fri, 16 May 2014 09:48:52 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s4G9mqTI020239 for ; Fri, 16 May 2014 03:48:52 -0600 Date: Fri, 16 May 2014 11:48:47 +0200 From: Greg Kurz Message-ID: <20140516114847.114a3b54@bahia.local> In-Reply-To: <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> <20140516094000.GK1941@T430.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: Fam Zheng Cc: Kevin Wolf , Stefan Hajnoczi , Juan Quintela , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Alexander Graf , Anthony Liguori , Amit Shah , Paolo Bonzini , Andreas =?UTF-8?B?RsOkcmJlcg==?= On Fri, 16 May 2014 17:40:00 +0800 Fam Zheng wrote: > On Fri, 05/16 11:22, Andreas F=C3=A4rber 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 >=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: >=20 > https://tools.oasis-open.org/issues/browse/VIRTIO-98 >=20 > Fam >=20 Oh, if you are targetting virtio 1.0... all the virtio endian stuff I am working on is for legacy virtio. Unless you plan to do something for legacy, I guess our objectives differ. Cheers. --=20 Gregory Kurz kurzgreg@fr.ibm.com gkurz@linux.vnet.ibm.com Software Engineer @ IBM/Meiosys http://www.ibm.com Tel +33 (0)562 165 496 "Anarchy is about taking complete responsibility for yourself." Alan Moore.