[Qemu-devel] [PATCH] stop the iteration when too many pages is transferred

2010-11-17 Thread Wen Congyang
When the total sent page size is larger than max_factor times of the size of guest OS's memory, stop the iteration. The default value of max_factor is 3. This is similar to XEN. Signed-off-by: Wen Congyang --- arch_init.c | 13 - 1 files changed, 12 insertions(+), 1 deletions

Re: [Qemu-devel] [PATCH] stop the iteration when too many pages is transferred

2010-11-21 Thread Wen Congyang
At 2010年11月20日 10:23, Anthony Liguori Write: On 11/17/2010 08:32 PM, Wen Congyang wrote: When the total sent page size is larger than max_factor times of the size of guest OS's memory, stop the iteration. The default value of max_factor is 3. This is similar to XEN. Signed-off-by: Wen

[Qemu-devel] [PATCH] correct migrate_set_speed's args_type

2010-11-22 Thread Wen Congyang
The args_type of migrate_set_speed in qmp-commands.hx is wrong. When we set migrate speed by json, qemu will be core dumped. Signed-off-by: Wen Congyang --- qmp-commands.hx |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 793cf1c

[Qemu-devel] Re: [PATCH] correct migrate_set_speed's args_type

2010-11-23 Thread Wen Congyang
At 2010年11月23日 21:31, Luiz Capitulino Write: On Tue, 23 Nov 2010 10:43:48 -0200 Luiz Capitulino lcapitul...@redhat.com wrote: On Tue, 23 Nov 2010 13:41:26 +0800 Wen Congyang we...@cn.fujitsu.com wrote: The args_type of migrate_set_speed in qmp-commands.hx is wrong. When we set migrate

[Qemu-devel] [PATCH v2] correct migrate_set_speed's args_type

2010-11-24 Thread Wen Congyang
The args_type of migrate_set_speed in qmp-commands.hx is wrong. When we set migrate speed by json, qemu will be core dumped. This bug was caused by 07de3e60b05 and hence affects master only. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qmp-commands.hx |2 +- 1 files changed, 1

[Qemu-devel] [PATCH] disable sigcld handling before calling pclose()

2010-12-09 Thread Wen Congyang
SIGCHLD handling and the other one is in pclose(). We should disable sigcld handling before calling pclose(). Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- os-posix.c | 19 +++ qemu-os-posix.h |2 ++ savevm.c|2 ++ 3 files changed, 23 insertions

Re: [Qemu-devel] [PATCH] disable sigcld handling before calling pclose()

2010-12-14 Thread Wen Congyang
At 2010-12-09 11:41, Wen Congyang Write: When I use the command 'virsh save' to save the domain state, I receive the following error message: operation failed: Migration unexpectedly failed. I debug the qemu by adding some printf(), and find the function pclose() returns -1. I use strace

Re: [Qemu-devel] [PATCH] disable sigcld handling before calling pclose()

2010-12-19 Thread Wen Congyang
At 12/14/2010 05:23 PM, Wen Congyang Write: At 2010-12-09 11:41, Wen Congyang Write: When I use the command 'virsh save' to save the domain state, I receive the following error message: operation failed: Migration unexpectedly failed. I debug the qemu by adding some printf(), and find

Re: [Qemu-devel] [PATCH] disable sigcld handling before calling pclose()

2010-12-20 Thread Wen Congyang
At 12/20/2010 02:33 PM, Andreas Färber Write: Am 20.12.2010 um 02:25 schrieb Wen Congyang: At 12/14/2010 05:23 PM, Wen Congyang Write: At 2010-12-09 11:41, Wen Congyang Write: When I use the command 'virsh save' to save the domain state, I receive the following error message: operation

[Qemu-devel] [PATCH v2] disable sigcld handling before calling pclose()

2010-12-20 Thread Wen Congyang
SIGCHLD handling and the other one is in pclose(). We should disable sigcld handling before calling pclose(). v2: - Add stub functions for Win32 Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- os-posix.c | 19 +++ qemu-os-posix.h |2 ++ qemu-os-win32.h |2

Re: [Qemu-devel] [PATCH v2] disable sigcld handling before calling pclose()

2011-01-04 Thread Wen Congyang
At 12/21/2010 12:05 PM, Wen Congyang Write: When I use the command 'virsh save' to save the domain state, I receive the following error message: operation failed: Migration unexpectedly failed. I debug the qemu by adding some printf(), and find the function pclose() returns -1. I use

Re: [Qemu-devel] [PATCH] Remove a detached device from qemu_device_opts.

