[Qemu-devel] bug report

2013-10-06 Thread Peter Cheung
hi all I found a bug in qemu, when i invoke: cpu_physical_memory_rw(addr, mem_buf, noOfBytes, 0); where addr=0x0 and noOfBytes=50, qemu will has segmentation fault. I call the cpu_physical_memory_rw right after the qemu is started (haven't run yet) with gdb. Thanksfrom Peter

[Qemu-devel] the way i read the registers may wrong

2013-09-22 Thread Peter Cheung
Hi all I am using the following code to read registers, i can read the value of EIP, but when i dump the value pointed by EIP, all are zero, byte code should not be zero, so i think my code is wrong. Please point me out thanks? static void gkd_read_registers(CPUState *cpu, char *buffer) {

Re: [Qemu-devel] single step is too slow, if compare to bochs

2013-08-17 Thread Peter Cheung
The socket is lagging, i keep sending gdb command to qemu and read the result, for every 60 commands, i got 4 seconds lagging, it hangs on the socket:read() in my side for 4 seconds. The qemu is using g_io_channel_write_chars() function to send back the data through socket, anyway to optimize it

[Qemu-devel] single step is too slow, if compare to bochs

2013-08-17 Thread Peter Cheung
Hi Alli have written a java program, keep sending the gdb single step command to qemu, i can execute ~60 single steps per seconds. But in bochs i can execute ~130. How can I make qemu run faster in single step? Thanksfrom Peter

[Qemu-devel] question about gdb + qemu

2013-08-13 Thread Peter Cheung
Hi2. I have compile my qemu to --target-list=x86_64-softmmu , in gdb, why the registers is 32 bits? (gdb) i reax0x0 0ecx0xf7247edx 0x19a804 1681412ebx0x137 311esp0x19a0d0 0x19a0d0ebp0x9000 0x9000es

[Qemu-devel] mac -vnc has bug

2013-08-09 Thread Peter Cheung
Hi Allqemu 1.6.1 has bug when starting it with -vnc, when i connect it using vncviewer, the vncviewer will close automatically. $uname -aDarwin Peters-MacBook-Air.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 compile by:./

[Qemu-devel] porting peter-bochs to qemu

2013-06-23 Thread Peter Cheung
Hi I am porting peter-bochs debugger to qemu. I am stuck into the breakpoint->continue part. Anybody want to give a help to finish the debugger stub? https://www.dropbox.com/s/aidxcm9l1vnia1b/GKD.png https://www.dropbox.com/s/76a778f1a76ga7v/LibGKD.png?m Thanksfrom Peter

Re: [Qemu-devel] qemu-1.5.0 gdb not working

2013-06-15 Thread Peter Cheung
stepi is working. Date: Sat, 15 Jun 2013 20:56:57 +0200 From: fred.kon...@greensocs.com To: mcheun...@hotmail.com CC: qemu-devel@nongnu.org Subject: Re: [Qemu-devel] qemu-1.5.0 gdb not working On 15/06/2013 20:37, Peter Cheung wrote: qemu-1.5.0

[Qemu-devel] qemu-1.5.0 gdb not working

2013-06-15 Thread Peter Cheung
qemu-1.5.0 gdb not working In mac OSX, compile by :./configure --cc=/opt/local/bin/gcc-mp-4.8 --enable-cocoa --target-list=x86_64-softmmu --audio-drv-list=coreaudio --prefix=/Users/peter/qemu --enable-debug --disable-werror --extra-cflags=-O2 --enable-vnc start qemu by:~/qemu/bin/qemu-system-x8

[Qemu-devel] how to do performance monitor for single VM?

2013-06-11 Thread Peter Cheung
Dear AllMy name is Peter, i am working on a open source project called "Pandora". It is a new admin console for openstack. http://peter.kingofcoders.com/?p=663How to do performance monitor for single VM? For public cloud billing system, i need to know information about CPU/memory/IO tra

Re: [Qemu-devel] latest qemu with gdb remote not working

2013-06-10 Thread Peter Cheung
mcheun...@hotmail.com > Subject: Re: [Qemu-devel] latest qemu with gdb remote not working > > Il 03/06/2013 09:42, Peter Crosthwaite ha scritto: > > Hi Peter and Peter :) > > > > On Sun, Jun 2, 2013 at 7:27 PM, Peter Maydell > > wrote: > >> On 2 June 20

Re: [Qemu-devel] latest qemu with gdb remote not working

2013-06-10 Thread Peter Cheung
Sorry about that, i forgot i am in a mailing list > Date: Mon, 3 Jun 2013 06:19:56 -0600 > From: ebl...@redhat.com > To: mcheun...@hotmail.com > CC: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] latest qemu with gdb remote not working > > On 06/01/2013 02:09 PM, Pete

