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

2012-10-30 Thread Wen Congyang
it. The I/O port is more reliable because it only depends on notifier chain(If we use virtio device, it also depends on notifier chain). Thanks Wen Congyang Also, there is no high level documentation: purpose of the interface, how a management application should use it, etc

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

2012-08-07 Thread Wen Congyang
device 3. it can work when starting the kernel Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Documentation/virtual/kvm/pv_event.txt | 32 arch/ia64/include/asm/kvm_para.h | 14 ++ arch/powerpc/include/asm/kvm_para.h| 14

[PATCH v8 1/6] start vm after reseting it

2012-08-07 Thread Wen Congyang
(not RUN_STATE_PAUSED). Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- block.h |2 ++ qmp.c |2 +- vl.c|7 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/block.h b/block.h index 650d872..29449bd 100644 --- a/block.h +++ b/block.h @@ -338,6 +338,8

[PATCH v8 2/6] kvm: Update kernel headers

2012-08-07 Thread Wen Congyang
Corresponding kvm.git hash: 439793d4 with my patch for kvm --- linux-headers/asm-s390/kvm.h |2 +- linux-headers/asm-s390/kvm_para.h |2 +- linux-headers/asm-x86/kvm.h |1 + linux-headers/asm-x86/kvm_para.h |9 + linux-headers/linux/kvm.h |3 +++

[PATCH v8 3/6] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-08-07 Thread Wen Congyang
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi

[PATCH v8 4/6] add a new qevent: QEVENT_GUEST_PANICKED