2011-02-13 Thread Wen Congyang
At 01/27/2011 05:00 PM, Ken'ichi Ohmichi Write: Hi, When I tried to attach the interface after detaching the same interface, the virsh command output the following and it failed: # virsh detach-interface Domain01 network --mac 52:54:00:0d:78:92 Interface detached successfully #

[Qemu-devel] [PATCH] fix memory leak when we uninit a drive

2011-02-15 Thread Wen Congyang
We alloc memory for dinfo-id, so we should free it in the function drive_uninit(). Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- blockdev.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/blockdev.c b/blockdev.c index ecfadc1..1333a4e 100644 --- a/blockdev.c

[Qemu-devel] [PATCH] uninit drive if drive_init failed

2011-02-15 Thread Wen Congyang
failed. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- blockdev.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index 1333a4e..03cc000 100644 --- a/blockdev.c +++ b/blockdev.c @@ -527,7 +527,7 @@ DriveInfo *drive_init(QemuOpts

Re: [Qemu-devel] [PATCH] uninit drive if drive_init failed

2011-02-16 Thread Wen Congyang
At 02/16/2011 05:45 PM, Markus Armbruster Write: Wen Congyang we...@cn.fujitsu.com writes: steps to reproduce this bug: 1. virsh attach-disk domain --source imagefile --target sdb --sourcetype file --driver qemu --subdriver qcow2 error: Failed to attach disk error: operation failed

[Qemu-devel] [PATCH] reset nic when we init it

2011-02-23 Thread Wen Congyang
When we hotplug a nic to guest OS, we can see it but the mac address of nic is wrong. The reason of this bug is guest OS does not reset nic, and we init eeprom(rtl8139) only when we reset nic. I think we should reset nic when we init it. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw

Re: [Qemu-devel] null mac address

2011-02-24 Thread Wen Congyang
function. I will test this method. If it's OK, I will send a new patch. Thnaks Wen Congyang Regards,

Re: [Qemu-devel] null mac address

2011-02-24 Thread Wen Congyang
. Thanks Wen Congyang From efa0632f563a69dc299daaf4b235c1a0521d6e02 Mon Sep 17 00:00:00 2001 From: Wen Congyang we...@cn.fujitsu.com Date: Fri, 25 Feb 2011 09:56:27 +0800 Subject: [PATCH] move eeprom init from reset function to init function --- hw/pcnet-pci.c | 12 hw/pcnet.c

[Qemu-devel] [PATCH] fix vnc regression

2011-02-24 Thread Wen Congyang
This patch fix the following two regressions: 1. we should use bitmap_set() and bitmap_clear() to replace vnc_set_bits(). 2. The unit of bitmap_intersects()'third parameter is bit, not words. But we pass the num of words to bitmap_intersects(). Signed-off-by: Wen Congyang we...@cn.fujitsu.com

Re: [Qemu-devel] VNC broken in cf76a1ce8b7cf4b92429d67d3f4626a92b2d8a37

2011-02-24 Thread Wen Congyang
At 02/25/2011 03:07 PM, Corentin Chary Write: On Fri, Feb 25, 2011 at 7:48 AM, Gerhard Wiesinger li...@wiesinger.com wrote: Hello, VNC updates don't work correctly in git version cf76a1ce8b7cf4b92429d67d3f4626a92b2d8a37 (was ok around 1-2 weeks ago). I guess was due to latest

[Qemu-devel] [PATCH v2] move eeprom init from reset function to init function

2011-02-27 Thread Wen Congyang
not need init again in reset function. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw/pcnet.c | 27 ++- hw/rtl8139.c | 24 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/hw/pcnet.c b/hw/pcnet.c index db52dc5..4499031

[Qemu-devel] [PATCH] fix build errors when we enable acpi_piix4 debug

2011-02-27 Thread Wen Congyang
: format ‘%04x’ expects type ‘unsigned int’, but argument 2 has type ‘uint64_t’ make[1]: *** [acpi_piix4.o] Error 1 make: *** [subdir-libhw64] Error 2 Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw/acpi_piix4.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-02-27 Thread Wen Congyang
this behavior is a normal behavior? The following patch can fix this problem. From 3c149575b52261b8da9a73d5c4ebdfedce9866c1 Mon Sep 17 00:00:00 2001 From: Wen Congyang we...@cn.fujitsu.com Date: Mon, 28 Feb 2011 10:33:45 +0800 Subject: [PATCH] pend hotplug event until last event is handled by guest OS

Re: [Qemu-devel] [PATCH] vnc: Fix heap corruption

2011-02-28 Thread Wen Congyang
) / 16)); cmp_bytes = 16 * ds_get_bytes_per_pixel(vd-ds); guest_row = vd-guest.ds-data; server_row = vd-server-data; Thanks Wen Congyang cmp_bytes = 16 * ds_get_bytes_per_pixel(vd-ds); guest_row = vd-guest.ds-data; server_row = vd-server-data;

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-02-28 Thread Wen Congyang
, those bits are checked and raise sci if necessary. Any comments on this? Anyway the current pci hotplug-related commands are somewhat broken, and needs clean up with multifunction hotplug support which is on my todo list. thanks On Mon, Feb 28, 2011 at 10:52:40AM +0800, Wen Congyang

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-02-28 Thread Wen Congyang
At 03/01/2011 03:13 PM, Isaku Yamahata Write: On Tue, Mar 01, 2011 at 02:58:44PM +0800, Wen Congyang wrote: At 03/01/2011 12:11 PM, Isaku Yamahata Write: Hi. I don't suppose that just introducing pending bits solve the issue. Your test only use single hot plug/unplug. How about mixing

