From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnNRx-0001E2-Kv for qemu-devel@nongnu.org; Thu, 22 May 2014 03:30:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnNRr-0007gN-Bl for qemu-devel@nongnu.org; Thu, 22 May 2014 03:30:01 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:43773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnNRr-0007em-5c for qemu-devel@nongnu.org; Thu, 22 May 2014 03:29:55 -0400 Received: by mail-pb0-f45.google.com with SMTP id um1so2250731pbc.4 for ; Thu, 22 May 2014 00:29:54 -0700 (PDT) Message-ID: <537DA76F.6060706@ozlabs.ru> Date: Thu, 22 May 2014 17:29:51 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1399884392-5690-1-git-send-email-aik@ozlabs.ru> In-Reply-To: <1399884392-5690-1-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] spapr_iommu: Replace @instance_id with LIOBN for migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alexander Graf On 05/12/2014 06:46 PM, Alexey Kardashevskiy wrote: > SPAPR IOMMU is a bus-less device and therefore its only ID in > migration stream is an instance id which is not reliable ID > as it depends on the command line parameters order. Since > libvirt may change the order, we need something better than that. > > This removes VMSD descriptor from the class definitiion and > registers it with @liobn as an intance ID to let the destination > side find the right device to receive migration data. Ping? > > Signed-off-by: Alexey Kardashevskiy > --- > hw/ppc/spapr_iommu.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c > index 72493d8..7c3f8c2 100644 > --- a/hw/ppc/spapr_iommu.c > +++ b/hw/ppc/spapr_iommu.c > @@ -140,6 +140,9 @@ static int spapr_tce_table_realize(DeviceState *dev) > > QLIST_INSERT_HEAD(&spapr_tce_tables, tcet, list); > > + vmstate_register(DEVICE(tcet), tcet->liobn, &vmstate_spapr_tce_table, > + tcet); > + > return 0; > } > > @@ -323,7 +326,6 @@ int spapr_tcet_dma_dt(void *fdt, int node_off, const char *propname, > static void spapr_tce_table_class_init(ObjectClass *klass, void *data) > { > DeviceClass *dc = DEVICE_CLASS(klass); > - dc->vmsd = &vmstate_spapr_tce_table; > dc->init = spapr_tce_table_realize; > dc->reset = spapr_tce_reset; > > -- Alexey