Re: [RFC]Pid conversion between pid namespace

2014-07-28 Thread Hu Tao
Hi, On Fri, Jul 25, 2014 at 05:34:43PM +, Serge Hallyn wrote: > Quoting chenhanx...@cn.fujitsu.com (chenhanx...@cn.fujitsu.com): > > Hi, > > > > > -Original Message- > > > From: Serge Hallyn [mailto:serge.hal...@ubuntu.com] > > > Sent: Tuesday, July 15, 2014 12:16 PM > > > To: Chen,

Re: [RFC]Pid conversion between pid namespace

2014-07-28 Thread Hu Tao
Hi, On Fri, Jul 25, 2014 at 05:34:43PM +, Serge Hallyn wrote: Quoting chenhanx...@cn.fujitsu.com (chenhanx...@cn.fujitsu.com): Hi, -Original Message- From: Serge Hallyn [mailto:serge.hal...@ubuntu.com] Sent: Tuesday, July 15, 2014 12:16 PM To: Chen, Hanxiao/陈 晗霄

Re: [PATCH v2 2/2] mem-hotplug: Introduce MMOP_OFFLINE to replace the hard coding -1.

2014-06-05 Thread Hu Tao
On Fri, Jun 06, 2014 at 11:58:54AM +0800, Tang Chen wrote: > In store_mem_state(), we have: > .. > 334 else if (!strncmp(buf, "offline", min_t(int, count, 7))) > 335 online_type = -1; > .. > 355 case -1: > 356 ret = device_offline(>dev);

Re: [PATCH v2 2/2] mem-hotplug: Introduce MMOP_OFFLINE to replace the hard coding -1.

2014-06-05 Thread Hu Tao
On Fri, Jun 06, 2014 at 11:58:54AM +0800, Tang Chen wrote: In store_mem_state(), we have: .. 334 else if (!strncmp(buf, offline, min_t(int, count, 7))) 335 online_type = -1; .. 355 case -1: 356 ret = device_offline(mem-dev); 357

[PATCH] doc: fix a typo about irq affinity

2013-08-05 Thread Hu Tao
smp_affinity holds bitmask and smp_affinity_list holds list. So we should write a list to smp_affinity_list, instead of smp_affinity. Signed-off-by: Hu Tao --- Documentation/IRQ-affinity.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/IRQ-affinity.txt b

[PATCH] doc: fix a typo about irq affinity

2013-08-05 Thread Hu Tao
smp_affinity holds bitmask and smp_affinity_list holds list. So we should write a list to smp_affinity_list, instead of smp_affinity. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- Documentation/IRQ-affinity.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v13 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED

2013-03-06 Thread Hu Tao
On Tue, Mar 05, 2013 at 09:26:18AM +0100, Paolo Bonzini wrote: > Il 05/03/2013 04:17, Hu Tao ha scritto: > > Will > > > > if (runstate_check(RUN_STATE_INTERNAL_ERROR) || > > runstate_check(RUN_STATE_SHUTDOWN) || > > runsta

Re: [PATCH v13 0/8] pv event interface between host and guest

2013-03-06 Thread Hu Tao
Hi, On Mon, Mar 04, 2013 at 11:05:37AM +0100, Paolo Bonzini wrote: > Il 03/03/2013 10:17, Gleb Natapov ha scritto: > > On Thu, Feb 28, 2013 at 08:13:10PM +0800, Hu Tao wrote: > >> This series implements a new interface, kvm pv event, to notify host when > >> some events

Re: [PATCH v13 0/8] pv event interface between host and guest

2013-03-06 Thread Hu Tao
On Sun, Mar 03, 2013 at 11:17:38AM +0200, Gleb Natapov wrote: > On Thu, Feb 28, 2013 at 08:13:10PM +0800, Hu Tao wrote: > > This series implements a new interface, kvm pv event, to notify host when > > some events happen in guest. Right now there is one supported event:

Re: [PATCH v13 0/8] pv event interface between host and guest

2013-03-06 Thread Hu Tao
On Sun, Mar 03, 2013 at 11:17:38AM +0200, Gleb Natapov wrote: On Thu, Feb 28, 2013 at 08:13:10PM +0800, Hu Tao wrote: This series implements a new interface, kvm pv event, to notify host when some events happen in guest. Right now there is one supported event: guest panic. What other

Re: [PATCH v13 0/8] pv event interface between host and guest

2013-03-06 Thread Hu Tao
Hi, On Mon, Mar 04, 2013 at 11:05:37AM +0100, Paolo Bonzini wrote: Il 03/03/2013 10:17, Gleb Natapov ha scritto: On Thu, Feb 28, 2013 at 08:13:10PM +0800, Hu Tao wrote: This series implements a new interface, kvm pv event, to notify host when some events happen in guest. Right now

Re: [PATCH v13 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED

2013-03-06 Thread Hu Tao
On Tue, Mar 05, 2013 at 09:26:18AM +0100, Paolo Bonzini wrote: Il 05/03/2013 04:17, Hu Tao ha scritto: Will if (runstate_check(RUN_STATE_INTERNAL_ERROR) || runstate_check(RUN_STATE_SHUTDOWN) || runstate_check(RUN_STATE_GUEST_PANICKED

Re: [PATCH v13 2/8] start vm after resetting it

2013-03-04 Thread Hu Tao
On Mon, Mar 04, 2013 at 10:32:17AM +0100, Paolo Bonzini wrote: > Il 28/02/2013 13:13, Hu Tao ha scritto: > > From: Wen Congyang > > > > The guest should run after resetting it, but it does not run if its > > old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PA

Re: [PATCH v13 2/8] start vm after resetting it

2013-03-04 Thread Hu Tao
On Thu, Feb 28, 2013 at 02:23:42PM +0100, Jan Kiszka wrote: > On 2013-02-28 13:13, Hu Tao wrote: > > From: Wen Congyang > > > > The guest should run after resetting it, but it does not run if its > > old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. >

Re: [PATCH v13 5/8] add a new qevent: QEVENT_GUEST_PANICKED

2013-03-04 Thread Hu Tao
On Fri, Mar 01, 2013 at 09:31:47AM -0700, Eric Blake wrote: > On 02/28/2013 05:13 AM, Hu Tao wrote: > > This event will be emited when the guest is panicked. > > > > Signed-off-by: Wen Congyang > > --- > > include/monitor/monitor.h | 1 + > > monitor.c

Re: [PATCH v13 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED

2013-03-04 Thread Hu Tao
On Mon, Mar 04, 2013 at 10:40:15AM +0100, Paolo Bonzini wrote: > Il 28/02/2013 13:13, Hu Tao ha scritto: > > The guest will be in this state when it is panicked. > > > > Signed-off-by: Wen Congyang > > Signed-off-by: Hu Tao > > --- > > migration.c

Re: [PATCH v13 1/8] save/load cpu runstate

2013-03-04 Thread Hu Tao
On Mon, Mar 04, 2013 at 10:30:48AM +0100, Paolo Bonzini wrote: > Il 28/02/2013 13:13, Hu Tao ha scritto: > > This patch enables preservation of cpu runstate during save/load vm. > > So when a vm is restored from snapshot, the cpu runstate is restored, > > too. > >

Re: [PATCH v13 1/8] save/load cpu runstate

2013-03-04 Thread Hu Tao
On Mon, Mar 04, 2013 at 10:30:48AM +0100, Paolo Bonzini wrote: Il 28/02/2013 13:13, Hu Tao ha scritto: This patch enables preservation of cpu runstate during save/load vm. So when a vm is restored from snapshot, the cpu runstate is restored, too. I don't think this feature is worth

Re: [PATCH v13 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED

2013-03-04 Thread Hu Tao
On Mon, Mar 04, 2013 at 10:40:15AM +0100, Paolo Bonzini wrote: Il 28/02/2013 13:13, Hu Tao ha scritto: The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- migration.c | 1 + qapi

Re: [PATCH v13 5/8] add a new qevent: QEVENT_GUEST_PANICKED

2013-03-04 Thread Hu Tao
On Fri, Mar 01, 2013 at 09:31:47AM -0700, Eric Blake wrote: On 02/28/2013 05:13 AM, Hu Tao wrote: This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- include/monitor/monitor.h | 1 + monitor.c | 1 + 2 files

Re: [PATCH v13 2/8] start vm after resetting it

2013-03-04 Thread Hu Tao
On Thu, Feb 28, 2013 at 02:23:42PM +0100, Jan Kiszka wrote: On 2013-02-28 13:13, Hu Tao wrote: From: Wen Congyang we...@cn.fujitsu.com The guest should run after resetting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate

Re: [PATCH v13 2/8] start vm after resetting it

2013-03-04 Thread Hu Tao
On Mon, Mar 04, 2013 at 10:32:17AM +0100, Paolo Bonzini wrote: Il 28/02/2013 13:13, Hu Tao ha scritto: From: Wen Congyang we...@cn.fujitsu.com The guest should run after resetting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set

Re: [PATCH v13 1/8] save/load cpu runstate

2013-02-28 Thread Hu Tao
On Thu, Feb 28, 2013 at 02:12:37PM -0700, Eric Blake wrote: > On 02/28/2013 05:13 AM, Hu Tao wrote: > > This patch enables preservation of cpu runstate during save/load vm. > > So when a vm is restored from snapshot, the cpu runstate is restored, > > too. > > What

[PATCH v13] kvm: notify host when the guest is panicked

2013-02-28 Thread Hu Tao
device 3. it can work when starting the kernel Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- arch/x86/include/asm/kvm_para.h | 26 + arch/x86/include/uapi/asm/kvm_para.h | 2 ++ arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/kvm.c| 44

[PATCH v13 6/8] introduce a new qom device to deal with panicked event

2013-02-28 Thread Hu Tao
code into pv_event.c for such target. Note: if we emit QEVENT_GUEST_PANICKED only, and the management application does not receive this event(the management may not run when the event is emitted), the management won't know the guest is panicked. Signed-off-by: Wen Congyang Signed-off-by: Hu Tao

[PATCH v13 8/8] pv event: add document to describe the usage

2013-02-28 Thread Hu Tao
Signed-off-by: Hu Tao --- docs/pv-event.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 docs/pv-event.txt diff --git a/docs/pv-event.txt b/docs/pv-event.txt new file mode 100644 index 000..ac9e7fa --- /dev/null +++ b/docs/pv-event.txt @@ -0,0 +1,17 @@ +KVM

[PATCH v13 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED

2013-02-28 Thread Hu Tao
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- migration.c | 1 + qapi-schema.json | 6 +- qmp.c| 3 ++- vl.c | 11 ++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git

[PATCH v13 2/8] start vm after resetting it

2013-02-28 Thread Hu Tao
From: Wen Congyang The guest should run after resetting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when resetting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED

[PATCH v13 3/8] update kernel headers

2013-02-28 Thread Hu Tao
update kernel headers to add pv event macros. Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- linux-headers/asm-x86/kvm_para.h | 1 + linux-headers/linux/kvm_para.h | 6 ++ 2 files changed, 7 insertions(+) diff --git a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86

[PATCH v13 1/8] save/load cpu runstate

2013-02-28 Thread Hu Tao
: running Signed-off-by: Hu Tao --- include/sysemu/sysemu.h | 2 ++ migration.c | 6 +- monitor.c | 5 ++--- savevm.c| 1 + vl.c| 34 ++ 5 files changed, 40 insertions(+), 8 deletions(-) diff

[PATCH v13 5/8] add a new qevent: QEVENT_GUEST_PANICKED

2013-02-28 Thread Hu Tao
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang --- include/monitor/monitor.h | 1 + monitor.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 87fb49c..4006905 100644 ---

[PATCH v13 7/8] allower the user to disable pv event support

2013-02-28 Thread Hu Tao
Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- hw/pc_piix.c| 9 - qemu-options.hx | 3 ++- vl.c| 4 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 24a9bf3..82a421a 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c

[PATCH v13 0/8] pv event interface between host and guest

2013-02-28 Thread Hu Tao
it by quring the status of vm in destination host when migration completes. v12: http://lists.nongnu.org/archive/html/qemu-devel/2013-01/msg04120.html changes from v12: - no DO_UPCASE - the interface is only for x86 now - request 4 bytes io range(hw/kvm_pv_event.c) - rebase to the latest tree Hu

Re: [PATCH v12 rebased] kvm: notify host when the guest is panicked

2013-02-28 Thread Hu Tao
On Thu, Feb 07, 2013 at 11:39:47PM -0200, Marcelo Tosatti wrote: > Hi, > > On Wed, Jan 23, 2013 at 03:19:21PM +0800, Hu Tao wrote: > > We can know the guest is panicked when the guest runs on xen. > > But we do not have such feature on kvm. > > > > Another purpo

Re: [PATCH v12 rebased] kvm: notify host when the guest is panicked

2013-02-28 Thread Hu Tao
On Thu, Feb 07, 2013 at 11:39:47PM -0200, Marcelo Tosatti wrote: Hi, On Wed, Jan 23, 2013 at 03:19:21PM +0800, Hu Tao wrote: We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app

[PATCH v13 0/8] pv event interface between host and guest

2013-02-28 Thread Hu Tao
it by quring the status of vm in destination host when migration completes. v12: http://lists.nongnu.org/archive/html/qemu-devel/2013-01/msg04120.html changes from v12: - no DO_UPCASE - the interface is only for x86 now - request 4 bytes io range(hw/kvm_pv_event.c) - rebase to the latest tree Hu

[PATCH v13 7/8] allower the user to disable pv event support

2013-02-28 Thread Hu Tao
Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- hw/pc_piix.c| 9 - qemu-options.hx | 3 ++- vl.c| 4 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 24a9bf3..82a421a

[PATCH v13 5/8] add a new qevent: QEVENT_GUEST_PANICKED

2013-02-28 Thread Hu Tao
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- include/monitor/monitor.h | 1 + monitor.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 87fb49c..4006905

[PATCH v13 1/8] save/load cpu runstate

2013-02-28 Thread Hu Tao
: running Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- include/sysemu/sysemu.h | 2 ++ migration.c | 6 +- monitor.c | 5 ++--- savevm.c| 1 + vl.c| 34 ++ 5 files changed, 40 insertions(+), 8

[PATCH v13 3/8] update kernel headers

2013-02-28 Thread Hu Tao
update kernel headers to add pv event macros. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- linux-headers/asm-x86/kvm_para.h | 1 + linux-headers/linux/kvm_para.h | 6 ++ 2 files changed, 7 insertions(+) diff --git a/linux-headers/asm-x86

[PATCH v13 2/8] start vm after resetting it

2013-02-28 Thread Hu Tao
From: Wen Congyang we...@cn.fujitsu.com The guest should run after resetting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when resetting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR

[PATCH v13 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED

2013-02-28 Thread Hu Tao
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- migration.c | 1 + qapi-schema.json | 6 +- qmp.c| 3 ++- vl.c | 11 ++- 4 files changed, 18 insertions

[PATCH v13 8/8] pv event: add document to describe the usage

2013-02-28 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- docs/pv-event.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 docs/pv-event.txt diff --git a/docs/pv-event.txt b/docs/pv-event.txt new file mode 100644 index 000..ac9e7fa --- /dev/null +++ b/docs/pv-event.txt

[PATCH v13 6/8] introduce a new qom device to deal with panicked event

2013-02-28 Thread Hu Tao
-off-by: Hu Tao hu...@cn.fujitsu.com --- hw/kvm/Makefile.objs | 2 +- hw/kvm/pv_event.c| 198 +++ hw/pc_piix.c | 5 ++ include/sysemu/kvm.h | 2 + kvm-stub.c | 4 ++ 5 files changed, 210 insertions(+), 1 deletion

[PATCH v13] kvm: notify host when the guest is panicked

2013-02-28 Thread Hu Tao
device 3. it can work when starting the kernel Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- arch/x86/include/asm/kvm_para.h | 26 + arch/x86/include/uapi/asm/kvm_para.h | 2 ++ arch/x86/kernel/Makefile | 2

Re: [PATCH v13 1/8] save/load cpu runstate

2013-02-28 Thread Hu Tao
On Thu, Feb 28, 2013 at 02:12:37PM -0700, Eric Blake wrote: On 02/28/2013 05:13 AM, Hu Tao wrote: This patch enables preservation of cpu runstate during save/load vm. So when a vm is restored from snapshot, the cpu runstate is restored, too. What happens if a management app wants

Re: [PATCH v12 rebased 2/8] start vm after resetting it

2013-02-20 Thread Hu Tao
On Thu, Feb 07, 2013 at 11:50:28PM -0200, Marcelo Tosatti wrote: > On Wed, Jan 23, 2013 at 03:19:23PM +0800, Hu Tao wrote: > > From: Wen Congyang > > > > The guest should run after resetting it, but it does not run if its > > old state is RUN_STATE_INTERNAL_ERROR or RU

Re: [PATCH v12 rebased 2/8] start vm after resetting it

2013-02-20 Thread Hu Tao
On Thu, Feb 07, 2013 at 11:50:28PM -0200, Marcelo Tosatti wrote: On Wed, Jan 23, 2013 at 03:19:23PM +0800, Hu Tao wrote: From: Wen Congyang we...@cn.fujitsu.com The guest should run after resetting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED

Re: [PATCH v12 rebased 1/8] preserve cpu runstate

2013-02-19 Thread Hu Tao
On Thu, Feb 07, 2013 at 11:45:34PM -0200, Marcelo Tosatti wrote: > On Wed, Jan 23, 2013 at 03:19:22PM +0800, Hu Tao wrote: > > This patch enables preservation of cpu runstate during save/load vm. > > So when a vm is restored from snapshot, the cpu runstate is restored, > &

Re: [PATCH v12 rebased 1/8] preserve cpu runstate

2013-02-19 Thread Hu Tao
On Thu, Feb 07, 2013 at 11:45:34PM -0200, Marcelo Tosatti wrote: On Wed, Jan 23, 2013 at 03:19:22PM +0800, Hu Tao wrote: This patch enables preservation of cpu runstate during save/load vm. So when a vm is restored from snapshot, the cpu runstate is restored, too. See following example

[PATCH v12 rebased 3/8] update kernel headers

2013-01-22 Thread Hu Tao
update kernel headers to add pv event macros. Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- linux-headers/asm-x86/kvm_para.h | 1 + linux-headers/linux/kvm_para.h | 6 ++ 2 files changed, 7 insertions(+) diff --git a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86

[PATCH v12 rebased] kvm: notify host when the guest is panicked

2013-01-22 Thread Hu Tao
device 3. it can work when starting the kernel Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- arch/ia64/kvm/irq.h | 19 + arch/powerpc/include/asm/kvm_para.h | 18 arch/s390/include/asm/kvm_para.h | 19 + arch/x86/include/asm

[PATCH v12 rebased 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED

2013-01-22 Thread Hu Tao
The guest will be in this state when it is panicked. If guest is panicked during live migration, the runstate RUN_STATE_GUEST_PANICKED will be transferred to dest machine. Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- migration.c | 1 + qapi-schema.json | 6 +- qmp.c

[PATCH v12 rebased 7/8] allower the user to disable pv event support

2013-01-22 Thread Hu Tao
Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- hw/pc_piix.c| 9 - qemu-options.hx | 3 ++- vl.c| 4 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index fed6ccf..507c98b 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c

[PATCH v12 rebased 5/8] add a new qevent: QEVENT_GUEST_PANICKED

2013-01-22 Thread Hu Tao
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang --- include/monitor/monitor.h | 1 + monitor.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 87fb49c..4006905 100644 ---

[PATCH v12 rebased 0/8] pv event to notify host when the guest is panicked

2013-01-22 Thread Hu Tao
it by quring the status of vm in destination host. This version is a rebase and no code change. v12: http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg01459.html v11: http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg04361.html Hu Tao (7): save/load cpu runstate update kernel headers add

[PATCH v12 rebased 6/8] introduce a new qom device to deal with panicked event

2013-01-22 Thread Hu Tao
code into pv_event.c for such target. Note: if we emit QEVENT_GUEST_PANICKED only, and the management application does not receive this event(the management may not run when the event is emitted), the management won't know the guest is panicked. Signed-off-by: Wen Congyang Signed-off-by: Hu Tao

[PATCH v12 rebased 8/8] pv event: add document to describe the usage

2013-01-22 Thread Hu Tao
Signed-off-by: Hu Tao --- docs/pv-event.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 docs/pv-event.txt diff --git a/docs/pv-event.txt b/docs/pv-event.txt new file mode 100644 index 000..ac9e7fa --- /dev/null +++ b/docs/pv-event.txt @@ -0,0 +1,17 @@ +KVM

[PATCH v12 rebased 2/8] start vm after resetting it

2013-01-22 Thread Hu Tao
From: Wen Congyang The guest should run after resetting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when resetting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED

[PATCH v12 rebased 1/8] preserve cpu runstate

2013-01-22 Thread Hu Tao
: running Signed-off-by: Hu Tao --- include/sysemu/sysemu.h | 2 ++ migration.c | 6 +- monitor.c | 5 ++--- savevm.c| 1 + vl.c| 34 ++ 5 files changed, 40 insertions(+), 8 deletions(-) diff

[PATCH v12 rebased 1/8] preserve cpu runstate

2013-01-22 Thread Hu Tao
: running Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- include/sysemu/sysemu.h | 2 ++ migration.c | 6 +- monitor.c | 5 ++--- savevm.c| 1 + vl.c| 34 ++ 5 files changed, 40 insertions(+), 8

[PATCH v12 rebased 2/8] start vm after resetting it

2013-01-22 Thread Hu Tao
From: Wen Congyang we...@cn.fujitsu.com The guest should run after resetting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when resetting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR

[PATCH v12 rebased 6/8] introduce a new qom device to deal with panicked event

2013-01-22 Thread Hu Tao
-off-by: Hu Tao hu...@cn.fujitsu.com --- hw/kvm/Makefile.objs | 2 +- hw/kvm/pv_event.c| 197 +++ hw/pc_piix.c | 5 ++ include/sysemu/kvm.h | 2 + kvm-stub.c | 4 ++ 5 files changed, 209 insertions(+), 1 deletion

[PATCH v12 rebased 8/8] pv event: add document to describe the usage

2013-01-22 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- docs/pv-event.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 docs/pv-event.txt diff --git a/docs/pv-event.txt b/docs/pv-event.txt new file mode 100644 index 000..ac9e7fa --- /dev/null +++ b/docs/pv-event.txt

[PATCH v12 rebased 0/8] pv event to notify host when the guest is panicked

2013-01-22 Thread Hu Tao
it by quring the status of vm in destination host. This version is a rebase and no code change. v12: http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg01459.html v11: http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg04361.html Hu Tao (7): save/load cpu runstate update kernel headers add

[PATCH v12 rebased 7/8] allower the user to disable pv event support

2013-01-22 Thread Hu Tao
Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- hw/pc_piix.c| 9 - qemu-options.hx | 3 ++- vl.c| 4 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index fed6ccf..507c98b

[PATCH v12 rebased 5/8] add a new qevent: QEVENT_GUEST_PANICKED

2013-01-22 Thread Hu Tao
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- include/monitor/monitor.h | 1 + monitor.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 87fb49c..4006905

[PATCH v12 rebased 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED

2013-01-22 Thread Hu Tao
The guest will be in this state when it is panicked. If guest is panicked during live migration, the runstate RUN_STATE_GUEST_PANICKED will be transferred to dest machine. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- migration.c | 1

[PATCH v12 rebased] kvm: notify host when the guest is panicked

2013-01-22 Thread Hu Tao
device 3. it can work when starting the kernel Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- arch/ia64/kvm/irq.h | 19 + arch/powerpc/include/asm/kvm_para.h | 18 arch/s390/include/asm/kvm_para.h | 19

[PATCH v12 rebased 3/8] update kernel headers

2013-01-22 Thread Hu Tao
update kernel headers to add pv event macros. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- linux-headers/asm-x86/kvm_para.h | 1 + linux-headers/linux/kvm_para.h | 6 ++ 2 files changed, 7 insertions(+) diff --git a/linux-headers/asm-x86

Re: [Qemu-devel] [PATCH v12 0/8] pv event to notify host when the guest is panicked

2013-01-13 Thread Hu Tao
On Tue, Dec 25, 2012 at 07:54:20PM -0200, Marcelo Tosatti wrote: > On Thu, Dec 20, 2012 at 03:53:59PM +0800, Hu Tao wrote: > > Hi, > > > > Any comments? > > Did you verify possibilities listed at > https://lkml.org/lkml/2012/11/20/653 ? Except the EIO one y

Re: [Qemu-devel] [PATCH v12 0/8] pv event to notify host when the guest is panicked

2013-01-13 Thread Hu Tao
Hi Marcelo, Sorry for the late reply. On Tue, Dec 25, 2012 at 07:52:05PM -0200, Marcelo Tosatti wrote: > On Thu, Dec 20, 2012 at 03:53:59PM +0800, Hu Tao wrote: > > Hi, > > > > Any comments? > > As far as i can see, items 2 and 3 of > > https://lkml.org/lkml/

Re: [Qemu-devel] [PATCH v12 0/8] pv event to notify host when the guest is panicked

2013-01-13 Thread Hu Tao
Hi Marcelo, Sorry for the late reply. On Tue, Dec 25, 2012 at 07:52:05PM -0200, Marcelo Tosatti wrote: On Thu, Dec 20, 2012 at 03:53:59PM +0800, Hu Tao wrote: Hi, Any comments? As far as i can see, items 2 and 3 of https://lkml.org/lkml/2012/11/12/588 Have not been addressed

Re: [Qemu-devel] [PATCH v12 0/8] pv event to notify host when the guest is panicked

2013-01-13 Thread Hu Tao
On Tue, Dec 25, 2012 at 07:54:20PM -0200, Marcelo Tosatti wrote: On Thu, Dec 20, 2012 at 03:53:59PM +0800, Hu Tao wrote: Hi, Any comments? Did you verify possibilities listed at https://lkml.org/lkml/2012/11/20/653 ? Except the EIO one you mentioned. I don't know how to reproduce

Re: [Qemu-devel] [PATCH v12 0/8] pv event to notify host when the guest is panicked

2012-12-19 Thread Hu Tao
Hi, Any comments? On Wed, Dec 12, 2012 at 02:13:43PM +0800, Hu Tao wrote: > This series implements a new interface, kvm pv event, to notify host when > some events happen in guest. Right now there is one supported event: guest > panic. > > changes from v11: > > - add a

Re: [Qemu-devel] [PATCH v12 0/8] pv event to notify host when the guest is panicked

2012-12-19 Thread Hu Tao
Hi, Any comments? On Wed, Dec 12, 2012 at 02:13:43PM +0800, Hu Tao wrote: This series implements a new interface, kvm pv event, to notify host when some events happen in guest. Right now there is one supported event: guest panic. changes from v11: - add a new patch 'save/load cpu

[PATCH v12 3/8] update kernel headers

2012-12-11 Thread Hu Tao
update kernel headers to add pv event macros. Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- linux-headers/asm-x86/kvm_para.h | 1 + linux-headers/linux/kvm_para.h | 6 ++ 2 files changed, 7 insertions(+) diff --git a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86

[PATCH v12 1/8] save/load cpu runstate

2012-12-11 Thread Hu Tao
Signed-off-by: Hu Tao --- migration.c | 6 +- monitor.c | 5 ++--- savevm.c| 1 + sysemu.h| 2 ++ vl.c| 34 ++ 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/migration.c b/migration.c index 73ce170..31fa300 100644

[PATCH] kvm: notify host when the guest is panicked

2012-12-11 Thread Hu Tao
device 3. it can work when starting the kernel Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- arch/ia64/kvm/irq.h | 19 + arch/powerpc/include/asm/kvm_para.h | 18 + arch/s390/include/asm/kvm_para.h| 19 + arch/x86/include/asm

[PATCH v12 5/8] add a new qevent: QEVENT_GUEST_PANICKED

2012-12-11 Thread Hu Tao
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang --- monitor.c | 1 + monitor.h | 1 + 2 files changed, 2 insertions(+) diff --git a/monitor.c b/monitor.c index 1226501..231785b 100644 --- a/monitor.c +++ b/monitor.c @@ -458,6 +458,7 @@ static const char

[PATCH v12 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-12-11 Thread Hu Tao
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- migration.c | 1 + qapi-schema.json | 6 +- qmp.c| 3 ++- vl.c | 11 ++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git

[PATCH v12 0/8] pv event to notify host when the guest is panicked

2012-12-11 Thread Hu Tao
- reserve RUN_STATE_GUEST_PANICKED during migration - add doc of enable_pv_event option - disable reboot-on-panic if pv_event is on v11: http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg04361.html Hu Tao (7): save/load cpu runstate update kernel headers add a new runstate

[PATCH v12 7/8] allower the user to disable pv event support

2012-12-11 Thread Hu Tao
Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- hw/pc_piix.c| 8 +++- qemu-config.c | 4 qemu-options.hx | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 8380702..bf31b96 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c

[PATCH v12 6/8] introduce a new qom device to deal with panicked event

2012-12-11 Thread Hu Tao
code into pv_event.c for such target. Note: if we emit QEVENT_GUEST_PANICKED only, and the management application does not receive this event(the management may not run when the event is emitted), the management won't know the guest is panicked. Signed-off-by: Wen Congyang Signed-off-by: Hu Tao

[PATCH v12 8/8] pv event: add document to describe the usage

2012-12-11 Thread Hu Tao
Signed-off-by: Hu Tao --- docs/pv-event.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 docs/pv-event.txt diff --git a/docs/pv-event.txt b/docs/pv-event.txt new file mode 100644 index 000..ac9e7fa --- /dev/null +++ b/docs/pv-event.txt @@ -0,0 +1,17 @@ +KVM

[PATCH v12 2/8] start vm after resetting it

2012-12-11 Thread Hu Tao
From: Wen Congyang The guest should run after resetting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when resetting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED

[PATCH v12 2/8] start vm after resetting it

2012-12-11 Thread Hu Tao
From: Wen Congyang we...@cn.fujitsu.com The guest should run after resetting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when resetting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR

[PATCH v12 8/8] pv event: add document to describe the usage

2012-12-11 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- docs/pv-event.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 docs/pv-event.txt diff --git a/docs/pv-event.txt b/docs/pv-event.txt new file mode 100644 index 000..ac9e7fa --- /dev/null +++ b/docs/pv-event.txt

[PATCH v12 7/8] allower the user to disable pv event support

2012-12-11 Thread Hu Tao
Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- hw/pc_piix.c| 8 +++- qemu-config.c | 4 qemu-options.hx | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 8380702..bf31b96

[PATCH v12 6/8] introduce a new qom device to deal with panicked event

2012-12-11 Thread Hu Tao
-off-by: Hu Tao hu...@cn.fujitsu.com --- hw/kvm/Makefile.objs | 2 +- hw/kvm/pv_event.c| 197 +++ hw/pc_piix.c | 5 ++ kvm-stub.c | 4 ++ kvm.h| 2 + 5 files changed, 209 insertions(+), 1 deletion

[PATCH v12 0/8] pv event to notify host when the guest is panicked

2012-12-11 Thread Hu Tao
- reserve RUN_STATE_GUEST_PANICKED during migration - add doc of enable_pv_event option - disable reboot-on-panic if pv_event is on v11: http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg04361.html Hu Tao (7): save/load cpu runstate update kernel headers add a new runstate

[PATCH v12 5/8] add a new qevent: QEVENT_GUEST_PANICKED

2012-12-11 Thread Hu Tao
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- monitor.c | 1 + monitor.h | 1 + 2 files changed, 2 insertions(+) diff --git a/monitor.c b/monitor.c index 1226501..231785b 100644 --- a/monitor.c +++ b/monitor.c @@ -458,6 +458,7 @@

[PATCH v12 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-12-11 Thread Hu Tao
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- migration.c | 1 + qapi-schema.json | 6 +- qmp.c| 3 ++- vl.c | 11 ++- 4 files changed, 18 insertions

[PATCH] kvm: notify host when the guest is panicked

2012-12-11 Thread Hu Tao
device 3. it can work when starting the kernel Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- arch/ia64/kvm/irq.h | 19 + arch/powerpc/include/asm/kvm_para.h | 18 + arch/s390/include/asm/kvm_para.h| 19

[PATCH v12 1/8] save/load cpu runstate

2012-12-11 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- migration.c | 6 +- monitor.c | 5 ++--- savevm.c| 1 + sysemu.h| 2 ++ vl.c| 34 ++ 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/migration.c b/migration.c index 73ce170

[PATCH v12 3/8] update kernel headers

2012-12-11 Thread Hu Tao
update kernel headers to add pv event macros. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- linux-headers/asm-x86/kvm_para.h | 1 + linux-headers/linux/kvm_para.h | 6 ++ 2 files changed, 7 insertions(+) diff --git a/linux-headers/asm-x86

Re: [PATCH v11] kvm: notify host when the guest is panicked

2012-11-20 Thread Hu Tao
Hi Marcelo, On Tue, Nov 13, 2012 at 12:19:08AM -0200, Marcelo Tosatti wrote: > On Fri, Nov 09, 2012 at 03:17:39PM -0500, Sasha Levin wrote: > > On Mon, Nov 5, 2012 at 8:58 PM, Hu Tao wrote: > > > But in the case of panic notification, more dependency means more > > >

Re: [PATCH v11] kvm: notify host when the guest is panicked

2012-11-20 Thread Hu Tao
Hi Marcelo, On Tue, Nov 13, 2012 at 12:19:08AM -0200, Marcelo Tosatti wrote: On Fri, Nov 09, 2012 at 03:17:39PM -0500, Sasha Levin wrote: On Mon, Nov 5, 2012 at 8:58 PM, Hu Tao hu...@cn.fujitsu.com wrote: But in the case of panic notification, more dependency means more chances

Re: [PATCH v11] kvm: notify host when the guest is panicked

2012-11-05 Thread Hu Tao
io, etc. We choose IO because compared to virtio device, it is not that heavy and less problematic. > > Furthermore, why stop at virtio? What if the KVM code has a bug and it > doesn't pass IO properly? Or the x86 code? we still want panic > notifications if that happens... Better

Re: [PATCH v11] kvm: notify host when the guest is panicked

2012-11-05 Thread Hu Tao
pass IO properly? Or the x86 code? we still want panic notifications if that happens... Better ideas are welcome. -- Thanks, Hu Tao -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

  1   2   >