[Qemu-devel] [PATCH RESEND v2 1/2] fix vnc regression

2011-03-01 Thread Wen Congyang
of bitmap_clear() Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- ui/vnc.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 610f884..e3761b0 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1645,17 +1645,21 @@ static void

[Qemu-devel] [PATCH RESEND 2/2] vnc: Fix heap corruption

2011-03-01 Thread Wen Congyang
to be cleared to bitmap_clear(). Signed-off-by: Wen Congyang we...@cn.fujitsu.com Reported-by: Stefan Weil w...@mail.berlios.de --- ui/vnc.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index e3761b0..e7d0b5b 100644 --- a/ui/vnc.c +++ b/ui/vnc.c

Re: [Qemu-devel] Re: [PATCH RESEND 2/2] vnc: Fix heap corruption

2011-03-02 Thread Wen Congyang
At 03/03/2011 06:27 AM, Stefan Weil Write: Am 02.03.2011 23:01, schrieb Stefan Weil: Am 02.03.2011 19:47, schrieb Peter Maydell: On 2 March 2011 18:36, Stefan Weil w...@mail.berlios.de wrote: No. I dont't think that the third parameter of bitmap_clear is ok like that. See my patch for the

[Qemu-devel] [PATCH 3/3] correct VNC_DIRTY_WORDS on 64 bit machine

2011-03-02 Thread Wen Congyang
VNC_DIRTY_WORDS is wrong on 64 bit long machine. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- ui/vnc.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ui/vnc.h b/ui/vnc.h index 8a1e7b9..239a7a7 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -81,7 +81,8 @@ typedef

Re: [Qemu-devel] [PATCH v2] disable sigcld handling before calling pclose()

2011-03-02 Thread Wen Congyang
At 12/21/2010 12:05 PM, Wen Congyang Write: When I use the command 'virsh save' to save the domain state, I receive the following error message: operation failed: Migration unexpectedly failed. I debug the qemu by adding some printf(), and find the function pclose() returns -1. I use

[Qemu-devel] Re: [PATCH 3/3] correct VNC_DIRTY_WORDS on 64 bit machine

2011-03-02 Thread Wen Congyang
At 03/03/2011 02:41 PM, Corentin Chary Write: On Thu, Mar 3, 2011 at 3:44 AM, Wen Congyang we...@cn.fujitsu.com wrote: VNC_DIRTY_WORDS is wrong on 64 bit long machine. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- ui/vnc.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions

[Qemu-devel] [PATCH v2 3/3] correct VNC_DIRTY_WORDS on 64 bit machine

2011-03-02 Thread Wen Congyang
VNC_DIRTY_WORDS is wrong on 64 bit long machine. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- ui/vnc.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ui/vnc.h b/ui/vnc.h index 8a1e7b9..5fc54e5 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -81,7 +81,7 @@ typedef void

[Qemu-devel] Re: [PATCH] moving eeprom initialization

2011-03-06 Thread Wen Congyang
At 03/07/2011 05:27 AM, William Dauchy Write: The initialization should not be only on reset but also when initializing the device. It resolves a bug when hot plugging a pci network device: the mac address was always null. Signed-off-by: William Dauchy wdau...@gmail.com Signed-off-by: Wen

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-03-08 Thread Wen Congyang
At 03/09/2011 02:12 PM, Ryan Harper Write: * Wen Congyang we...@cn.fujitsu.com [2011-03-08 23:09]: At 03/09/2011 12:08 PM, Ryan Harper Write: * Wen Congyang we...@cn.fujitsu.com [2011-02-27 20:56]: Hi Markus Armbruster At 02/23/2011 04:30 PM, Markus Armbruster Write: Isaku Yamahata yamah