2012-08-07 Thread Wen Congyang
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(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 49dccfe..c892b7e 100644 --- a/monitor.c +++ b/monitor.c

[PATCH v8 5/6] introduce a new qom device to deal with panicked event

2012-08-07 Thread Wen Congyang
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 we...@cn.fujitsu.com

[PATCH v8 6/6] allower the user to disable pv event support

2012-08-07 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw/pc_piix.c|6 +- qemu-config.c |4 qemu-options.hx |3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 4af8403..9b877a7 100644 --- a/hw/pc_piix.c +++ b/hw

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

2012-08-08 Thread Wen Congyang
At 08/08/2012 05:12 PM, Andrew Jones Wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: diff --git a/Documentation/virtual/kvm/pv_event.txt b/Documentation/virtual/kvm/pv_event.txt new file mode 100644 index 000..0ebc890 --- /dev/null +++ b/Documentation/virtual/kvm

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-22 Thread Wen Congyang
:55:54PM +0300, Yan Vugenfirer wrote: On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: On 2012-08-14 10:56, Daniel P. Berrange wrote: On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: We can know the guest is panicked

Re: [Qemu-devel] [PATCH v8 5/6] introduce a new qom device to deal with panicked event

2012-08-22 Thread Wen Congyang
At 08/09/2012 03:01 AM, Blue Swirl Wrote: On Wed, Aug 8, 2012 at 2:47 AM, Wen Congyang we...@cn.fujitsu.com wrote: If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_EVENT_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport to listen

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

2012-08-22 Thread Wen Congyang
device 3. it can work when starting the kernel Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Documentation/virtual/kvm/pv_event.txt | 32 arch/ia64/include/asm/kvm_para.h | 14 ++ arch/powerpc/include/asm/kvm_para.h| 14

[PATCH v9 1/6] start vm after reseting it

2012-08-22 Thread Wen Congyang
(not RUN_STATE_PAUSED). Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- block.h |2 ++ qmp.c |2 +- vl.c|7 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/block.h b/block.h index 2e2be11..c3265c2 100644 --- a/block.h +++ b/block.h @@ -339,6 +339,8

[PATCH v9 2/6] kvm: Update kernel headers

2012-08-22 Thread Wen Congyang
Corresponding kvm.git hash: 35f2d16b with my patch for kvm --- linux-headers/asm-s390/kvm.h |2 +- linux-headers/asm-s390/kvm_para.h |2 +- linux-headers/asm-x86/kvm.h |1 + linux-headers/asm-x86/kvm_para.h |9 + linux-headers/linux/kvm.h |3 +++

[PATCH v9 3/6] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-08-22 Thread Wen Congyang
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi

[PATCH v9 4/6] add a new qevent: QEVENT_GUEST_PANICKED

2012-08-22 Thread Wen Congyang
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(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 480f583..cd2adb7 100644 --- a/monitor.c +++ b/monitor.c

[PATCH v9 5/6] introduce a new qom device to deal with panicked event

2012-08-22 Thread Wen Congyang
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 we...@cn.fujitsu.com

[PATCH v9 6/6] allower the user to disable pv event support

2012-08-22 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw/pc_piix.c|6 +- qemu-config.c |4 qemu-options.hx |3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index f73fb85..76d3de1 100644 --- a/hw/pc_piix.c +++ b/hw

Re: [PATCH v9 5/6] introduce a new qom device to deal with panicked event

2012-08-24 Thread Wen Congyang
At 08/23/2012 06:51 PM, Jan Kiszka Wrote: On 2012-08-23 04:32, Wen Congyang wrote: If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_EVENT_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport to listen this I/O port, and deal

Re: [PATCH v9 5/6] introduce a new qom device to deal with panicked event

2012-08-24 Thread Wen Congyang
At 08/24/2012 02:21 PM, Jan Kiszka Wrote: On 2012-08-24 08:05, Wen Congyang wrote: At 08/23/2012 06:51 PM, Jan Kiszka Wrote: On 2012-08-23 04:32, Wen Congyang wrote: If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_EVENT_PORT when it is panciked. This patch

Re: [PATCH v9 5/6] introduce a new qom device to deal with panicked event

2012-08-24 Thread Wen Congyang
At 08/24/2012 02:30 PM, Jan Kiszka Wrote: On 2012-08-24 08:33, Wen Congyang wrote: At 08/24/2012 02:21 PM, Jan Kiszka Wrote: On 2012-08-24 08:05, Wen Congyang wrote: At 08/23/2012 06:51 PM, Jan Kiszka Wrote: On 2012-08-23 04:32, Wen Congyang wrote: If the target is x86/x86_64, the guest's

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

2012-08-28 Thread Wen Congyang
device 3. it can work when starting the kernel Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Documentation/virtual/kvm/pv_event.txt | 32 arch/ia64/include/asm/kvm_para.h | 14 ++ arch/powerpc/include/asm/kvm_para.h| 14

[PATCH v10 2/6] kvm: Update kernel headers

2012-08-28 Thread Wen Congyang
Corresponding kvm.git hash: 1d92128f with my patch for kvm --- linux-headers/asm-s390/kvm.h |2 +- linux-headers/asm-s390/kvm_para.h |2 +- linux-headers/asm-x86/kvm.h |1 + linux-headers/asm-x86/kvm_para.h |9 + linux-headers/linux/kvm.h |3 +++

[PATCH v10 3/6] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-08-28 Thread Wen Congyang
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi

[PATCH v10 1/6] start vm after reseting it

2012-08-28 Thread Wen Congyang
(not RUN_STATE_PAUSED). Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- block.h |2 ++ qmp.c |2 +- vl.c|7 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/block.h b/block.h index 2e2be11..c3265c2 100644 --- a/block.h +++ b/block.h @@ -339,6 +339,8

[PATCH v10 4/6] add a new qevent: QEVENT_GUEST_PANICKED

2012-08-28 Thread Wen Congyang
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(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index b17b1bb..f74dd2d 100644 --- a/monitor.c +++ b/monitor.c

[PATCH v10 5/6] introduce a new qom device to deal with panicked event

2012-08-28 Thread Wen Congyang
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 we...@cn.fujitsu.com

[PATCH v10 6/6] allower the user to disable pv event support

2012-08-28 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw/pc_piix.c|6 +- qemu-config.c |4 qemu-options.hx |3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 37eca23..10531a8 100644 --- a/hw/pc_piix.c +++ b/hw

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

2012-08-29 Thread Wen Congyang
At 08/29/2012 07:56 PM, Sasha Levin Wrote: On 08/29/2012 07:18 AM, Wen Congyang 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(for example: libvirt) can do auto dump when

Re: memory-hotplug : possible circular locking dependency detected

2012-09-13 Thread Wen Congyang
hotplug notifier's lock, and ksm_thread_mutex. ksm_thread_mutex is locked when the memory is going offline and is unlocked when the memory is offlined or the offlining is cancelled. So we meet the warning messages. But it doesn't cause deadlock, because we lock mem_hotplug_mutex first. Thanks Wen

Re: [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-09-23 Thread Wen Congyang
]: *** Waiting for unfinished jobs CCaudio/audio.o make: *** [subdir-libhw64] Error 2 make: *** Waiting for unfinished jobs Thanks Wen Congyang +DeviceState qdev; +uint32_t idx; /* index in memory hotplug register/bitmap */ +ram_addr_t start; /* starting physical address

Re: [RFC PATCH v3 20/19][SeaBIOS] alternative: Use paravirt interface for pci windows

2012-09-24 Thread Wen Congyang
if I apply the other patches for seabios. And I don't find this patch in your tree. Thanks Wen Congyang Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- src/paravirt.c |6 ++ src/paravirt.h |2 ++ src/pciinit.c |5 ++--- 3 files changed, 10

Re: [RFC PATCH v3 19/19][SeaBIOS] Calculate pcimem_start and pcimem64_start from SRAT entries

2012-09-24 Thread Wen Congyang
definition of ‘smp_get_ncpus’ was here src/post.c:237: error: incompatible implicit declaration of function ‘smp_get_ncpus’ src/smp.c:144: note: previous definition of ‘smp_get_ncpus’ was here Thanks Wen Congyang +{ MaxCountCPUs = qemu_cfg_get_max_cpus(); if (!MaxCountCPUs

Re: [RFC PATCH v3 09/19] pc: Add dimm paravirt SRAT info

2012-09-26 Thread Wen Congyang
existing numa info, so that the fw_cfg layout does not break. This information is used by Seabios to build hotplug memory device objects at runtime. nb_numa_nodes is set to 1 by default (not 0), so that we always pass srat info to SeaBIOS. You forgot to set nb_numa_nodes to 1... Thanks Wen

Re: [PATCH] kvm: notify host when guest panicked

2012-06-12 Thread Wen Congyang
Hi, Avi Do you have any comment to this patch? Thanks Wen Congyang At 05/21/2012 02:46 PM, Wen Congyang 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(for example: libvirt) can

Re: [Qemu-devel] [PATCH 3/3] deal with guest panicked event

2012-06-12 Thread Wen Congyang
At 05/31/2012 03:23 AM, Luiz Capitulino Wrote: On Mon, 21 May 2012 14:50:51 +0800 Wen Congyang we...@cn.fujitsu.com wrote: When the guest is panicked, it will write 0x1 to the port 0x505. So if qemu reads 0x1 from this port, we can do the folloing three things according to the parameter

Re: [Qemu-devel] [PATCH 1/3] start vm after reseting it

2012-06-12 Thread Wen Congyang
At 05/31/2012 03:17 AM, Luiz Capitulino Wrote: On Mon, 21 May 2012 14:49:32 +0800 Wen Congyang we...@cn.fujitsu.com wrote: The guest should run after reseting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. Signed-off-by: Wen Congyang we

Re: [PATCH] kvm: notify host when guest panicked

2012-06-12 Thread Wen Congyang
that works on all architectures. kvm_hypercall0? Avi said that we should avoid touching hypercall. Thanks Wen Congyang --- a/include/linux/kvm_para.h +++ b/include/linux/kvm_para.h @@ -20,6 +20,14 @@ #define KVM_HC_FEATURES3 #define KVM_HC_PPC_MAP_MAGIC_PAGE 4

Re: [PATCH] kvm: notify host when guest panicked

2012-06-12 Thread Wen Congyang
into an architecture specific file? I am not sure whether it should be put into an architecture specific file. Thanks Wen Congyang Christian -- 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

Re: [Qemu-devel] [PATCH 1/3] start vm after reseting it

2012-06-13 Thread Wen Congyang
At 05/31/2012 03:17 AM, Luiz Capitulino Wrote: On Mon, 21 May 2012 14:49:32 +0800 Wen Congyang we...@cn.fujitsu.com wrote: The guest should run after reseting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. Signed-off-by: Wen Congyang we

Re: [PATCH 3/3] deal with guest panicked event

2012-06-13 Thread Wen Congyang
At 06/12/2012 09:29 PM, Paolo Bonzini Wrote: Il 21/05/2012 08:50, Wen Congyang ha scritto: +DEF(onpanic, HAS_ARG, QEMU_OPTION_onpanic, \ +-onpanic report|pause|quit\n \ +action when the guest is panicked [default=report], +QEMU_ARCH_ALL) +STEXI +@item -onpanic

Re: [PATCH 3/3] deal with guest panicked event

2012-06-13 Thread Wen Congyang
At 06/13/2012 03:53 PM, Paolo Bonzini Wrote: Il 13/06/2012 09:02, Wen Congyang ha scritto: +Other possible actions are: +@code{pause} (emit QEVENT_GUEST_PANICKED and pause VM), +@code{quit} (emit QEVENT_GUEST_PANICKED and quit VM). Rather than just quit, there should be choices for shutdown

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

2012-06-27 Thread Wen Congyang
device 3. it can work when startint the kernel Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- arch/ia64/include/asm/kvm_para.h|5 + arch/powerpc/include/asm/kvm_para.h |5 + arch/s390/include/asm/kvm_para.h|5 + arch/x86/include/asm/kvm_para.h |7

[PATCH 1/6 v5] start vm after reseting it

2012-06-27 Thread Wen Congyang
The guest should run after reseting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- block.h |2 ++ qmp.c |2 +- vl.c|3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff

[PATCH 2/6 v5] update linux headers

2012-06-27 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- linux-headers/asm-x86/kvm_para.h |2 ++ linux-headers/linux/kvm_para.h |6 ++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86/kvm_para.h index f2ac46a

[PATCH 3/6 v5] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-06-27 Thread Wen Congyang
Add a new runstate RUN_STATE_GUEST_PANICKED. The guest can be in this state if it is paused due to panicked event. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions

[PATCH 4/6 v5] add a new qevent: QEVENT_GUEST_PANICKED

2012-06-27 Thread Wen Congyang
Add a new qevent QEVENT_GUEST_PANICKED. QEMU will emit this event if the guest is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- monitor.c |1 + monitor.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index f6107ba..28f7482

[PATCH 5/6 v5] deal with guest panicked event accoring to -onpanic parameter

2012-06-27 Thread Wen Congyang
and poweroff the guest 4. emit QEVENT_GUEST_PANICKED and reset the guest 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

[PATCH 6/6 v5] deal with panicked event accoring to '-machine panic_action=action'

2012-06-27 Thread Wen Congyang
The action is the same as -onpanic parameter. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qemu-config.c |4 qemu-options.hx |4 +++- vl.c|7 +++ 3 files changed, 14 insertions(+), 1 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 5c3296b

Re: [PATCH 5/6 v5] deal with guest panicked event accoring to -onpanic parameter

2012-06-27 Thread Wen Congyang
At 06/27/2012 10:39 PM, Jan Kiszka Wrote: On 2012-06-27 09:02, Wen Congyang wrote: When the guest is panicked, it will write 0x1 to the port KVM_PV_PORT. So if qemu reads 0x1 from this port, we can do the folloing three things according to the parameter -onpanic: 1. emit QEVENT_GUEST_PANICKED

Re: [PATCH 5/6 v5] deal with guest panicked event accoring to -onpanic parameter

2012-07-03 Thread Wen Congyang
At 06/28/2012 04:26 PM, Jan Kiszka Wrote: On 2012-06-28 03:15, Wen Congyang wrote: At 06/27/2012 10:39 PM, Jan Kiszka Wrote: On 2012-06-27 09:02, Wen Congyang wrote: When the guest is panicked, it will write 0x1 to the port KVM_PV_PORT. So if qemu reads 0x1 from this port, we can do

Re: [PATCH 5/6 v5] deal with guest panicked event accoring to -onpanic parameter

2012-07-03 Thread Wen Congyang
At 07/03/2012 02:36 PM, Jan Kiszka Wrote: On 2012-07-03 08:07, Wen Congyang wrote: At 06/28/2012 04:26 PM, Jan Kiszka Wrote: On 2012-06-28 03:15, Wen Congyang wrote: At 06/27/2012 10:39 PM, Jan Kiszka Wrote: On 2012-06-27 09:02, Wen Congyang wrote: When the guest is panicked, it will write

Re: [PATCH v4 2/3] KVM-INTEL: Add new module vmcsinfo-intel to fill VMCSINFO

2012-07-06 Thread Wen Congyang
physical cpu. Thanks Wen Congyang system can be composed of CPUs with different steppings or differnet microcode revisions. Becase of the nature that it's hided in the specification, I suspect layout of vmcs could change across different steppings or microcode revisions. Then, the interface

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

2012-07-06 Thread Wen Congyang
device 3. it can work when startint the kernel Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- arch/ia64/include/asm/kvm_para.h|5 + arch/powerpc/include/asm/kvm_para.h |5 + arch/s390/include/asm/kvm_para.h|5 + arch/x86/include/asm/kvm_para.h |7

[PATCH 1/7 v6] start vm after reseting it

2012-07-06 Thread Wen Congyang
(not RUN_STATE_PAUSED). Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- block.h |2 ++ qmp.c |2 +- vl.c|7 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/block.h b/block.h index d135652..d9570dd 100644 --- a/block.h +++ b/block.h @@ -365,6 +365,8

[PATCH 2/7 v6] update linux headers

2012-07-06 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- linux-headers/asm-x86/kvm_para.h |2 ++ linux-headers/linux/kvm_para.h |6 ++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86/kvm_para.h index f2ac46a

[PATCH 3/7 v6] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-07-06 Thread Wen Congyang
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi

[PATCH 4/7 v6] add a new qevent: QEVENT_GUEST_PANICKED

2012-07-06 Thread Wen Congyang
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(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index f6107ba..28f7482 100644 --- a/monitor.c +++ b/monitor.c

[PATCH 7/7 v6] deal with panicked event accoring to '-machine panic_action=action'

2012-07-06 Thread Wen Congyang
The action is the same as -onpanic parameter. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qemu-config.c |4 qemu-options.hx |4 +++- vl.c|7 +++ 3 files changed, 14 insertions(+), 1 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 5c3296b

[PATCH 6/7 v6] deal with guest panicked event accoring to -onpanic parameter

2012-07-06 Thread Wen Congyang
the guest 4. reset: emit QEVENT_GUEST_PANICKED and reset the guest Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw/kvm/pv_event.c | 17 + qemu-options.hx | 15 +++ vl.c |6 ++ 3 files changed, 38 insertions(+), 0 deletions(-) diff --git

[PATCH 5/7 v6] introduce a new qom device to deal with panicked event

2012-07-06 Thread Wen Congyang
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 we...@cn.fujitsu.com --- hw/kvm

Re: [PATCH 2/7 v6] update linux headers

2012-07-06 Thread Wen Congyang
At 07/06/2012 06:25 PM, Jan Kiszka Wrote: On 2012-07-06 11:38, Wen Congyang wrote: Signed-off-by: Wen Congyang we...@cn.fujitsu.com Which kvm.git hash is this referring? Please state this to avoid that we are merging support for kernel features that are still under review. The following

Re: [PATCH 7/7 v6] deal with panicked event accoring to '-machine panic_action=action'

2012-07-09 Thread Wen Congyang
At 07/06/2012 07:09 PM, Jan Kiszka Wrote: On 2012-07-06 11:41, Wen Congyang wrote: The action is the same as -onpanic parameter. As explained in patch 5, now that we have a related device, this no longer needs to be a machine property. Would could be a machine property is enabling

Re: [RFC PATCH v2 04/21][SeaBIOS] acpi: generate hotplug memory devices

2012-07-11 Thread Wen Congyang
) +add_e820(mem_base, mem_len, E820_RAM); add_e820() is declared in memmap.h. You should include this header file, otherwise, seabios cannot be built. Thanks Wen Congyang +memslot_status = memslot_status 1; +entry++; +} +build_header((void*)ssdt, SSDT_SIGNATURE, ssdt_ptr

Re: [RFC PATCH v2 03/21][SeaBIOS] acpi-dsdt: Implement functions for memory hotplug

2012-07-17 Thread Wen Congyang
, I think MEON flag for this meory device should be set to 0 in method _EJ0 or implement method _PS3 for memory device. Thanks Wen Congyang +// State change - update MEON with new state +Store(Local3, Index(MEON, Local0)) +// Do MEM

Re: [PATCH 5/7 v6] introduce a new qom device to deal with panicked event

2012-07-17 Thread Wen Congyang
At 07/06/2012 07:05 PM, Jan Kiszka Wrote: On 2012-07-06 11:41, Wen Congyang wrote: If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport to listen this I/O port, and deal with panicked

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

2012-07-21 Thread Wen Congyang
device 3. it can work when startint the kernel Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- arch/ia64/include/asm/kvm_para.h|5 + arch/powerpc/include/asm/kvm_para.h |5 + arch/s390/include/asm/kvm_para.h|5 + arch/x86/include/asm/kvm_para.h |7

[PATCH 1/6 v7] start vm after reseting it

2012-07-21 Thread Wen Congyang
(not RUN_STATE_PAUSED). Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- block.h |2 ++ qmp.c |2 +- vl.c|7 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/block.h b/block.h index c89590d..4ed042d 100644 --- a/block.h +++ b/block.h @@ -337,6 +337,8

[PATCH 2/6 v7] kvm: Update kernel headers

2012-07-21 Thread Wen Congyang
Corresponding kvm.git hash: 37e41afa and apply my patch for kvm Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- linux-headers/asm-x86/kvm_para.h |2 ++ linux-headers/linux/kvm_para.h |6 ++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/linux-headers/asm-x86

[PATCH 3/6 v7] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-07-21 Thread Wen Congyang
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi

[PATCH 4/6 v7] add a new qevent: QEVENT_GUEST_PANICKED

2012-07-21 Thread Wen Congyang
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(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 09aa3cd..a388e61 100644 --- a/monitor.c +++ b/monitor.c

[PATCH 5/6 v7] introduce a new qom device to deal with panicked event

2012-07-21 Thread Wen Congyang
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 we...@cn.fujitsu.com --- hw/kvm

[PATCH 6/6 v7] allow the user to disable pv event support

2012-07-21 Thread Wen Congyang
The qom device uses a fixed PIO port that might conflict with (non-Linux) guest expectations and/or future device models. So allow the user to disable it. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw/pc_piix.c|6 +- qemu-config.c |4 qemu-options.hx |3

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

2012-07-21 Thread Wen Congyang
At 07/21/2012 03:19 PM, Jan Kiszka Wrote: On 2012-07-21 09:12, Wen Congyang 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(for example: libvirt) can do auto dump when the guest

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

2012-07-21 Thread Wen Congyang
device 3. it can work when starting the kernel Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- arch/ia64/include/asm/kvm_para.h|5 + arch/powerpc/include/asm/kvm_para.h |5 + arch/s390/include/asm/kvm_para.h|5 + arch/x86/include/asm/kvm_para.h | 13

Re: [Qemu-devel] [PATCH v7.5] kvm: notify host when the guest is panicked

2012-07-22 Thread Wen Congyang
At 07/22/2012 07:39 PM, Sasha Levin Wrote: On 07/21/2012 10:44 AM, Wen Congyang 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(for example: libvirt) can do auto dump when

Re: [Qemu-devel] [PATCH v7.5] kvm: notify host when the guest is panicked

2012-07-22 Thread Wen Congyang
At 07/23/2012 07:50 AM, Sasha Levin Wrote: On 07/23/2012 12:36 AM, Anthony Liguori wrote: Sasha Levin levinsasha...@gmail.com writes: On 07/22/2012 09:14 PM, Anthony Liguori wrote: Sasha Levin levinsasha...@gmail.com writes: On 07/21/2012 10:44 AM, Wen Congyang wrote: We can know the guest

Re: [Qemu-devel] [PATCH v7] kvm: notify host when the guest is panicked

2012-07-23 Thread Wen Congyang
At 07/23/2012 04:19 AM, Sasha Levin Wrote: On 07/22/2012 09:22 PM, Anthony Liguori wrote: Sasha Levin levinsasha...@gmail.com writes: On 07/21/2012 09:12 AM, Wen Congyang wrote: +#define KVM_PV_PORT (0x505UL) + #ifdef __KERNEL__ #include asm/processor.h @@ -221,6 +223,11

Re: [PATCHv2-RFC 0/2] RFC: standard pci bridge device

2012-02-13 Thread Wen Congyang
without this patch? Thanks Wen Congyang New since v1: hotplug support -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] kvm: notify host when guest paniced

2012-02-26 Thread Wen Congyang
We can know the guest is paniced when the guest runs on xen. But we do not have such feature on kvm. This patch implemnts this feature, and the implementation is the same as xen: register panic notifier, and call hypercall when the guest is paniced. Signed-off-by: Wen Congyang we

Re: [PATCH] kvm: notify host when guest paniced

2012-02-27 Thread Wen Congyang
At 02/27/2012 11:08 PM, Jan Kiszka Wrote: On 2012-02-27 04:01, Wen Congyang wrote: We can know the guest is paniced when the guest runs on xen. But we do not have such feature on kvm. This patch implemnts this feature, and the implementation is the same as xen: register panic notifier

Re: [PATCH] kvm: notify host when guest paniced

2012-02-28 Thread Wen Congyang
At 02/28/2012 01:26 PM, Wen Congyang Wrote: At 02/27/2012 11:08 PM, Jan Kiszka Wrote: On 2012-02-27 04:01, Wen Congyang wrote: We can know the guest is paniced when the guest runs on xen. But we do not have such feature on kvm. This patch implemnts this feature, and the implementation

Re: [PATCH] kvm: notify host when guest paniced

2012-02-28 Thread Wen Congyang
At 02/27/2012 11:08 PM, Jan Kiszka Wrote: On 2012-02-27 04:01, Wen Congyang wrote: We can know the guest is paniced when the guest runs on xen. But we do not have such feature on kvm. This patch implemnts this feature, and the implementation is the same as xen: register panic notifier

Re: [PATCH] kvm: notify host when guest paniced

2012-02-28 Thread Wen Congyang
At 02/28/2012 05:34 PM, Jan Kiszka Wrote: On 2012-02-28 09:23, Wen Congyang wrote: At 02/27/2012 11:08 PM, Jan Kiszka Wrote: On 2012-02-27 04:01, Wen Congyang wrote: We can know the guest is paniced when the guest runs on xen. But we do not have such feature on kvm. This patch implemnts

Re: [SeaBIOS] [PATCH RFC] acpi: add ssdt for cpi hotplug

2011-11-02 Thread Wen Congyang
At 11/02/2011 03:11 AM, Michael S. Tsirkin Write: So here's the plan: move all hotplug handling out to ssdt, this way it'll keep working even with a user-supplied dsdt. Next step we can patch this ssdt at runtime. There's little point in this change alone, so posting as RFC, will repost

Re: [SeaBIOS] [PATCH RFC] acpi: add ssdt for cpi hotplug

2011-11-02 Thread Wen Congyang
At 11/02/2011 02:08 PM, Wen Congyang Write: At 11/02/2011 03:11 AM, Michael S. Tsirkin Write: So here's the plan: move all hotplug handling out to ssdt, this way it'll keep working even with a user-supplied dsdt. Next step we can patch this ssdt at runtime. There's little point

Re: [SeaBIOS] [PATCH RFC] acpi: add ssdt for cpi hotplug

2011-11-02 Thread Wen Congyang
. If we use user supplied DSDT, we should use user supplied SSDT too. Thanks Wen Congyang It's not great to have the DSDT and SSDT tied to each other. However, once RMV is removed, it's only two methods (PCNT supplied by the SSDT and PCEJ supplied by the DSDT). I do see the upside to moving

Re: [SeaBIOS] [PATCH RFC] acpi: add ssdt for cpi hotplug

2011-11-02 Thread Wen Congyang
At 11/03/2011 09:36 AM, Kevin O'Connor Write: On Thu, Nov 03, 2011 at 09:04:57AM +0800, Wen Congyang wrote: At 11/03/2011 08:30 AM, Kevin O'Connor Write: I think it's reasonable to require that a user supplied DSDT still fill certain requirements. Keep in mind that the reason for the user

Re: [PATCH] kvm: notify host when guest paniced

2012-02-28 Thread Wen Congyang
At 02/28/2012 06:45 PM, Gleb Natapov Wrote: On Tue, Feb 28, 2012 at 11:19:47AM +0100, Jan Kiszka wrote: On 2012-02-28 10:42, Wen Congyang wrote: At 02/28/2012 05:34 PM, Jan Kiszka Wrote: On 2012-02-28 09:23, Wen Congyang wrote: At 02/27/2012 11:08 PM, Jan Kiszka Wrote: On 2012-02-27 04:01

Re: [PATCH] kvm: notify host when guest paniced

2012-02-28 Thread Wen Congyang
At 02/28/2012 07:23 PM, Avi Kivity Wrote: On 02/27/2012 05:01 AM, Wen Congyang wrote: We can know the guest is paniced when the guest runs on xen. But we do not have such feature on kvm. This patch implemnts this feature, and the implementation is the same as xen: register panic notifier

Re: [PATCH] kvm: notify host when guest paniced

2012-02-29 Thread Wen Congyang
At 02/29/2012 05:36 PM, Gleb Natapov Wrote: On Wed, Feb 29, 2012 at 09:08:52AM +0800, Wen Congyang wrote: At 02/28/2012 06:45 PM, Gleb Natapov Wrote: On Tue, Feb 28, 2012 at 11:19:47AM +0100, Jan Kiszka wrote: On 2012-02-28 10:42, Wen Congyang wrote: At 02/28/2012 05:34 PM, Jan Kiszka Wrote

Re: [PATCH] kvm: notify host when guest paniced

2012-02-29 Thread Wen Congyang
. Then panic hypercall sounds like a reasonable solution. It is, but I'm trying to see if we can get away with doing nothing. If we have a reliable way with doing nothing, it is better. But I donot find such way. Thanks Wen Congyang -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] kvm: notify host when guest paniced

2012-02-29 Thread Wen Congyang
the guest has paniced, and the guest-internal dump is working. Thanks Wen Congyang a cloud, the host-initiated dump is left on the host, outside the reach of the guest admin, outside the guest image where all the symbols are, and sometimes not even on the same host if a live migration

Re: [PATCH] kvm: notify host when guest paniced

2012-02-29 Thread Wen Congyang
At 02/29/2012 06:39 PM, Avi Kivity Wrote: On 02/29/2012 12:17 PM, Wen Congyang wrote: Yes, crash can be so severe that it is not even detected by a kernel itself, so not OOPS message even printed. But in most cases if kernel is functional enough to print OOPS it is functional enough to call

Re: [PATCH] kvm: notify host when guest paniced

2012-02-29 Thread Wen Congyang
At 02/29/2012 06:39 PM, Avi Kivity Wrote: On 02/29/2012 12:17 PM, Wen Congyang wrote: Yes, crash can be so severe that it is not even detected by a kernel itself, so not OOPS message even printed. But in most cases if kernel is functional enough to print OOPS it is functional enough to call

Re: [Qemu-devel] [PATCH]qemu: deal with guest paniced event

2012-03-01 Thread Wen Congyang
At 03/02/2012 12:51 AM, Luiz Capitulino Wrote: On Mon, 27 Feb 2012 11:05:58 +0800 Wen Congyang we...@cn.fujitsu.com wrote: When the host knows the guest is paniced, it will set exit_reason to KVM_EXIT_GUEST_PANIC. So if qemu receive this exit_reason, we can send a event to tell management

[PATCH 0/2 v2] kvm: notify host when guest paniced

2012-03-06 Thread Wen Congyang
to avoid changing return values. Wen Congyang (2): kvm: notify host when guest paniced kvm: set exit_reason to KVM_EXIT_GUEST_PANICED when guest paniced arch/x86/kernel/kvm.c| 12 arch/x86/kvm/x86.c | 11 +++ include/linux/kvm.h |1 + include/linux

[PATCH 1/2 v2] kvm: notify host when guest paniced

2012-03-06 Thread Wen Congyang
The implementation is the same as xen: register panic notifier, and call hypercall when the guest is paniced. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- arch/x86/kernel/kvm.c| 12 include/linux/kvm_para.h |1 + 2 files changed, 13 insertions(+), 0 deletions

[PATCH 2/2 v2] kvm: set exit_reason to KVM_EXIT_GUEST_PANICED when guest paniced

2012-03-06 Thread Wen Congyang
This patch introduces new request bit KVM_REQ_GUEST_PANICED. If this bit is set, set vcpu's exit_reason to KVM_EXIT_GUEST_PANICED. And then the user space can know the guest paniced. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- arch/x86/kvm/x86.c | 11 +++ include/linux

[PATCH v2] deal with guest paniced event

2012-03-06 Thread Wen Congyang
When the host knows the guest is paniced, it will set exit_reason to KVM_EXIT_GUEST_PANICED. So if qemu receive this exit_reason, we can send a event to tell management application that the guest is paniced and set the guest status to RUN_STATE_PANICED. Signed-off-by: Wen Congyang we

  1   2   >