All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] spapr_iommu: Replace @instance_id with LIOBN for migration
@ 2014-05-12  8:46 Alexey Kardashevskiy
  2014-05-22  7:29 ` Alexey Kardashevskiy
  2014-05-23 13:45 ` Alexander Graf
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2014-05-12  8:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

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.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 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;
 
-- 
1.9.rc0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] spapr_iommu: Replace @instance_id with LIOBN for migration
  2014-05-12  8:46 [Qemu-devel] [PATCH] spapr_iommu: Replace @instance_id with LIOBN for migration Alexey Kardashevskiy
@ 2014-05-22  7:29 ` Alexey Kardashevskiy
  2014-05-23 13:45 ` Alexander Graf
  1 sibling, 0 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2014-05-22  7:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, 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 <aik@ozlabs.ru>
> ---
>  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] spapr_iommu: Replace @instance_id with LIOBN for migration
  2014-05-12  8:46 [Qemu-devel] [PATCH] spapr_iommu: Replace @instance_id with LIOBN for migration Alexey Kardashevskiy
  2014-05-22  7:29 ` Alexey Kardashevskiy
@ 2014-05-23 13:45 ` Alexander Graf
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2014-05-23 13:45 UTC (permalink / raw)
  To: Alexey Kardashevskiy, qemu-devel; +Cc: qemu-ppc


On 12.05.14 10:46, 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.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

Thanks, applied to ppc-next.


Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-23 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-12  8:46 [Qemu-devel] [PATCH] spapr_iommu: Replace @instance_id with LIOBN for migration Alexey Kardashevskiy
2014-05-22  7:29 ` Alexey Kardashevskiy
2014-05-23 13:45 ` Alexander Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.