[Qemu-devel] [PATCH RESEND v3] fix vnc regression

2011-03-11 Thread Wen Congyang
This patch fix the following regression: 1. we should use bitmap_set() and bitmap_clear() to replace vnc_set_bits(). Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- ui/vnc.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 34dc0cd

[Qemu-devel] Re: [PATCH 3/4] fix vnc regression

2011-03-21 Thread Wen Congyang
At 03/21/2011 04:34 PM, Corentin Chary Write: From: Wen Congyang we...@cn.fujitsu.com This patch fix the following regression: 1. we should use bitmap_set() and bitmap_clear() to replace vnc_set_bits(). Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Corentin Chary

[Qemu-devel] [RFC][PATCT 0/8 v3] dump memory when host pci device is used by guest

2011-12-20 Thread Wen Congyang
. address Jan Kiszka's comment Changes from v1 to v2: 1. fix virt addr in the vmcore. Wen Congyang (8): Add API to create memory mapping list Add API to check whether a physical address is I/O address target-i386: implement cpu_get_memory_mapping() Add API to get memory mapping target

[Qemu-devel] [RFC][PATCH 1/8 v3] Add API to create memory mapping list

2011-12-20 Thread Wen Congyang
The memory mapping list stores virtual address and physical address mapping. The folloing patch will use this information to create PT_LOAD in the vmcore. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |1 + memory_mapping.c | 130

[Qemu-devel] [RFC][PATCH 2/8 v3] Add API to check whether a physical address is I/O address

2011-12-20 Thread Wen Congyang
This API will be used in the following patch. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-common.h |1 + exec.c | 20 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index 8295e4f..75c01c3 100644 --- a/cpu

[Qemu-devel] [RFC][PATCH 3/8 v3] target-i386: implement cpu_get_memory_mapping()

2011-12-20 Thread Wen Congyang
Walk cpu's page table and collect all virtual address and physical address mapping. Then, add these mapping into memory mapping list. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |2 +- cpu-all.h |7 ++ target-i386/arch-dump.c | 254

[Qemu-devel] [RFC][PATCH 4/8 v3] Add API to get memory mapping

2011-12-20 Thread Wen Congyang
Add API to get all virtual address and physical address mapping. If there is no virtual address for some physical address, the virtual address is 0. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- memory_mapping.c | 55

[Qemu-devel] [RFC][PATCH 5/8 v3] target-i386: Add API to write elf notes to core file

2011-12-20 Thread Wen Congyang
The core file contains register's value. These API write registers to core file, and them will be called in the following patch. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-all.h |6 + target-i386/arch-dump.c | 246

[Qemu-devel] [RFC][PATCH 6/8 v3] target-i386: Add API to add extra memory mapping

2011-12-20 Thread Wen Congyang
Crash needs extra memory mapping to determine phys_base. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-all.h |2 ++ target-i386/arch-dump.c | 44 2 files changed, 46 insertions(+), 0 deletions(-) diff --git a/cpu-all.h

[Qemu-devel] [RFC][PATCH 7/8 v3] target-i386: add API to get dump info

2011-12-20 Thread Wen Congyang
Dump info contains: endian, class and architecture. The next patch will use these information to create vmcore. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-all.h |3 +++ dump.h | 10 ++ target-i386/arch-dump.c | 34

[Qemu-devel] [RFC][PATCH 8/8 v3] introduce a new monitor command 'dump' to dump guest's memory

2011-12-20 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |8 +- dump.c | 452 +++ dump.h |4 + hmp-commands.hx | 16 ++ monitor.c |3 + qmp-commands.hx | 24 +++ 6 files changed, 503

Re: [Qemu-devel] [RFC][PATCH 8/8 v3] introduce a new monitor command 'dump' to dump guest's memory

2011-12-20 Thread Wen Congyang
At 12/21/2011 12:25 AM, Eric Blake Write: On 12/20/2011 02:15 AM, Wen Congyang wrote: Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |8 +- dump.c | 452 +++ dump.h |4 + hmp-commands.hx

[Qemu-devel] [RFC][PATCT 0/14 v4] dump memory when host pci device is used by guest

2012-01-03 Thread Wen Congyang
in the vmcore. Wen Congyang (14): Add API to create memory mapping list Add API to check whether a physical address is I/O address target-i386: implement cpu_get_memory_mapping() Add API to get memory mapping target-i386: Add API to write elf notes to core file target-i386: Add API to add

[Qemu-devel] [RFC][PATCH 01/14 v4] Add API to create memory mapping list