Re: [Qemu-devel] latest qemu with gdb remote not working

2013-06-01 Thread Peter Cheung
mail.com; qemu-devel@nongnu.org > > On 1 June 2013 23:57, Peter Crosthwaite wrote: > > On Sun, Jun 2, 2013 at 6:09 AM, Peter Cheung wrote: > >> i start my qemu by this > >> > >> ~/qemu/bin/qemu-system-x86_64 -hda hd10meg.img -gdb tcp::1234 -k en-us -S > &

Re: [Qemu-devel] latest qemu with gdb remote not working

2013-06-01 Thread Peter Cheung
not working > > Hi Peter, > > On Sun, Jun 2, 2013 at 6:09 AM, Peter Cheung wrote: > > i start my qemu by this > > > > ~/qemu/bin/qemu-system-x86_64 -hda hd10meg.img -gdb tcp::1234 -k en-us -S -m > > 256m > > > > it was working before, but not for the l

Re: [Qemu-devel] This is an out of tree build but your source tree

2013-05-20 Thread Peter Cheung
Nice idea, thanks Andreas > Date: Mon, 20 May 2013 17:59:12 +0200 > From: afaer...@suse.de > To: mcheun...@hotmail.com > CC: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] This is an out of tree build but your source tree > > Hi, > > Am 20.05.2013 04:33, schri

Re: [Qemu-devel] This is an out of tree build but your source tree

2013-05-20 Thread Peter Cheung
Thanks gentlemen :-) > Date: Mon, 20 May 2013 08:17:33 +0200 > From: stefa...@gmail.com > To: mcheun...@hotmail.com > CC: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] This is an out of tree build but your source tree > > On Mon, May 20, 2013 at 4:33 AM, Peter Cheung wr

[Qemu-devel] compile the latest source in mac error

2013-05-04 Thread Peter Cheung
compile the latest source in mac error /Users/peter/q/qemu>make installinstall -d -m 0755 "/Users/peter/qemu/share/doc/qemu"install -c -m 0644 qemu-doc.html qemu-tech.html "/Users/peter/qemu/share/doc/qemu"install -c -m 0644 QMP/qmp-commands.txt "/Users/peter/qemu/share/doc/qemu"install -d -m 0

Re: [Qemu-devel] Is is a bug? (window scale)

2013-03-19 Thread Peter Cheung
Thank you MR Huang Thanksfrom Peter > Date: Wed, 20 Mar 2013 09:26:38 +0800 > From: riegama...@gmail.com > To: mcheun...@hotmail.com > CC: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] Is is a bug? (window scale) > > On Wed, Mar 20, 2013 at 1:12 AM, Peter Cheung wrote

[Qemu-devel] OOM don't like qemu-kvm

2013-03-19 Thread Peter Cheung
Hi AllMy compuer is i7 with 32 GB ram without swap, i try to launch 28 vm with 1GB ram each, it runs smoothly.If I launch 64 VMs, after the VMs eat up all the memory, the linux hang. If the linux is lack of memory, the OOM will try to kill process, right? And the OOM should pick those qemu-k

Re: [Qemu-devel] Is is a bug? (window scale)

2013-03-19 Thread Peter Cheung
-devel@nongnu.org > Subject: Re: [Qemu-devel] Is is a bug? (window scale) > > On 03/17/2013 10:34 PM, Peter Cheung wrote: > > Hi All Is is a bug? (window scale) > > I am running Fedora 18 64 bits. > > Sending a 1.8 megabyte email, with a question embedded in the attached

[Qemu-devel] correct step to invoke a single step?

