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

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: [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 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: 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: [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

[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 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

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 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

[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: [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: [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

[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: [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

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: [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: [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 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

[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: [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

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

[PATCH] kvm: notify host when guest panicked

2012-05-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/3] start vm after reseting it

2012-05-21 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 --- vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 23ab3a3..7f5fed8

[PATCH 2/3] update linux headers

2012-05-21 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- linux-headers/linux/kvm_para.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/linux-headers/linux/kvm_para.h b/linux-headers/linux/kvm_para.h index 7bdcf93..5618758 100644 --- a/linux-headers/linux/kvm_para.h

[PATCH 3/3] deal with guest panicked event

2012-05-21 Thread Wen Congyang
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 --- kvm-all.c| 84

Re: [SeaBIOS] [RFC PATCH 9/9] enable memory devices if e820 entry is present

2012-04-25 Thread Wen Congyang
/ccode32flat.o] Error 1 You should declare the function find_e820() in src/memmap.h and include this header file in src/acpi.c. Thanks Wen Congyang +*(ssdt_ptr++) = 0x01; +} +else +*(ssdt_ptr++) = 0x00; entry++; } build_header((void*)ssdt

Re: [PATCH 0/4] Export offsets of VMCS fields as note information for kdump

2012-04-17 Thread Wen Congyang
() or assert(). The guest registers are stored in the kernel, and qemu does not call cpu_synchronize_state() to get guest register. So I donot understand why the registers woubld be present int the stack trace... Thanks Wen Congyang Is this what you want? Yes. I'm trying to understand if the feature

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-04-16 Thread Wen Congyang
At 03/20/2012 11:45 PM, Gleb Natapov Wrote: On Tue, Mar 20, 2012 at 05:59:16PM +0800, Wen Congyang wrote: At 03/19/2012 03:33 PM, Wen Congyang Wrote: At 03/08/2012 03:57 PM, 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

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-04-02 Thread Wen Congyang
At 03/19/2012 03:33 PM, Wen Congyang Wrote: At 03/08/2012 03:57 PM, 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. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-22 Thread Wen Congyang
this on multiple cpus simultaneously? We can register panic notifier in the guest kernel, and do it in the panic notifier callback. Thanks Wen Congyang Regards, Anthony Liguori In fact the feature can be implemented 100% host side by searching for a panic string signature in the console logs

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-22 Thread Wen Congyang
. Just declare that outl 0x505 is a megaultracall and s/vmcall/outb/g and call it a day. Why use 0x505? Is it a reserved port, and it will not be used by any device? How can I get all reserved port? Thanks Wen Congyang The performance difference between vmcall and outl is so tiny compared

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-22 Thread Wen Congyang
At 03/22/2012 03:31 PM, Gleb Natapov Wrote: On Thu, Mar 22, 2012 at 09:05:12AM +0800, Wen Congyang wrote: At 03/22/2012 03:19 AM, Anthony Liguori Wrote: On 03/21/2012 11:25 AM, Avi Kivity wrote: On 03/21/2012 06:18 PM, Corey Minyard wrote: Look at drivers/char/ipmi/ipmi_msghandler.c. It has

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Wen Congyang
At 03/21/2012 05:11 PM, Gleb Natapov Wrote: On Wed, Mar 21, 2012 at 08:56:03AM +0800, Wen Congyang wrote: At 03/20/2012 11:45 PM, Gleb Natapov Wrote: On Tue, Mar 20, 2012 at 05:59:16PM +0800, Wen Congyang wrote: At 03/19/2012 03:33 PM, Wen Congyang Wrote: At 03/08/2012 03:57 PM, Wen Congyang

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Wen Congyang
outl PORT+N - data regN We can get the register value from vmcs. So there is no need to tell the register value to the host. If we decide to avoid touching hypervisor, I agree with this solution. Thanks Wen Congyang outl PORT - qemucall of index value with arguments 1..N Regards

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-20 Thread Wen Congyang
At 03/19/2012 03:33 PM, Wen Congyang Wrote: At 03/08/2012 03:57 PM, 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. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-20 Thread Wen Congyang
At 03/20/2012 11:45 PM, Gleb Natapov Wrote: On Tue, Mar 20, 2012 at 05:59:16PM +0800, Wen Congyang wrote: At 03/19/2012 03:33 PM, Wen Congyang Wrote: At 03/08/2012 03:57 PM, 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

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-19 Thread Wen Congyang
At 03/08/2012 03:57 PM, 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. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when the guest is crashed. If management app does not do

Re: [Qemu-devel] pci-assign can not work

2012-03-16 Thread Wen Congyang
At 03/16/2012 04:27 PM, Jan Kiszka Wrote: On 2012-03-16 03:38, Wen Congyang wrote: At 03/15/2012 06:21 PM, Wen Congyang Wrote: Hi all When I use pci-assign, I meet the following error: Failed to assign irq for hostdev0: Input/output error Perhaps you are assigning a device that shares

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-15 Thread Wen Congyang
01:11 PM, Wen Congyang wrote: I don't think we want to use the driver. Instead, have a small piece of code that resets the device and pushes out a string (the panic message?) without any interrupts etc. It's still going to be less reliable than a hypercall, I agree. Do you still want

pci-assign can not work

2012-03-15 Thread Wen Congyang
(not qemu/qemu). If I use the default qemu(provided in RHEL6.2), the guest can be started. Thanks Wen Congyang -- 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

Re: [Qemu-devel] pci-assign can not work

2012-03-15 Thread Wen Congyang
At 03/15/2012 06:21 PM, Wen Congyang Wrote: Hi all When I use pci-assign, I meet the following error: Failed to assign irq for hostdev0: Input/output error Perhaps you are assigning a device that shares an IRQ with another device? Is it a bug or I miss something? Hi, Jan This problem

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-14 Thread Wen Congyang
At 03/13/2012 06:47 PM, Avi Kivity Wrote: On 03/13/2012 11:18 AM, Daniel P. Berrange wrote: On Mon, Mar 12, 2012 at 12:33:33PM +0200, Avi Kivity wrote: On 03/12/2012 11:04 AM, Wen Congyang wrote: Do you have any other comments about this patch? Not really, but I'm not 100% convinced

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-14 Thread Wen Congyang
At 03/14/2012 05:24 PM, Avi Kivity Wrote: On 03/14/2012 10:29 AM, Wen Congyang wrote: At 03/13/2012 06:47 PM, Avi Kivity Wrote: On 03/13/2012 11:18 AM, Daniel P. Berrange wrote: On Mon, Mar 12, 2012 at 12:33:33PM +0200, Avi Kivity wrote: On 03/12/2012 11:04 AM, Wen Congyang wrote: Do you

  1   2   >