2012-01-03 Thread Wen Congyang
The memory mapping list stores virtual address and physical address mapping. The folloing patch will use this information to create PT_LOAD in the vmcore. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |1 + memory_mapping.c | 130

[Qemu-devel] [RFC][PATCH 02/14 v4] Add API to check whether a physical address is I/O address

2012-01-03 Thread Wen Congyang
This API will be used in the following patch. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-common.h |2 ++ exec.c | 20 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index 3fe44d2..0309137 100644 --- a/cpu

[Qemu-devel] [RFC][PATCH 03/14 v4] target-i386: implement cpu_get_memory_mapping()

2012-01-03 Thread Wen Congyang
Walk cpu's page table and collect all virtual address and physical address mapping. Then, add these mapping into memory mapping list. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |2 +- cpu-all.h |7 ++ target-i386/arch-dump.c | 254

[Qemu-devel] [RFC][PATCH 04/14 v4] Add API to get memory mapping

2012-01-03 Thread Wen Congyang
Add API to get all virtual address and physical address mapping. If there is no virtual address for some physical address, the virtual address is 0. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- memory_mapping.c | 55

[Qemu-devel] [RFC][PATCH 05/14 v4] target-i386: Add API to write elf notes to core file

2012-01-03 Thread Wen Congyang
The core file contains register's value. These APIs write registers to core file, and them will be called in the following patch. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-all.h |6 + target-i386/arch-dump.c | 243

[Qemu-devel] [RFC][PATCH 06/14 v4] target-i386: Add API to add extra memory mapping

2012-01-03 Thread Wen Congyang
Crash needs extra memory mapping to determine phys_base. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-all.h |2 ++ target-i386/arch-dump.c | 43 +++ 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/cpu-all.h b

[Qemu-devel] [RFC][PATCH 07/14 v4] target-i386: add API to get dump info

2012-01-03 Thread Wen Congyang
Dump info contains: endian, class and architecture. The next patch will use these information to create vmcore. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-all.h |3 +++ dump.h | 10 ++ target-i386/arch-dump.c | 34

[Qemu-devel] [RFC][PATCH 08/14 v4] introduce a new monitor command 'dump' to dump guest's memory

2012-01-03 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |8 +- dump.c | 588 +++ dump.h |4 + hmp-commands.hx | 16 ++ monitor.c |3 + qmp-commands.hx | 26 +++ 6 files changed, 641

[Qemu-devel] [RFC][PATCH 09/14 v4] run dump at the background

2012-01-03 Thread Wen Congyang
The new monitor command dump may take long time to finish. So we need run it at the background. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 158 1 files changed, 139 insertions(+), 19 deletions(-) diff --git

[Qemu-devel] [RFC][PATCH 10/14 v4] support detached dump

2012-01-03 Thread Wen Congyang
Let the user to choose whether to block other monitor command while dumping. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 24 +++- hmp-commands.hx |8 qmp-commands.hx |7 --- 3 files changed, 27 insertions(+), 12 deletions

[Qemu-devel] [RFC][PATCH 11/14 v4] support to cancel the current dumping

2012-01-03 Thread Wen Congyang
Add API to allow the user to cancel the current dumping. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 14 ++ hmp-commands.hx | 14 ++ hmp.c|5 + hmp.h|1 + qapi-schema.json | 13 + qmp

[Qemu-devel] [RFC][PATCH 12/14 v4] support to set dumping speed

2012-01-03 Thread Wen Congyang
Add API to allow the user to control dumping speed Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 12 hmp-commands.hx | 15 +++ hmp.c|6 ++ hmp.h|1 + qapi-schema.json | 15 +++ qmp

[Qemu-devel] [RFC][PATCH 13/14 v4] support to query dumping status

2012-01-03 Thread Wen Congyang
Add API to allow the user to query dumping status. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 30 ++ hmp-commands.hx |2 ++ hmp.c| 13 + hmp.h|1 + monitor.c|7 +++ qapi

[Qemu-devel] [RFC][PATCH 14/14 v4] auto cancel dumping after vm state is changed to run

2012-01-03 Thread Wen Congyang
The command dump does not support to dump while vm is running. If the user resume the vm, we should auto cancel dumping and set the status to failed. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff

Re: [Qemu-devel] [RFC][PATCT 0/14 v4] dump memory when host pci device is used by guest

2012-01-10 Thread Wen Congyang
Hi, Jan Kiszka Do you have any time to review this patchset? Thanks Wen Congyang At 01/04/2012 01:44 PM, Wen Congyang Wrote: Hi, all 'virsh dump' can not work when host pci device is used by guest. We have discussed this issue here: http://lists.nongnu.org/archive/html/qemu-devel/2011-10

