[Qemu-devel] [PATCH] migration: ensure htab_save_first completes after timeout

2016-02-10 Thread Jianjun Duan
htab_save_first_pass could return without finishing its work due to timeout. The patch checks if another invocation of it is necessary and will call it in htab_save_complete if necessary. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion

[Qemu-devel] [PATCH] spapr: ensure device trees are always associated with DRC

2016-04-15 Thread Jianjun Duan
for devices that were hotplugged on the source, but 'coldplugged' on the target. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 16 ++-- hw/ppc/spapr_pci.c | 12 +--- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spa

Re: [Qemu-devel] [PATCH] spapr: ensure device trees are always associated with DRC

2016-04-15 Thread Jianjun Duan
Please disregard this patch. It should be part of a sequence. Thanks, Jianjun On 04/15/2016 01:00 PM, Jianjun Duan wrote: There are possible racing situations involving hotplug events and guest migration. For cases where a hotplug event is migrated, or the guest is in the process of fetching

[Qemu-devel] [PATCH 0/5] migration: ensure hotplug and migration work together

2016-04-15 Thread Jianjun Duan
migration, ccs_list and pending_events of spapr state need be transmitted in migration. This patch also takes care of it. Especially, temporary cache is used for each of them to enable the transmission. Alexey Kardashevskiy (1): vmstate: Define VARRAY with VMS_ALLOC Jianjun Duan (4): spapr

[Qemu-devel] [PATCH 4/5] Migration: migrate ccs_list in spapr state

2016-04-15 Thread Jianjun Duan
VMSD for the queue. There also existence tests in place for the newly added fields in the spapr state VMSD to make sure forward migration is not broken. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 60 - hw/ppc/spapr_rtas.c

[Qemu-devel] [PATCH 1/5] spapr: ensure device trees are always associated with DRC

2016-04-15 Thread Jianjun Duan
for devices that were hotplugged on the source, but 'coldplugged' on the target. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 16 ++-- hw/ppc/spapr_pci.c | 12 +--- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spa

[Qemu-devel] [PATCH 2/5] Migration: Defined VMStateDescription struct for spapr_drc

2016-04-15 Thread Jianjun Duan
DRC state are migrated. Only those ones modifiable by guest actions or device add/remove operation are migrated. Signed-off-by: Jianjun Duan --- hw/ppc/spapr_drc.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 3173940..5f7a25f

[Qemu-devel] [PATCH 3/5] vmstate: Define VARRAY with VMS_ALLOC

2016-04-15 Thread Jianjun Duan
: Thomas Huth Signed-off-by: Jianjun Duan --- include/migration/vmstate.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 84ee355..1622638 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h

[Qemu-devel] [PATCH 5/5] Migration: migrate pending_events of spapr state

2016-04-15 Thread Jianjun Duan
create VMSD for the queue. We also have existence test in place for the newly added pending_events related fields in spapr state VMSD to make sure forward migration is not broken. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 53 ++ hw

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/5] spapr: ensure device trees are always associated with DRC

2016-04-21 Thread Jianjun Duan
On 04/19/2016 09:30 PM, David Gibson wrote: On Fri, Apr 15, 2016 at 01:33:01PM -0700, Jianjun Duan wrote: There are possible racing situations involving hotplug events and guest migration. For cases where a hotplug event is migrated, or the guest is in the process of fetching device tree at

Re: [Qemu-devel] [PATCH 2/5] Migration: Defined VMStateDescription struct for spapr_drc

2016-04-21 Thread Jianjun Duan
On 04/19/2016 09:32 PM, David Gibson wrote: On Fri, Apr 15, 2016 at 01:33:02PM -0700, Jianjun Duan wrote: To manage hotplug/unplug of dynamic resources such as PCI cards, memory, and CPU on sPAPR guests, a firmware abstraction known as a Dynamic Resource Connector (DRC) is used to assign a

Re: [Qemu-devel] [PATCH 4/5] Migration: migrate ccs_list in spapr state

2016-04-21 Thread Jianjun Duan
On 04/19/2016 10:14 PM, David Gibson wrote: On Fri, Apr 15, 2016 at 01:33:04PM -0700, Jianjun Duan wrote: ccs_list in spapr state maintains the device tree related information on the rtas side for hotplugged devices. In racing situations between hotplug events and migration operation, a rtas

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/5] Migration: Defined VMStateDescription struct for spapr_drc