2013-02-16 Thread Peter Cheung
Hi AllIs it the correct step to invoke a single step? It will fail when currec IP hit a breakpoint, but i can't find any different than the gdb stub. static int sstep_flags = SSTEP_ENABLE | SSTEP_NOIRQ | SSTEP_NOTIMER;CPUArchState *cpu = first_cpu;cpu_single_step(cpu, sstep_flags);vm_start()

[Qemu-devel] single step not working after hit a break point

2013-02-14 Thread Peter Cheung
Hi All I use the following code to insert a breakpoint in physical address 0×160CPUArchState *cpu = first_cpu; hwaddr addr; sscanf(command + 2, "%ld", &addr); int err = cpu_breakpoint_insert(cpu, addr, BP_GDB, NULL );qemu successfully hit the breakpoint and stop, then i try to single-step

Re: [Qemu-devel] read memory by virtual address?

2012-12-09 Thread Peter Cheung
> To: qemu-devel@nongnu.org > From: i.mitsya...@samsung.com > Date: Mon, 3 Dec 2012 23:05:39 +0400 > CC: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] read memory by virtual address? > > On 12/03/2012 08:53 PM, Peter Cheung wrote: > > Dear All > >

[Qemu-devel] read memory by virtual address?

2012-12-03 Thread Peter Cheung
Dear AllI can read memory by a physical address "cpu_physical_memory_map()", but how can i read it by linear address or virtual address? Thanksfrom Peter

Re: [Qemu-devel] func call to safely shutdown VM and quit qemu?

2012-12-03 Thread Peter Cheung
> Date: Mon, 3 Dec 2012 10:30:41 +0100 > From: laurent.desnog...@gmail.com > To: mcheun...@hotmail.com > CC: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] func call to safely shutdown VM and quit qemu? > > On Mon, Dec 3, 2012 at 9:43 AM, Peter Cheung wrote: > > Hi

[Qemu-devel] func call to safely shutdown VM and quit qemu?

2012-12-03 Thread Peter Cheung
Hi Is there a func call to safely shutdown VM and quit qemu? Thanksfrom Peter

[Qemu-devel] manually refresh the screen

2012-11-25 Thread Peter Cheung
Hi All Which code i can refresh the screen manually? Thanksfrom Peter

Re: [Qemu-devel] no monitor after disable vnc

2012-11-19 Thread Peter Cheung
Hi --enable-sdl can come up with a monitor screen, thanks Thanksfrom Peter > Date: Mon, 19 Nov 2012 14:38:45 +0100 > From: pbonz...@redhat.com > To: mcheun...@hotmail.com > CC: qemu-devel@nongnu.org > Subject: Re: no monitor after disable vnc > > Il 19/11/2012 14:25, Pe

[Qemu-devel] no monitor after disable vnc

2012-11-19 Thread Peter Cheung
Dear All When i compile qemu in ubuntu 12.10 with "./configure --target-list=i386-softmmu --prefix=/root/qemu --enable-debug --disable-vnc --disable-werror" , after i start qemu, no screen output, how to enable it? Thanksfrom Peter

Re: [Qemu-devel] Adding another debug protocol

2012-11-15 Thread Peter Cheung
39 +0100 > From: jan.kis...@web.de > To: mcheun...@hotmail.com > CC: peter.mayd...@linaro.org; qemu-devel@nongnu.org > Subject: Re: Adding another debug protocol > > On 2012-11-15 02:58, Peter Cheung wrote: > >> Date: Wed, 14 Nov 2012 17:43:12 +0100 > >>

Re: [Qemu-devel] multiple gdbserver

2012-11-15 Thread Peter Cheung
gt; Subject: Re: multiple gdbserver > > On 2012-11-15 09:33, Peter Cheung wrote: > > OK, thanks, then my question would be: > > > > why one gdbserver hosting two tcp ports? not useful, right? > > And therefore it's not the case. > > What are you

Re: [Qemu-devel] multiple gdbserver

2012-11-15 Thread Peter Cheung
; > On 2012-11-15 09:01, Peter Cheung wrote: > > Hi all I just rad the qemu source code, when it allows us to start > > multiple gdbserver? what is the reason doing that? > > I think you misread the code: There can only be a single instance of the > gdbserve

[Qemu-devel] multiple gdbserver