Re: [Qemu-devel] [RFC][PATCH 08/14 v4] introduce a new monitor command 'dump' to dump guest's memory

2012-01-10 Thread Wen Congyang
At 01/10/2012 09:30 PM, Luiz Capitulino Wrote: On Wed, 04 Jan 2012 14:11:01 +0800 Wen Congyang we...@cn.fujitsu.com wrote: Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |8 +- dump.c | 588

Re: [Qemu-devel] [RFC][PATCH 08/14 v4] introduce a new monitor command 'dump' to dump guest's memory

2012-01-13 Thread Wen Congyang
At 01/12/2012 09:49 PM, Luiz Capitulino Wrote: On Wed, 11 Jan 2012 08:59:24 +0800 Wen Congyang we...@cn.fujitsu.com wrote: At 01/10/2012 09:30 PM, Luiz Capitulino Wrote: On Wed, 04 Jan 2012 14:11:01 +0800 Wen Congyang we...@cn.fujitsu.com wrote: Signed-off-by: Wen Congyang we

[Qemu-devel] [RFC][PATCH 00/15 v5] introducing a new, dedicated memory dump mechanism

2012-01-18 Thread Wen Congyang
and query dumping progress 3. add API to control dumping speed 4. auto cancel dumping when the user resumes vm, and the status is failed. Changes from v2 to v3: 1. address Jan Kiszka's comment Changes from v1 to v2: 1. fix virt addr in the vmcore. Wen Congyang (15): monitor: introduce

[Qemu-devel] [RFC][PATCH 01/15] monitor: introduce qemu_suspend_monitor()/qemu_resume_monitor()

2012-01-18 Thread Wen Congyang
Sync command needs these two APIs to suspend/resume monitor. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- monitor.c | 27 +++ monitor.h |2 ++ 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 56f3778..ce2bc13 100644

[Qemu-devel] [RFC][PATCH 02/15] Add API to create memory mapping list

2012-01-18 Thread Wen Congyang
The memory mapping list stores virtual address and physical address mapping. The folloing patch will use this information to create PT_LOAD in the vmcore. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |1 + memory_mapping.c | 130

[Qemu-devel] [RFC][PATCH 03/15] Add API to check whether a physical address is I/O address

2012-01-18 Thread Wen Congyang
This API will be used in the following patch. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-common.h |2 ++ exec.c | 16 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index a40c57d..d047137 100644 --- a/cpu

[Qemu-devel] [RFC][PATCH 05/15] Add API to get memory mapping

2012-01-18 Thread Wen Congyang
Add API to get all virtual address and physical address mapping. If there is no virtual address for some physical address, the virtual address is 0. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- memory_mapping.c | 55

[Qemu-devel] [RFC][PATCH 07/15] target-i386: Add API to add extra memory mapping

2012-01-18 Thread Wen Congyang
Crash needs extra memory mapping to determine phys_base. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-all.h |2 ++ target-i386/arch-dump.c | 43 +++ 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/cpu-all.h b

[Qemu-devel] [RFC][PATCH 13/15 v5] support to set dumping speed

2012-01-18 Thread Wen Congyang
Add API to allow the user to control dumping speed Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 12 hmp-commands.hx | 15 +++ hmp.c|6 ++ hmp.h|1 + qapi-schema.json | 15 +++ qmp

[Qemu-devel] [RFC][PATCH 14/15 v5] support to query dumping status

2012-01-18 Thread Wen Congyang
Add API to allow the user to query dumping status. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 32 hmp-commands.hx |2 ++ hmp.c| 17 + hmp.h|1 + monitor.c|7

[Qemu-devel] [RFC][PATCH 09/15] introduce a new monitor command 'dump' to dump guest's memory

2012-01-18 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |8 +- dump.c | 590 ++ dump.h |3 + hmp-commands.hx | 16 ++ hmp.c|9 + hmp.h|1 + monitor.c|3

[Qemu-devel] [RFC][PATCH 12/15 v5] support to cancel the current dumping

2012-01-18 Thread Wen Congyang
Add API to allow the user to cancel the current dumping. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 13 + hmp-commands.hx | 14 ++ hmp.c|5 + hmp.h|1 + qapi-schema.json | 13 + qmp

Re: [Qemu-devel] [RFC][PATCH 00/15 v5] introducing a new, dedicated memory dump mechanism