2016-04-22 Thread Jianjun Duan
On 04/21/2016 09:25 PM, David Gibson wrote: > On Thu, Apr 21, 2016 at 10:03:56AM -0700, Jianjun Duan wrote: >> >> >> On 04/19/2016 09:32 PM, David Gibson wrote: >>> On Fri, Apr 15, 2016 at 01:33:02PM -0700, Jianjun Duan wrote: >>>> To manage hotplug/unp

Re: [Qemu-devel] [PATCH 4/5] Migration: migrate ccs_list in spapr state

2016-04-22 Thread Jianjun Duan
On 04/21/2016 09:28 PM, David Gibson wrote: > On Thu, Apr 21, 2016 at 10:22:10AM -0700, Jianjun Duan wrote: >> >> >> On 04/19/2016 10:14 PM, David Gibson wrote: >>> On Fri, Apr 15, 2016 at 01:33:04PM -0700, Jianjun Duan wrote: >>>> ccs_list in spa

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Jianjun Duan
On 05/25/2016 01:14 AM, Paolo Bonzini wrote: > > > On 24/05/2016 19:55, Jianjun Duan wrote: >> +/* >> + * Offsets of layout of a tail queue head. >> + */ >> +#define QTAILQ_FIRST_OFFSET(head_type) \ >> +((size_t) ((char *) &((head_type *)0

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Jianjun Duan
I will try to explain my design rationale in details here. 1 QTAILQ should only be accessed using the interfaces defined in queue.h. Its structs should not be directly used. So I created interfaces in queue.h to query about its layout. If the implementation is changed, these interfaces should be

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Jianjun Duan
On 05/25/2016 12:22 PM, Paolo Bonzini wrote: >> 1 QTAILQ should only be accessed using the interfaces defined in >> queue.h. Its structs should not be directly used. So I created >> interfaces in queue.h to query about its layout. If the implementation >> is changed, these interfaces should be ch

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-26 Thread Jianjun Duan
On 05/26/2016 12:11 AM, Paolo Bonzini wrote: > > > On 25/05/2016 22:17, Jianjun Duan wrote: >> >> >> On 05/25/2016 12:22 PM, Paolo Bonzini wrote: >>>> 1 QTAILQ should only be accessed using the interfaces defined in >>>> queue.h. It

[Qemu-devel] [QEMU RFC PATCH v3 0/6]Migration: ensure hotplug and migration work together

2016-05-31 Thread Jianjun Duan
): vmstate: Define VARRAY with VMS_ALLOC Jianjun Duan (5): Migration: Defined VMStateDescription struct for spapr_drc Migration: extend VMStateInfo Migration: migrate QTAILQ Migration: migrate ccs_list in spapr state Migration: migrate pending_events of spapr state hw/net/vmxnet3.c

[Qemu-devel] [QEMU RFC PATCH v3 2/6] vmstate: Define VARRAY with VMS_ALLOC

2016-05-31 Thread Jianjun Duan
: Thomas Huth Signed-off-by: Jianjun Duan --- include/migration/vmstate.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 30ecc44..6c65811 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h

[Qemu-devel] [QEMU RFC PATCH v3 1/6] Migration: Defined VMStateDescription struct for spapr_drc

2016-05-31 Thread Jianjun Duan
DRC state is a function pointer that cannot be migrated. We set it right after DRC state is migrated so that a migrated hot-unplug event could finish its work. Signed-off-by: Jianjun Duan --- hw/ppc/spapr_drc.c | 61 ++ hw/ppc/spapr_pci.c

[Qemu-devel] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ

2016-05-31 Thread Jianjun Duan
implementation details about QTAILQ in the migration code. Signed-off-by: Jianjun Duan --- include/migration/vmstate.h | 22 + include/qemu/queue.h| 32 ++ migration/vmstate.c | 79 + 3 files changed, 133 insertions

[Qemu-devel] [QEMU RFC PATCH v3 6/6] Migration: migrate pending_events of spapr state

2016-05-31 Thread Jianjun Duan
broken. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 33 + hw/ppc/spapr_events.c | 22 +- include/hw/ppc/spapr.h | 3 ++- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f13584c

[Qemu-devel] [QEMU RFC PATCH v3 3/6] Migration: extend VMStateInfo

2016-05-31 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. Signed-off-by: Jianjun Duan --- hw/net/vmxnet3.c| 18 ++--- hw/nvram/eeprom93xx.c

[Qemu-devel] [QEMU RFC PATCH v3 5/6] Migration: migrate ccs_list in spapr state

2016-05-31 Thread Jianjun Duan
broken. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 44e401a..f13584c 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1266,6 +1266,36 @@ static bool version_before_3

Re: [Qemu-devel] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ

2016-05-31 Thread Jianjun Duan
On 05/31/2016 12:54 PM, Paolo Bonzini wrote: > > > - Original Message - >> From: "Jianjun Duan" >> To: qemu-devel@nongnu.org >> Cc: qemu-...@nongnu.org, du...@linux.vnet.ibm.com, dmi...@daynix.com, "peter >> mayd

Re: [Qemu-devel] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ

2016-06-01 Thread Jianjun Duan
On 06/01/2016 08:29 AM, Paolo Bonzini wrote: > > > On 31/05/2016 23:53, Jianjun Duan wrote: >> >> >> On 05/31/2016 12:54 PM, Paolo Bonzini wrote: >>> >>> >>> - Original Message - >>>> From: "Jianjun

Re: [Qemu-devel] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ

2016-06-02 Thread Jianjun Duan
Hi Sascha, On 06/02/2016 08:01 AM, Sascha Silbe wrote: > Dear Jianjun, > > Jianjun Duan writes: > > [include/migration/vmstate.h] >> @@ -185,6 +185,8 @@ enum VMStateFlags { >> * to determine the number of entries in the array. Only valid in >> * c

Re: [Qemu-devel] [QEMU RFC PATCH v3 1/6] Migration: Defined VMStateDescription struct for spapr_drc

2016-06-02 Thread Jianjun Duan
On 06/01/2016 09:07 PM, David Gibson wrote: > On Tue, May 31, 2016 at 11:02:39AM -0700, Jianjun Duan wrote: >> To manage hotplug/unplug of dynamic resources such as PCI cards, >> memory, and CPU on sPAPR guests, a firmware abstraction known as >> a Dynamic Resource Conne

Re: [Qemu-devel] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ

2016-06-03 Thread Jianjun Duan
On 06/02/2016 08:01 AM, Sascha Silbe wrote: > Dear Jianjun, > > Jianjun Duan writes: > > [include/migration/vmstate.h] >> @@ -185,6 +185,8 @@ enum VMStateFlags { >> * to determine the number of entries in the array. Only valid in >> * c

Re: [Qemu-devel] [Qemu-ppc] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ

2016-06-07 Thread Jianjun Duan
On 06/07/2016 07:43 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> Hi Sascha, >> >> On 06/02/2016 08:01 AM, Sascha Silbe wrote: >>> Dear Jianjun, >>> >>> Jianjun Duan writes: >>> >&g

[Qemu-devel] [QEMU RFC PATCH v4 3/6] migration: extend VMStateInfo

2016-06-08 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. Signed-off-by: Jianjun Duan --- hw/net/vmxnet3.c| 18 ++--- hw/nvram/eeprom93xx.c

[Qemu-devel] [QEMU RFC PATCH v4 2/6] migration: defined VMStateDescription struct for spapr_drc

2016-06-08 Thread Jianjun Duan
migration. Signed-off-by: Jianjun Duan --- hw/ppc/spapr_drc.c | 69 ++ hw/ppc/spapr_pci.c | 22 +++ include/hw/ppc/spapr_drc.h | 9 ++ 3 files changed, 100 insertions(+) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_d

[Qemu-devel] [QEMU RFC PATCH v4 0/6] migration: ensure hotplug and migration work together

2016-06-08 Thread Jianjun Duan
struct for spapr drc state to enable it. To fix the potential racing between hotplug events on guest and guest migration, ccs_list and pending_events of spapr state need be transmitted in migration. This patch also takes care of it. Jianjun Duan (6): migration: alternative way to set instance_

[Qemu-devel] [QEMU RFC PATCH v4 1/6] migration: alternative way to set instance_id in SaveStateEntry

2016-06-08 Thread Jianjun Duan
. Signed-off-by: Jianjun Duan --- include/hw/qdev-core.h | 6 ++ migration/savevm.c | 20 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 1ce02b2..28173a7 100644 --- a/include/hw/qdev-core.h +++ b/include

[Qemu-devel] [QEMU RFC PATCH v4 4/6] migration: migrate QTAILQ

2016-06-08 Thread Jianjun Duan
create some macros in qemu/queue.h to access a QTAILQ using pointer arithmetic. This ensures that we do not depend on the implementation details about QTAILQ in the migration code. Signed-off-by: Jianjun Duan --- include/migration/vmstate.h | 26 ++ include/qemu/queue.h

[Qemu-devel] [QEMU RFC PATCH v4 6/6] migration: migrate pending_events of spapr state

2016-06-08 Thread Jianjun Duan
broken. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 33 + hw/ppc/spapr_events.c | 22 +- include/hw/ppc/spapr.h | 3 ++- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 54a8af6

[Qemu-devel] [QEMU RFC PATCH v4 5/6] migration: migrate ccs_list in spapr state

2016-06-08 Thread Jianjun Duan
broken. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0636642..54a8af6 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1266,6 +1266,36 @@ static bool version_before_3

Re: [Qemu-devel] [QEMU RFC PATCH v4 0/6] migration: ensure hotplug and migration work together

2016-06-09 Thread Jianjun Duan
Yesterday I got delivery failure for all the recipients with email address at @redhat.com. Can somebody from Red Hat confirm if you have received the patches? If not I will resend them. Thanks, Jianjun On 06/08/2016 04:06 PM, Jianjun Duan wrote: > v4: - Introduce a way to set customi

[Qemu-devel] [QEMU RFC PATCH v4 0/6] migration: ensure hotplug and migration work together

2016-06-10 Thread Jianjun Duan
struct for spapr drc state to enable it. To fix the potential racing between hotplug events on guest and guest migration, ccs_list and pending_events of spapr state need be transmitted in migration. This patch also takes care of it. Jianjun Duan (6): migration: alternative way to set instance_

[Qemu-devel] [QEMU RFC PATCH v4 1/6] migration: alternative way to set instance_id in SaveStateEntry

2016-06-10 Thread Jianjun Duan
. Signed-off-by: Jianjun Duan --- include/hw/qdev-core.h | 6 ++ migration/savevm.c | 20 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 1ce02b2..28173a7 100644 --- a/include/hw/qdev-core.h +++ b/include

[Qemu-devel] [QEMU RFC PATCH v4 2/6] migration: spapr_drc: defined VMStateDescription struct

2016-06-10 Thread Jianjun Duan
migration. Signed-off-by: Jianjun Duan --- hw/ppc/spapr_drc.c | 69 ++ hw/ppc/spapr_pci.c | 22 +++ include/hw/ppc/spapr_drc.h | 9 ++ 3 files changed, 100 insertions(+) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_d

[Qemu-devel] [QEMU RFC PATCH v4 5/6] migration: spapr: migrate ccs_list in spapr state

2016-06-10 Thread Jianjun Duan
broken. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0636642..54a8af6 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1266,6 +1266,36 @@ static bool version_before_3

[Qemu-devel] [QEMU RFC PATCH v4 3/6] migration: extend VMStateInfo

2016-06-10 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. Signed-off-by: Jianjun Duan --- hw/net/vmxnet3.c| 18 ++--- hw/nvram/eeprom93xx.c

[Qemu-devel] [QEMU RFC PATCH v4 4/6] migration: migrate QTAILQ

2016-06-10 Thread Jianjun Duan
create some macros in qemu/queue.h to access a QTAILQ using pointer arithmetic. This ensures that we do not depend on the implementation details about QTAILQ in the migration code. Signed-off-by: Jianjun Duan --- include/migration/vmstate.h | 26 ++ include/qemu/queue.h

[Qemu-devel] [QEMU RFC PATCH v4 6/6] migration: spapr: migrate pending_events of spapr state

2016-06-10 Thread Jianjun Duan
broken. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 33 + hw/ppc/spapr_events.c | 22 +- include/hw/ppc/spapr.h | 3 ++- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 54a8af6

Re: [Qemu-devel] [QEMU RFC PATCH v4 0/6] migration: ensure hotplug and migration work together

2016-06-14 Thread Jianjun Duan
Hi all, I resent this because most folks at Red Hat seemed to have problems about receiving it the first time. Any comments are welcome. Thanks, Jianjun On 06/10/2016 09:44 AM, Jianjun Duan wrote: > v4: - Introduce a way to set customized instance_id in SaveStateEntry. Use it >

[Qemu-devel] [QEMU RFC PATCH v2 2/6] Migration: Defined VMStateDescription struct for spapr_drc

2016-05-24 Thread Jianjun Duan
DRC state is a function pointer that cannot be migrated. We set it right after DRC state is migrated so that a migrated hot-unplug event could finish its work. Signed-off-by: Jianjun Duan --- hw/ppc/spapr_drc.c | 61 ++ hw/ppc/spapr_pci.c

[Qemu-devel] [QEMU RFC PATCH v2 3/6] vmstate: Define VARRAY with VMS_ALLOC

2016-05-24 Thread Jianjun Duan
: Thomas Huth Signed-off-by: Jianjun Duan --- include/migration/vmstate.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 84ee355..1622638 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h

[Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-24 Thread Jianjun Duan
. Signed-off-by: Jianjun Duan --- include/migration/vmstate.h | 59 +++ include/qemu/queue.h| 38 migration/vmstate.c | 84 + 3 files changed, 181 insertions(+) diff --git a/include

[Qemu-devel] [QEMU RFC PATCH v2 5/6] Migration: migrate ccs_list in spapr state

2016-05-24 Thread Jianjun Duan
broken. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index ec18bee..88b6e3b 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1265,6 +1265,40 @@ static bool

[Qemu-devel] [QEMU RFC PATCH v2 1/6] spapr: ensure device trees are always associated with DRC

2016-05-24 Thread Jianjun Duan
for devices that were hotplugged on the source, but 'coldplugged' on the target. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 16 ++-- hw/ppc/spapr_pci.c | 12 +--- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spa

[Qemu-devel] [QEMU RFC PATCH v2 6/6] Migration: migrate pending_events of spapr state

2016-05-24 Thread Jianjun Duan
broken. Signed-off-by: Jianjun Duan --- hw/ppc/spapr.c | 38 ++ hw/ppc/spapr_events.c | 22 +- include/hw/ppc/spapr.h | 3 ++- 3 files changed, 53 insertions(+), 10 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index

[Qemu-devel] [QEMU RFC PATCH v2 0/6] Migration: ensure hotplug and migration work together

2016-05-24 Thread Jianjun Duan
VARRAY with VMS_ALLOC Jianjun Duan (5): spapr: ensure device trees are always associated with DRC Migration: Defined VMStateDescription struct for spapr_drc Migration: migrate QTAILQ Migration: migrate ccs_list in spapr state Migration: migrate pending_events of spapr state hw/ppc

[Qemu-devel] [QEMU PATCH v8 0/3] migration: migrate QTAILQ

2016-10-25 Thread Jianjun Duan
tach_cb field right after migration so that a migrated hot-unplug event could finish its course. (link: https://lists.nongnu.org/archive/html/qemu-devel/2016-05/msg04188.html) v1: - Inital version. (link: https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02601.html) Jianjun Duan

[Qemu-devel] [QEMU PATCH v8 2/3] migration: migrate QTAILQ

2016-10-25 Thread Jianjun Duan
. This approach will be used to transfer pending_events and ccs_list in spapr state. We also create some macros in qemu/queue.h to access a QTAILQ using pointer arithmetic. This ensures that we do not depend on the implementation details about QTAILQ in the migration code. Signed-off-by: Jianjun Duan

[Qemu-devel] [QEMU PATCH v8 1/3] migration: extend VMStateInfo

2016-10-25 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. Signed-off-by: Jianjun Duan --- hw/display/virtio-gpu.c | 6 ++- hw/intc/s390_flic_kvm.c | 6

[Qemu-devel] [QEMU PATCH v8 3/3] tests/migration: Add test for QTAILQ migration

2016-10-25 Thread Jianjun Duan
Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan --- tests/test-vmstate.c | 160 +++ 1 file changed, 160 insertions(+) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index d8da26f..a992408 100644

Re: [Qemu-devel] [QEMU PATCH v8 2/3] migration: migrate QTAILQ

2016-10-26 Thread Jianjun Duan
On 10/26/2016 09:53 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> >> >> On 10/26/2016 09:29 AM, Dr. David Alan Gilbert wrote: >>> * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >>>> Currently we cannot directly

Re: [Qemu-devel] [QEMU PATCH v8 2/3] migration: migrate QTAILQ

2016-10-26 Thread Jianjun Duan
On 10/26/2016 09:29 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> Currently we cannot directly transfer a QTAILQ instance because of the >> limitation in the migration code. Here we introduce an approach to >> transfer such s

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v7 2/3] migration: migrate QTAILQ

2016-10-26 Thread Jianjun Duan
On 10/26/2016 05:29 AM, Halil Pasic wrote: > > > On 10/22/2016 12:52 AM, Jianjun Duan wrote: >> +#define RAW_FIELD(base, offset) >>\ >> +((char *) (base) + offset) >> + > > Seems you partially a

Re: [Qemu-devel] [QEMU PATCH v8 2/3] migration: migrate QTAILQ

2016-10-26 Thread Jianjun Duan
On 10/26/2016 10:09 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> >> >> On 10/26/2016 09:53 AM, Dr. David Alan Gilbert wrote: >>> * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >>>> >>>> >

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v8 2/3] migration: migrate QTAILQ

2016-10-27 Thread Jianjun Duan
On 10/27/2016 04:16 AM, Halil Pasic wrote: > > > On 10/26/2016 07:33 PM, Jianjun Duan wrote: >>>>>>>> +#define QTAILQ_FIRST_OFFSET 0 >>>>>>>>>>>>>> +#define QTAILQ_LAST_OFFSET (sizeof(void *)) >>>>

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v7 2/3] migration: migrate QTAILQ

2016-10-27 Thread Jianjun Duan
On 10/27/2016 05:01 AM, Paolo Bonzini wrote: > > > On 26/10/2016 18:58, Jianjun Duan wrote: >>>> >>>> Seems you partially adopted Paolo's suggestion for improving the >>>> macros. Is there a particular reason why you did not follow it more >

[Qemu-devel] [QEMU PATCH v9 0/3] migration: migrate QTAILQ

2016-10-27 Thread Jianjun Duan
mu-devel/2016-05/msg04188.html) v1: - Inital version. (link: https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02601.html) Jianjun Duan (3): migration: extend VMStateInfo migration: migrate QTAILQ tests/migration: Add test for QTAILQ migration hw/display/virtio-gpu.c | 6 +-