2012-11-15 Thread Peter Cheung
Hi all I just rad the qemu source code, when it allows us to start multiple gdbserver? what is the reason doing that? Thanksfrom Peter

Re: [Qemu-devel] Adding another debug protocol

2012-11-14 Thread Peter Cheung
> Date: Wed, 14 Nov 2012 17:43:12 +0100 > From: jan.kis...@siemens.com > To: mcheun...@hotmail.com > CC: peter.mayd...@linaro.org; qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] Adding another debug protocol > > On 2012-11-14 17:28, Peter Cheung wrote: > > hi Jan, yo

Re: [Qemu-devel] Adding another debug protocol

2012-11-14 Thread Peter Cheung
call graph history, real time address probeing. I know qemu is made by a lots of people, seems not easy to convince everyone. 從我的 iPad 傳送 "Jan Kiszka" 於 2012年11月14日 下午11:13 寫道: > On 2012-11-14 15:40, Peter Cheung wrote: >> Hi Cannot use gdb protocol, because it is slow. >

Re: [Qemu-devel] Adding another debug protocol

2012-11-14 Thread Peter Cheung
u-devel] Adding another debug protocol > > On 14 November 2012 10:45, Peter Cheung wrote: > > Dear All > > I am going to add another debugger server into QEMU, so i need to > > 1) create another socket server, similar than gdbserver, to receive the > > command fro

[Qemu-devel] Adding another debug protocol

2012-11-14 Thread Peter Cheung
Dear AllI am going to add another debugger server into QEMU, so i need to1) create another socket server, similar than gdbserver, to receive the command from debugger2) add another option, such as "--start-debugger-server" to start the socket server. After I work out the whole thing, how can

[Qemu-devel] qemu-kvm not listed by command "virsh list --all"

2012-11-12 Thread Peter Cheung
Dear All Run a VM by qemu-kvm, and then i cannot list it by command "virsh list --all". Why?I am sure the VM is running because i can vnc to it. Thanksfrom Peter

Re: [Qemu-devel] peter-bochs with QEMU

2012-11-11 Thread Peter Cheung
Thank youfrom Peter > Date: Sun, 11 Nov 2012 16:26:05 +0800 > From: riegama...@gmail.com > To: mcheun...@hotmail.com > CC: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] peter-bochs with QEMU > > Hi Peter, > > 2012/11/11 Peter Cheung > > > > Dear

Re: [Qemu-devel] add debugger command

2011-12-28 Thread Peter Cheung
l] add debugger command > > Am 28.12.2011 07:35, schrieb Peter Cheung: > > Dear All > > Please take a look http://peter-bochs.googlecode.com , I am an > > operating system developer, bochs has a great build in command-line > > debugger, but it is not good enough for no

Re: [Qemu-devel] add debugger command

2011-12-27 Thread Peter Cheung
il.com > To: mcheun...@hotmail.com > CC: che...@iis.sinica.edu.tw; qemu-devel@nongnu.org > > 2011/12/28 Peter Cheung : > > Hi, I am chinese too. Am I welcome to add some debug command to the qemu > Sure, if your debugger idea is good enough. I think that you should > send

Re: [Qemu-devel] add debugger command

2011-12-27 Thread Peter Cheung
evel@nongnu.org > > 2011/12/28 Peter Cheung : > > Hi, I am chinese too. Am I welcome to add some debug command to the qemu > Sure, if your debugger idea is good enough. I think that you should > send out your idea at first before working on it. > Unfortunately, some ma

Re: [Qemu-devel] add debugger command

2011-12-27 Thread Peter Cheung
m: che...@iis.sinica.edu.tw > To: mcheun...@hotmail.com > CC: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] add debugger command > > Hi Cheung, > > On Wed, Dec 28, 2011 at 05:40:20AM +, Peter Cheung wrote: > > > > Dear QEMU team I want to add some debug command for qe

[Qemu-devel] add debugger command

2011-12-27 Thread Peter Cheung
Dear QEMU team I want to add some debug command for qemu so my peter-bochs (http://peter-bochs.googlecode.com) debugger can support qemu. So I have these questions:1) QEMU use SVN?2) How to apply a role to submit code to their svn? Thanksfrom Peter