2012-01-18 Thread Wen Congyang
At 01/19/2012 11:32 AM, Jun Koi Wrote: On Thu, Jan 19, 2012 at 10:50 AM, Wen Congyang we...@cn.fujitsu.com wrote: Hi, all 'virsh dump' can not work when host pci device is used by guest. We have discussed this issue here: http://lists.nongnu.org/archive/html/qemu-devel/2011-10/msg00736.html

[Qemu-devel] [RFC][PATCH 06/15] target-i386: Add API to write elf notes to core file

2012-01-18 Thread Wen Congyang
The core file contains register's value. These APIs write registers to core file, and them will be called in the following patch. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-all.h |6 + target-i386/arch-dump.c | 243

[Qemu-devel] [RFC][PATCH 04/15] target-i386: implement cpu_get_memory_mapping()

2012-01-18 Thread Wen Congyang
Walk cpu's page table and collect all virtual address and physical address mapping. Then, add these mapping into memory mapping list. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |2 +- cpu-all.h |7 ++ target-i386/arch-dump.c | 254

[Qemu-devel] [RFC][PATCH 10/15] run dump at the background

2012-01-18 Thread Wen Congyang
The new monitor command dump may take long time to finish. So we need run it at the background. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 155 1 files changed, 136 insertions(+), 19 deletions(-) diff --git

[Qemu-devel] [RFC][PATCH 08/15] target-i386: add API to get dump info

2012-01-18 Thread Wen Congyang
Dump info contains: endian, class and architecture. The next patch will use these information to create vmcore. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-all.h |3 +++ dump.h | 10 ++ target-i386/arch-dump.c | 34

[Qemu-devel] [RFC][PATCH 11/15 v5] support detached dump

2012-01-18 Thread Wen Congyang
Let the user to choose whether to block other monitor command while dumping. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 12 hmp-commands.hx |8 hmp.c|3 ++- qapi-schema.json |2 +- qmp-commands.hx |7 --- 5

[Qemu-devel] [RFC][PATCH 15/15 v5] auto cancel dumping after vm state is changed to run

2012-01-18 Thread Wen Congyang
The command dump does not support to dump while vm is running. If the user resume the vm, we should auto cancel dumping and set the status to failed. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- dump.c | 19 +++ vl.c |5 +++-- 2 files changed, 22 insertions(+), 2

[Qemu-devel] [RFC] dump memory when host pci device is used by guest

2011-11-16 Thread Wen Congyang
0x8103be8b in ?? () (gdb) bt #0 0x8103be8b in ?? () Cannot access memory at address 0x8170dec8 (gdb) q My first and the most important question is that: Is there necessary to continue this work? The attachment is the sample patch. Thanks Wen Congyang From

Re: [Qemu-devel] [RFC] dump memory when host pci device is used by guest

2011-11-21 Thread Wen Congyang
Wen Congyang Jan

[Qemu-devel] [RFC][PATCH] introduce a new monitor command 'dump' to dump guest's memory

2011-11-28 Thread Wen Congyang
+ * + * Authors: + * Wen Congyang we...@cn.fujitsu.com + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * + */ + +#include qemu-common.h +#include unistd.h +#include elf.h +#include sys/procfs.h +#include cpu.h +#include cpu

Re: [Qemu-devel] can anyone help me ?

2011-11-28 Thread Wen Congyang
noprint pass to ignore this signal. Thanks Wen Congyang Thank you very much!

[Qemu-devel] [RFC][PATCT 0/5 v2] dump memory when host pci device is used by guest

2011-12-08 Thread Wen Congyang
. fix virt addr in the vmcore. Wen Congyang (5): Add API to create memory mapping list Add API to check whether a physical address is I/O address target-i386: implement cpu_get_memory_mapping() Add API to get memory mapping introduce a new monitor command 'dump' to dump guest's memory

[Qemu-devel] [RFC][PATCH 1/5 v2] Add API to create memory mapping list

2011-12-09 Thread Wen Congyang
The memory mapping list stores virtual address and physical address mapping. The folloing patch will use this information to create PT_LOAD in the vmcore. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |1 + memory_mapping.c | 130

[Qemu-devel] [RFC][PATCH 2/5 v2] Add API to check whether a physical address is I/O address

2011-12-09 Thread Wen Congyang
This API will be used in the following patch. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-common.h |1 + exec.c | 20 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index 7c9cef8..abcd1a6 100644 --- a/cpu

[Qemu-devel] [RFC][PATCH 3/5 v2] target-i386: implement cpu_get_memory_mapping()

2011-12-09 Thread Wen Congyang
Walk cpu's page table and collect all virtual address and physical address mapping. Then, add these mapping into memory mapping list. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- cpu-all.h| 10 ++ target-i386/helper.c | 239