[Qemu-devel] [QEMU PATCH v9 3/3] tests/migration: Add test for QTAILQ migration

2016-10-27 Thread Jianjun Duan
Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan --- tests/test-vmstate.c | 160 +++ 1 file changed, 160 insertions(+) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index d8da26f..a992408 100644

[Qemu-devel] [QEMU PATCH v9 1/3] migration: extend VMStateInfo

2016-10-27 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. Signed-off-by: Jianjun Duan --- hw/display/virtio-gpu.c | 6 ++- hw/intc/s390_flic_kvm.c | 6

[Qemu-devel] [QEMU PATCH v9 2/3] migration: migrate QTAILQ

2016-10-27 Thread Jianjun Duan
. This approach will be used to transfer pending_events and ccs_list in spapr state. We also create some macros in qemu/queue.h to access a QTAILQ using pointer arithmetic. This ensures that we do not depend on the implementation details about QTAILQ in the migration code. Signed-off-by: Jianjun Duan

Re: [Qemu-devel] [QEMU PATCH v9 2/3] migration: migrate QTAILQ

2016-10-28 Thread Jianjun Duan
On 10/28/2016 12:06 PM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> Currently we cannot directly transfer a QTAILQ instance because of the >> limitation in the migration code. Here we introduce an approach to >> transfer such s

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v9 2/3] migration: migrate QTAILQ