[Qemu-devel] [RFC][PATCH 4/5 v2] Add API to get memory mapping

2011-12-09 Thread Wen Congyang
Add API to get all virtual address and physical address mapping. If there is no virtual address for some physical address, the virtual address is 0. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- memory_mapping.c | 53

[Qemu-devel] [RFC][PATCH 5/5v2] introduce a new monitor command 'dump' to dump guest's memory

2011-12-09 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Makefile.target |8 +- dump.c | 722 +++ dump.h |6 + hmp-commands.hx | 16 ++ monitor.c |3 + qmp-commands.hx | 24 ++ 6 files changed, 775 insertions

Re: [Qemu-devel] [RFC][PATCT 0/5 v2] dump memory when host pci device is used by guest

2011-12-12 Thread Wen Congyang
Hi, hatayama-san At 12/13/2011 11:12 AM, HATAYAMA Daisuke Write: Hello Wen, From: Wen Congyang we...@cn.fujitsu.com Subject: [Qemu-devel] [RFC][PATCT 0/5 v2] dump memory when host pci device is used by guest Date: Fri, 09 Dec 2011 15:57:26 +0800 Hi, all 'virsh dump' can not work when

Re: [Qemu-devel] [RFC][PATCT 0/5 v2] dump memory when host pci device is used by guest

2011-12-13 Thread Wen Congyang
At 12/13/2011 02:01 PM, HATAYAMA Daisuke Write: From: Wen Congyang we...@cn.fujitsu.com Subject: Re: [Qemu-devel] [RFC][PATCT 0/5 v2] dump memory when host pci device is used by guest Date: Tue, 13 Dec 2011 11:35:53 +0800 Hi, hatayama-san At 12/13/2011 11:12 AM, HATAYAMA Daisuke Write

Re: [Qemu-devel] [RFC][PATCT 0/5 v2] dump memory when host pci device is used by guest

2011-12-13 Thread Wen Congyang
At 12/13/2011 08:55 PM, Jan Kiszka Write: On 2011-12-09 08:57, Wen Congyang wrote: Hi, all 'virsh dump' can not work when host pci device is used by guest. We have discussed this issue here: http://lists.nongnu.org/archive/html/qemu-devel/2011-10/msg00736.html We have determined

Re: [Qemu-devel] [RFC][PATCH 1/5 v2] Add API to create memory mapping list

2011-12-14 Thread Wen Congyang
At 12/13/2011 09:03 PM, Jan Kiszka Write: On 2011-12-09 09:06, Wen Congyang wrote: The memory mapping list stores virtual address and physical address mapping. The folloing patch will use this information to create PT_LOAD in the vmcore. Signed-off-by: Wen Congyang we...@cn.fujitsu.com

Re: [Qemu-devel] [RFC][PATCT 0/5 v2] dump memory when host pci device is used by guest

2011-12-15 Thread Wen Congyang
At 12/15/2011 09:30 AM, HATAYAMA Daisuke Write: From: Wen Congyang we...@cn.fujitsu.com Subject: Re: [Qemu-devel] [RFC][PATCT 0/5 v2] dump memory when host pci device is used by guest Date: Tue, 13 Dec 2011 17:20:24 +0800 At 12/13/2011 02:01 PM, HATAYAMA Daisuke Write: From: Wen Congyang

[Qemu-devel] [PATCH] fix the return value of rtl8139_can_receive()

2011-06-16 Thread Wen Congyang
If rtl8139_can_receive() returns 1, it means that the nic can receive packet, otherwise, it means the nic can not receive packet. If !s-clock_enabled or !rtl8139_receiver_enabled(s), it means that the nic can not receive packet. So the return value should be 0, not 1. Signed-off-by: Wen Congyang

[Qemu-devel] [PATCH] do not send packet to nic if the packet will be dropped by nic

2011-06-16 Thread Wen Congyang
If !s-clock_enabled or !rtl8139_receiver_enabled(s), it means that the nic will drop all packets from host. So qemu will keep getting packets from host and wasting CPU on dropping packets. This seems worse than packets that should be dropped but aren't. Signed-off-by: Wen Congyang we

Re: [Qemu-devel] [PATCH] fix the return value of rtl8139_can_receive()

2011-06-16 Thread Wen Congyang
At 06/16/2011 06:39 PM, Kevin Wolf Write: Am 16.06.2011 10:23, schrieb Wen Congyang: If rtl8139_can_receive() returns 1, it means that the nic can receive packet, otherwise, it means the nic can not receive packet. If !s-clock_enabled or !rtl8139_receiver_enabled(s), it means that the nic

  1   2   3   4   5   6   7   8   9   10   >