2016-10-31 Thread Jianjun Duan
On 10/31/2016 06:10 AM, Halil Pasic wrote: > > > On 10/28/2016 09:46 PM, Jianjun Duan wrote: >> >> >> On 10/28/2016 12:06 PM, Dr. David Alan Gilbert wrote: >>> * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >>>> Currently we cannot di

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v9 2/3] migration: migrate QTAILQ

2016-10-31 Thread Jianjun Duan
On 10/31/2016 10:21 AM, Halil Pasic wrote: > > > On 10/31/2016 06:10 PM, Jianjun Duan wrote: >>> I think this got overly complicated. Here is a little patch on >>>> top of your stuff which gets rid of 15 lines and IMHO simplifies >>>> things quite a

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v9 2/3] migration: migrate QTAILQ

2016-10-31 Thread Jianjun Duan
On 10/31/2016 11:01 AM, Halil Pasic wrote: > > > On 10/31/2016 06:32 PM, Jianjun Duan wrote: >>>>> I think this got overly complicated. Here is a little patch on >>>>>>>>>> top of your stuff which gets rid of 15 lines and IMHO simpli

[Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ

2016-10-31 Thread Jianjun Duan
. This approach will be used to transfer pending_events and ccs_list in spapr state. We also create some macros in qemu/queue.h to access a QTAILQ using pointer arithmetic. This ensures that we do not depend on the implementation details about QTAILQ in the migration code. Signed-off-by: Jianjun Duan

[Qemu-devel] [QEMU PATCH v10 0/3] migration: migrate QTAILQ

2016-10-31 Thread Jianjun Duan
ed hot-unplug event could finish its course. (link: https://lists.nongnu.org/archive/html/qemu-devel/2016-05/msg04188.html) v1: - Inital version. (link: https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02601.html) Jianjun Duan (3): migration: extend VMStateInfo migration: migrate

[Qemu-devel] [QEMU PATCH v10 3/3] tests/migration: Add test for QTAILQ migration

2016-10-31 Thread Jianjun Duan
Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan --- tests/test-vmstate.c | 160 +++ 1 file changed, 160 insertions(+) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index d8da26f..a992408 100644

[Qemu-devel] [QEMU PATCH v10 1/3] migration: extend VMStateInfo

2016-10-31 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. Signed-off-by: Jianjun Duan --- hw/display/virtio-gpu.c | 6 ++- hw/intc/s390_flic_kvm.c | 6

Re: [Qemu-devel] [QEMU PATCH v10 1/3] migration: extend VMStateInfo

2016-11-02 Thread Jianjun Duan
On 11/02/2016 03:40 AM, Juan Quintela wrote: > Jianjun Duan wrote: >> Current migration code cannot handle some data structures such as >> QTAILQ in qemu/queue.h. Here we extend the signatures of put/get >> in VMStateInfo so that customized handling is supported. >>

Re: [Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ

2016-11-02 Thread Jianjun Duan
On 11/02/2016 03:45 AM, Juan Quintela wrote: > Jianjun Duan wrote: >> Currently we cannot directly transfer a QTAILQ instance because of the >> limitation in the migration code. Here we introduce an approach to >> transfer such structures. We created VMStateInfo vmsta

Re: [Qemu-devel] [QEMU PATCH v10 3/3] tests/migration: Add test for QTAILQ migration

2016-11-03 Thread Jianjun Duan
On 11/03/2016 05:22 AM, Halil Pasic wrote: > > > On 11/02/2016 11:47 AM, Juan Quintela wrote: >> Jianjun Duan wrote: >>> Add a test for QTAILQ migration to tests/test-vmstate.c. >>> >>> Signed-off-by: Jianjun Duan >> >> Reviewed-by:

Re: [Qemu-devel] [QEMU PATCH v10 3/3] tests/migration: Add test for QTAILQ migration

2016-11-03 Thread Jianjun Duan
On 11/03/2016 10:17 AM, Halil Pasic wrote: > > > On 11/03/2016 05:47 PM, Jianjun Duan wrote: >> >> On 11/03/2016 05:22 AM, Halil Pasic wrote: >>>> >>>> >>>> On 11/02/2016 11:47 AM, Juan Quintela wrote: >>>>>> Jianjun Du

Re: [Qemu-devel] [QEMU PATCH v4 0/6] migration: ensure hotplug and migration work together

2016-08-30 Thread Jianjun Duan
Hi Amit, Have you had a chance to take a look? Thanks, Jianjun On 07/08/2016 03:18 AM, Amit Shah wrote: > Hi, > > I'm going to go through this series soon, and I know Dave is too. > Please give us some time to go through it. > > Thanks, > > On (Mon) 27 Jun

[Qemu-devel] [QEMU PATCH v14 1/4] migration: extend VMStateInfo

2016-11-23 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. put now will return int type. Signed-off-by: Jianjun Duan --- hw/display/virtio-gpu.c | 8 +++- hw

[Qemu-devel] [QEMU PATCH v14 4/4] migration: add error_report

2016-11-23 Thread Jianjun Duan
Added error_report where version_ids do not match in vmstate_load_state. Signed-off-by: Jianjun Duan --- migration/vmstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/vmstate.c b/migration/vmstate.c index 2f9d4ba..0e6fce4 100644 --- a/migration/vmstate.c +++ b/migration

[Qemu-devel] [QEMU PATCH v14 3/4] tests/migration: Add test for QTAILQ migration

2016-11-23 Thread Jianjun Duan
Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan --- tests/test-vmstate.c | 160 +++ 1 file changed, 160 insertions(+) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index d2f529b..88aab8c 100644

[Qemu-devel] [QEMU PATCH v14 0/4] migration: migrate QTAILQ

2016-11-23 Thread Jianjun Duan
finish its course. (link: https://lists.nongnu.org/archive/html/qemu-devel/2016-05/msg04188.html) v1: - Inital version. (link: https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02601.html) Jianjun Duan (4): migration: extend VMStateInfo migration: migrate QTAILQ tests/migration: Add

[Qemu-devel] [QEMU PATCH v14 2/4] migration: migrate QTAILQ

2016-11-23 Thread Jianjun Duan
using pointer arithmetic. This ensures that we do not depend on the implementation details about QTAILQ in the migration code. Signed-off-by: Jianjun Duan --- include/migration/vmstate.h | 20 + include/qemu/queue.h| 60 +++ migration/trace

Re: [Qemu-devel] [QEMU PATCH v14 0/4] migration: migrate QTAILQ

2016-12-05 Thread Jianjun Duan
ping On 11/23/2016 09:53 AM, Jianjun Duan wrote: > Hi all, > > I addressed some review comments. Comments are welcome. > > v14: - Fixed a return statement. > > Previous versions are: > > v13: - Changed some QTAILQ related macro names to match ex

Re: [Qemu-devel] [QEMU PATCH v14 3/4] tests/migration: Add test for QTAILQ migration

2016-12-07 Thread Jianjun Duan
On 12/07/2016 11:49 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> Add a test for QTAILQ migration to tests/test-vmstate.c. > > Yes, but see comment below if you have to respin: > >> Signed-off-by: Jianjun Duan >> ---

[Qemu-devel] [QEMU PATCH v15 0/4] migration: migrate QTAILQ

2016-12-07 Thread Jianjun Duan
en. - Set detach_cb field right after migration so that a migrated hot-unplug event could finish its course. (link: https://lists.nongnu.org/archive/html/qemu-devel/2016-05/msg04188.html) v1: - Inital version. (link: https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg0260

[Qemu-devel] [QEMU PATCH v15 1/4] migration: extend VMStateInfo

2016-12-07 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. put now will return int type. Signed-off-by: Jianjun Duan --- hw/display/virtio-gpu.c | 8 +++- hw

[Qemu-devel] [QEMU PATCH v15 3/4] tests/migration: Add test for QTAILQ migration

2016-12-07 Thread Jianjun Duan
Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan --- tests/test-vmstate.c | 160 +++ 1 file changed, 160 insertions(+) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index d2f529b..88aab8c 100644

[Qemu-devel] [QEMU PATCH v15 2/4] migration: migrate QTAILQ

2016-12-07 Thread Jianjun Duan
using pointer arithmetic. This ensures that we do not depend on the implementation details about QTAILQ in the migration code. Signed-off-by: Jianjun Duan --- include/migration/vmstate.h | 20 + include/qemu/queue.h| 60 +++ migration/trace

[Qemu-devel] [QEMU PATCH v15 4/4] migration: add error_report

2016-12-07 Thread Jianjun Duan
Added error_report where version_ids do not match in vmstate_load_state. Signed-off-by: Jianjun Duan --- migration/vmstate.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/migration/vmstate.c b/migration/vmstate.c index 2f9d4ba..8ddd230 100644 --- a/migration/vmstate.c +++ b

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v14 3/4] tests/migration: Add test for QTAILQ migration

2016-12-08 Thread Jianjun Duan
On 12/08/2016 01:03 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> >> >> On 12/07/2016 11:49 AM, Dr. David Alan Gilbert wrote: >>> * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >>>> Add a test for QTAILQ migr

[Qemu-devel] [QEMU PATCH v16 0/4] migration: migrate QTAILQ

2016-12-08 Thread Jianjun Duan
link: https://lists.nongnu.org/archive/html/qemu-devel/2016-05/msg04188.html) v1: - Inital version. (link: https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02601.html) Jianjun Duan (4): migration: extend VMStateInfo migration: migrate QTAILQ tests/migration: Add test for QTA

[Qemu-devel] [QEMU PATCH v16 2/4] migration: migrate QTAILQ

2016-12-08 Thread Jianjun Duan
using pointer arithmetic. This ensures that we do not depend on the implementation details about QTAILQ in the migration code. Signed-off-by: Jianjun Duan --- include/migration/vmstate.h | 20 + include/qemu/queue.h| 60 +++ migration/trace

[Qemu-devel] [QEMU PATCH v16 1/4] migration: extend VMStateInfo

2016-12-08 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. put now will return int type. Signed-off-by: Jianjun Duan --- hw/display/virtio-gpu.c | 8 +++- hw

[Qemu-devel] [QEMU PATCH v16 3/4] tests/migration: Add test for QTAILQ migration

2016-12-08 Thread Jianjun Duan
Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan --- tests/test-vmstate.c | 147 +++ 1 file changed, 147 insertions(+) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index d2f529b..140754d 100644

[Qemu-devel] [QEMU PATCH v16 4/4] migration: add error_report

2016-12-08 Thread Jianjun Duan
Added error_report where version_ids do not match in vmstate_load_state. Signed-off-by: Jianjun Duan --- migration/vmstate.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/migration/vmstate.c b/migration/vmstate.c index 2f9d4ba..8ddd230 100644 --- a/migration/vmstate.c +++ b

[Qemu-devel] build failure

2016-09-19 Thread Jianjun Duan
Hi, I ran into the follow problems when I tried to build code based on latest master or ppc-for-2.8: hw/ide/core.c: In function ‘ide_init_ioport’: hw/ide/core.c:2622:39: error: ‘IDEBus’ has no member named ‘portio_list’ isa_register_portio_list(dev, &bus->portio_list,

  1   2   >