Re: [Qemu-devel] How to break cpu_tb_exec()?

2015-07-03 Thread Jun Koi
On Sat, Jul 4, 2015 at 1:06 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 3 July 2015 at 18:02, Jun Koi junkoi2...@gmail.com wrote: I am looking at how the main thread interrupts TCG thread. Inside cpu-exec.c, in function cpu_tb_exec(), I can see that it executes one TB, and when

[Qemu-devel] How to break cpu_tb_exec()?

2015-07-03 Thread Jun Koi
Hello, I am looking at how the main thread interrupts TCG thread. Inside cpu-exec.c, in function cpu_tb_exec(), I can see that it executes one TB, and when this is over, it can check for events from other threads (like main thread). This is the reason why TCG thread can be interrupted. Is my

Re: [Qemu-devel] How to break cpu_tb_exec()?

2015-07-03 Thread Jun Koi
On Sat, Jul 4, 2015 at 1:12 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 3 July 2015 at 18:10, Jun Koi junkoi2...@gmail.com wrote: On Sat, Jul 4, 2015 at 1:06 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 3 July 2015 at 18:02, Jun Koi junkoi2...@gmail.com wrote

[Qemu-devel] Parameter of helper_le_ld_name ?

2015-07-02 Thread Jun Koi
Hi, In softmmu_template.h, we have this function: WORD_TYPE helper_le_ld_name(CPUArchState *env, target_ulong addr, int mmu_idx, uintptr_t retaddr) Anybody please explains what is this retaddr parameter, and how does that work? Thanks!

[Qemu-devel] Monitoring write to memory

2015-07-01 Thread Jun Koi
Hello, I am trying to monitor all the memory writing events inside Qemu by instrumenting tcg_gen_qemu_st8, tcg_gen_qemu_st16, tcg_gen_qemu_st32, tcg_gen_qemu_st64, as followings: // in tcg-op.h void helper_checkmem(int64_t data, int64_t address); // this is declared elsewhere static inline

[Qemu-devel] Trace memory access in guest VM?

2015-06-30 Thread Jun Koi
Hello, I am trying to monitor all the memory accesses inside the guest VM running on Qemu. I know this is heavy, but this is only the first step of my experiments. To do this, I look at the sample trace in trace-events and wondering: is it possible to trace all the memory access (read/write) in

[Qemu-devel] Resource leaking in gen_intermediate_code_internal ?

2015-06-29 Thread Jun Koi
Hello, In function gen_intermediate_code_internal() of target-i386/translate.c, we have this code: cpu_T[0] = tcg_temp_new(); cpu_T[1] = tcg_temp_new(); cpu_A0 = tcg_temp_new(); I cannot see anywhere cpu_T cpu_A0 are freed, so each time this function is called, it allocates new

Re: [Qemu-devel] where is the definition of cpu_ldub_code() for Softmmu mode?

2015-06-12 Thread Jun Koi
On Fri, Jun 12, 2015 at 3:59 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 12 June 2015 at 08:29, Jun Koi junkoi2...@gmail.com wrote: On Mon, May 18, 2015 at 6:20 PM, Peter Maydell peter.mayd...@linaro.org wrote: In cpu_ldst.h we #define MEMSUFFIX _code and then include exec

Re: [Qemu-devel] where is the definition of cpu_ldub_code() for Softmmu mode?

2015-06-12 Thread Jun Koi
On Mon, May 18, 2015 at 6:20 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 18 May 2015 at 10:55, Jun Koi junkoi2...@gmail.com wrote: Hi, I am trying to find the definition of cpu_ldub_code() in Softmmu mode. However, the only thing I can find is like this in include/exec

[Qemu-devel] where is crc32() function?

2015-05-29 Thread Jun Koi
Hi, In target-arm/helper-a64.c, there is a call to crc32(). I searched everywhere in the source, but still cannot find this function anywhere (only crc32c() is available) Any hint where this function is, please? Thanks.

Re: [Qemu-devel] Qemu uses C++ ??

2015-05-29 Thread Jun Koi
On Sat, May 30, 2015 at 1:09 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 29 May 2015 at 19:01, Jun Koi junkoi2...@gmail.com wrote: I always thought that Qemu never has C++ code inside, but I am surprise to see this when Aarch64 emulator is linked, as following (excerpt

Re: [Qemu-devel] where is crc32() function?

2015-05-29 Thread Jun Koi
On Fri, May 29, 2015 at 11:43 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 29 May 2015 at 17:41, Jun Koi junkoi2...@gmail.com wrote: In target-arm/helper-a64.c, there is a call to crc32(). I searched everywhere in the source, but still cannot find this function anywhere (only

[Qemu-devel] Qemu uses C++ ??

2015-05-29 Thread Jun Koi
Hi, I always thought that Qemu never has C++ code inside, but I am surprise to see this when Aarch64 emulator is linked, as following (excerpt) c++ -I/usr/include/pixman-1 -I/home/me/projects/qemu-2.3.0/dtc/libfdt -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE

[Qemu-devel] How Qemu timer interrupts code emulation?

2015-05-22 Thread Jun Koi
Hi, I am wondering how the timer interrupt works in softmmu TCG mode (on X86)? In general, we would have timer code execution run in parallel, then once in a while, the timer would interrupt the code execution to switch it out to execute the timer interrupt. I looked at the code, but still

Re: [Qemu-devel] where is the definition of cpu_ldub_code() for Softmmu mode?

2015-05-19 Thread Jun Koi
On Mon, May 18, 2015 at 6:20 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 18 May 2015 at 10:55, Jun Koi junkoi2...@gmail.com wrote: Hi, I am trying to find the definition of cpu_ldub_code() in Softmmu mode. However, the only thing I can find is like this in include/exec

[Qemu-devel] where is the definition of cpu_ldub_code() for Softmmu mode?

2015-05-18 Thread Jun Koi
Hi, I am trying to find the definition of cpu_ldub_code() in Softmmu mode. However, the only thing I can find is like this in include/exec/cpu_ldst.h: #define cpu_ldub_code(env1, p) ldub_raw(p) Unfortunately, this is only for Usermode (CONFIG_USER_ONLY), so still I have no idea where

[Qemu-devel] Nested KVM is weird?

2014-06-01 Thread Jun Koi
Hi, I managed to run VMWare ESXi hypervisor (type 1) inside KVM. From there, I can install run nested guest Linux on this ESXi. However, I find this very strange: I put some printk() at the top of function nested_vmx_run(), which should run to handle nested KVM. Below is the definition of

Re: [Qemu-devel] Nested KVM is weird?

2014-06-01 Thread Jun Koi
On Sun, Jun 1, 2014 at 5:59 PM, Muli Ben-Yehuda mu...@mulix.org wrote: On Sun, Jun 01, 2014 at 05:54:25PM +0700, Jun Koi wrote: So this means ESXi never uses VMResume/VMLaunch? How is this possible, because it uses VMX for its implementation? ESXi will fall back to binary translation

[Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Jun Koi
Hi, Anybody please help me on this dump-guest-memory command? How does the virtual memory map to the dumped file? For example, if x86 register RIP points to 0x12345, how does that map to the dump file? Meaning how can I find where this address 0x12345 in the dump? I tried, but couldnt find much

Re: [Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Jun Koi
On Fri, May 16, 2014 at 3:03 PM, Greg Kurz gk...@linux.vnet.ibm.com wrote: On Fri, 16 May 2014 14:24:16 +0800 Jun Koi junkoi2...@gmail.com wrote: Hi, Anybody please help me on this dump-guest-memory command? How does the virtual memory map to the dumped file? For example, if x86

Re: [Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Jun Koi
On Fri, May 16, 2014 at 4:45 PM, Andreas Färber afaer...@suse.de wrote: Am 16.05.2014 10:40, schrieb Jun Koi: What I want to know is how to map 0x12345 (virtual address) back to the dump file. For example, if 0x12345 was executing some filesystem code at the time I dumped the VM

Re: [Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Jun Koi
On Fri, May 16, 2014 at 5:51 PM, Greg Kurz gk...@linux.vnet.ibm.com wrote: On Fri, 16 May 2014 16:40:23 +0800 Jun Koi junkoi2...@gmail.com wrote: On Fri, May 16, 2014 at 3:03 PM, Greg Kurz gk...@linux.vnet.ibm.com wrote: On Fri, 16 May 2014 14:24:16 +0800 Jun Koi junkoi2...@gmail.com

Re: [Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Jun Koi
On Fri, May 16, 2014 at 7:30 PM, Laszlo Ersek ler...@redhat.com wrote: On 05/16/14 11:59, Jun Koi wrote: - is it true that dump-guest-memory just write down physical memory page, and does not consider the virtual-memory concept? No, it isn't. Basically, dump-guest-memory supports two

Re: [Qemu-devel] My OS hangup in KVM for some reasons, how can I debug?

2014-05-11 Thread Jun Koi
On Fri, May 9, 2014 at 11:24 AM, Jun Koi junkoi2...@gmail.com wrote: On Thu, May 8, 2014 at 4:28 PM, Jun Koi junkoi2...@gmail.com wrote: Hi, I have an weird OS that I am trying to boot in KVM. however, it just hang in the middle, without a good reason. The same OS boots fine

[Qemu-devel] My OS hangup in KVM for some reasons, how can I debug?

2014-05-08 Thread Jun Koi
Hi, I have an weird OS that I am trying to boot in KVM. however, it just hang in the middle, without a good reason. The same OS boots fine in physical machine, and this OS comes with no source code. There must be a bug somewhere in KVM, so I am wondering how people debug deal with such a case

Re: [Qemu-devel] My OS hangup in KVM for some reasons, how can I debug?

2014-05-08 Thread Jun Koi
On Thu, May 8, 2014 at 4:28 PM, Jun Koi junkoi2...@gmail.com wrote: Hi, I have an weird OS that I am trying to boot in KVM. however, it just hang in the middle, without a good reason. The same OS boots fine in physical machine, and this OS comes with no source code. There must be a bug

Re: [Qemu-devel] Running KVM inside pure Qemu?

2014-04-27 Thread Jun Koi
On Sun, Apr 27, 2014 at 3:05 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/04/2014 04:33, Jun Koi ha scritto: On Sat, Apr 26, 2014 at 4:50 PM, Paolo Bonzini pbonz...@redhat.com mailto:pbonz...@redhat.com wrote: Il 25/04/2014 20:13, Shehbaz Jaffer ha scritto: Hi

Re: [Qemu-devel] Running KVM inside pure Qemu?

2014-04-26 Thread Jun Koi
On Sat, Apr 26, 2014 at 4:50 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 25/04/2014 20:13, Shehbaz Jaffer ha scritto: Hi, Are you talking about running KVM(hardware virtualization) enabled support on top of a Linux host running on only QEMU (software virtualization)? I doubt if this

[Qemu-devel] Running KVM inside pure Qemu?

2014-04-24 Thread Jun Koi
Hi, On Qemu 2.0, what commandline options should I use to run KVM (nested VM) inside pure emulator Qemu? Any guideline available onthis would be very helpful. Thanks so much, Jun

[Qemu-devel] Do not compile hw/ for SOFTMMU

2014-02-26 Thread Jun Koi
Currently hw/ is compiled in for SOFTMMU setup, but actually it is always compiled no matter what. This patch removes the related line in Makefile.objs. Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/Makefile.objs b/Makefile.objs index 4a62913..15d75be 100644 --- a/Makefile.objs +++ b

Re: [Qemu-devel] Qemu as a library?

2012-04-09 Thread Jun Koi
On Tue, Apr 10, 2012 at 8:09 AM, Mikael mikael.tr...@gmail.com wrote: Dear list, I understood that earlier on there was a libqemu library, using which an ordinary userspace application could allocate a qemu virtual machine and get it in a pointer/handle representation, run it as long as it

[Qemu-devel] [patch] correct tracing.txt

2012-03-08 Thread Jun Koi
this patch corrects the configure's trace option in docs/tracing.txt Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/docs/tracing.txt b/docs/tracing.txt index ea29f2c..7b11d15 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -9,7 +9,7 @@ for debugging, profiling, and observing

[Qemu-devel] [patch] make trace_thread_create() use its function arg

2012-03-07 Thread Jun Koi
this patch makes trace_thread_create() to use its function arg to initialize thread. the other choice is to make this a function to use void arg, but i prefer this way. Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/trace/simple.c b/trace/simple.c index bbc9930..33ae486 100644

Re: [Qemu-devel] Fail to share Samba directory with guest

2012-03-01 Thread Jun Koi
On Thu, Mar 1, 2012 at 5:59 PM, Jan Kiszka jan.kis...@web.de wrote: On 2012-03-01 05:21, Jun Koi wrote: On Tue, Feb 28, 2012 at 9:43 AM, Jun Koi junkoi2...@gmail.com wrote: On Tue, Feb 28, 2012 at 12:08 AM, Shu Ming shum...@linux.vnet.ibm.com wrote: On 2012-2-27 17:21, Jun Koi wrote: hi

Re: [Qemu-devel] Windows 8 fails to boot

2012-03-01 Thread Jun Koi
: Hi, Am 01.03.2012 05:24, schrieb Jun Koi: anybody tested Qemu with the Windows 8 Consumer Preview? i tried the 32-bit ISO file with 1.0.1, with and without -enable-kvm, and Qemu reboots immediately after the first screen. that is no more than 10 seconds into the boot. Alex has

Re: [Qemu-devel] Fail to share Samba directory with guest

2012-03-01 Thread Jun Koi
On Thu, Mar 1, 2012 at 6:21 PM, Jan Kiszka jan.kis...@web.de wrote: Jun Koi junkoi2...@gmail.com schrieb: On Thu, Mar 1, 2012 at 5:59 PM, Jan Kiszka jan.kis...@web.de wrote: On 2012-03-01 05:21, Jun Koi wrote: On Tue, Feb 28, 2012 at 9:43 AM, Jun Koi junkoi2...@gmail.com wrote: On Tue, Feb

Re: [Qemu-devel] Fail to share Samba directory with guest

2012-02-29 Thread Jun Koi
On Tue, Feb 28, 2012 at 9:43 AM, Jun Koi junkoi2...@gmail.com wrote: On Tue, Feb 28, 2012 at 12:08 AM, Shu Ming shum...@linux.vnet.ibm.com wrote: On 2012-2-27 17:21, Jun Koi wrote: hi, on qemu 1.0.1, i am trying to share a host directory with the Windows guest like below: qemu-system-i386

[Qemu-devel] Windows 8 fails to boot

2012-02-29 Thread Jun Koi
hi, anybody tested Qemu with the Windows 8 Consumer Preview? i tried the 32-bit ISO file with 1.0.1, with and without -enable-kvm, and Qemu reboots immediately after the first screen. that is no more than 10 seconds into the boot. thanks, Jun

[Qemu-devel] Fail to share Samba directory with guest

2012-02-27 Thread Jun Koi
hi, on qemu 1.0.1, i am trying to share a host directory with the Windows guest like below: qemu-system-i386 -enable-kvm -m 1000 -net nic,model=rtl8139 -net user,smb=/tmp img.winxp but in the guest, \\10.0.2.4 doesnt show me any shared directory. i already run Samba on the host (default

Re: [Qemu-devel] Fail to share Samba directory with guest

2012-02-27 Thread Jun Koi
On Tue, Feb 28, 2012 at 12:08 AM, Shu Ming shum...@linux.vnet.ibm.com wrote: On 2012-2-27 17:21, Jun Koi wrote: hi, on qemu 1.0.1, i am trying to share a host directory with the Windows guest like below: qemu-system-i386 -enable-kvm -m 1000 -net nic,model=rtl8139 -net user,smb=/tmp

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

2012-01-19 Thread Jun Koi
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 We have determined to introduce a new

[Qemu-devel] [patch] replace all strdup() with g_strdup()

2011-12-16 Thread Jun Koi
This patch replaces all the strdup() with g_strdup() Signed-off-by: Jun Koi junkoi2...@gmail.com $ diffstat strdup.diff cmd.c |4 ++-- envlist.c |6 +++--- exec.c |2 +- hw/isa-bus.c|2 +- hw/pc.c |2 +- hw/pci.c

[Qemu-devel] how to delete a savevm in image?

2011-11-07 Thread Jun Koi
hi, during the run of my VM, i used savevm to save the VM status down. now how can i delete that? i checked qemu-img, and it doesnt seem to have any option to delete the savevm in the VM image. thanks, Jun

Re: [Qemu-devel] [patch] remove unused function arg in qemu_iohandler_poll() and qemu_iohandler_fill()

2011-11-02 Thread Jun Koi
On Wed, Nov 2, 2011 at 3:40 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 11/01/2011 06:11 AM, Jun Koi wrote: This patch removes unused function argument xfds from qemu_iohandler_poll() and qemu_iohandler_fill() I don't think the patch us particularly useful; the arguments are designed

Re: [Qemu-devel] [patch] explicitly initialize tcg_cpu_thread

2011-11-01 Thread Jun Koi
On Tue, Nov 1, 2011 at 3:06 PM, Pavel Borzenkov pavel.borzen...@gmail.com wrote: On Tue, Nov 1, 2011 at 7:35 AM, Jun Koi junkoi2...@gmail.com wrote: This patch explicitly initializes tcg_cpu_thread to NULL in cpus.c (One code patch in qemu_tcg_init_vcpu() relies on the value of tcg_cpu_thread

[Qemu-devel] [patch] remove dead code, and make cpu_exec_all() static

2011-11-01 Thread Jun Koi
This patch removes dead code (kvm related) in cpu_exec_all(), and makes that static (since nobody uses it) Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/cpus.c b/cpus.c index f768683..77282a1 100644 --- a/cpus.c +++ b/cpus.c @@ -85,6 +85,8 @@ typedef struct TimersState

Re: [Qemu-devel] [PATCH] Simplify cpu_exec_all to tcg_exec_all

2011-11-01 Thread Jun Koi
i have sent a patch, which duplicated the function of this patch. this one was not approved yet?? thanks, Jun On Mon, Sep 26, 2011 at 3:40 PM, Jan Kiszka jan.kis...@siemens.com wrote: After the removal of the non-threaded mode cpu_exec_all is now only used by TCG. Refactor it accordingly,

[Qemu-devel] cpu_x86() ?

2011-11-01 Thread Jun Koi
hi, the way cpu_exec() is defined is really confused to me. in cpu-exec.c, we define cpu_exec() function. however, each architecture seems to redefine cpu_exec(), like we have in target-i386/cpu.h #define cpu_exec cpu_x86_exec so which cpu_exec() is executed in case of tcg/x86? also, i

Re: [Qemu-devel] cpu_x86() ?

2011-11-01 Thread Jun Koi
On Tue, Nov 1, 2011 at 6:58 PM, Max Filippov jcmvb...@gmail.com wrote: the way cpu_exec() is defined is really confused to me. in cpu-exec.c, we define cpu_exec() function. however, each architecture seems to redefine cpu_exec(), like we have in target-i386/cpu.h #define cpu_exec

[Qemu-devel] [patch] add auto-generated files into .gitignore

2011-11-01 Thread Jun Koi
This patch adds some auto-generated files into .gitignore Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/.gitignore b/.gitignore index 6d2acab..62679d8 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,9 @@ cscope.* tags TAGS *~ +qapi-types.c +qapi-types.h +qapi-visit.c +qapi

Re: [Qemu-devel] [patch] remove unused function arg in qemu_iohandler_poll() and qemu_iohandler_fill()

2011-11-01 Thread Jun Koi
On Tue, Nov 1, 2011 at 11:05 PM, Anthony Liguori anth...@codemonkey.ws wrote: On 11/01/2011 12:11 AM, Jun Koi wrote: This patch removes unused function argument xfds from qemu_iohandler_poll() and qemu_iohandler_fill() Signed-off-by: Jun Koijunkoi2...@gmail.com Your mailer is munging

[Qemu-devel] [patch] explicitly initialize tcg_cpu_thread

2011-10-31 Thread Jun Koi
This patch explicitly initializes tcg_cpu_thread to NULL in cpus.c (One code patch in qemu_tcg_init_vcpu() relies on the value of tcg_cpu_thread to create env-thread and so on ) Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/cpus.c b/cpus.c index f768683..47feb58 100644 --- a/cpus.c

[Qemu-devel] [patch] remove unused function arg in qemu_iohandler_poll() and qemu_iohandler_fill()

2011-10-31 Thread Jun Koi
This patch removes unused function argument xfds from qemu_iohandler_poll() and qemu_iohandler_fill() Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/iohandler.c b/iohandler.c index 5640d49..9963790 100644 --- a/iohandler.c +++ b/iohandler.c @@ -89,7 +89,7 @@ int qemu_set_fd_handler

Re: [Qemu-devel] [PATCH 1/2] seabios: Add Local APIC NMI Structure to ACPI MADT

2011-10-28 Thread Jun Koi
2011/10/28 Kenji Kaneshige kaneshige.ke...@jp.fujitsu.com: Avi, Jan, Could you comment on these patches? Inject-NMI doesn't work on Windows guest without these patches. sorry but i am really curious here: why Windows still works well even if it desnt see the inject-NMI? or there are still

[Qemu-devel] pthread code crash??

2011-07-10 Thread Jun Koi
hi, i am doing some experiments with Qemu. this is to add a new pthread into Qemu code, like below: ... pthread_t pt; pthread_attr_t thread_attr; pthread_attr_init(thread_attr); pthread_attr_setdetachstate(thread_attr, PTHREAD_CREATE_DETACHED); pthread_create(pt,

Re: [Qemu-devel] memory trace with qemu

2010-07-26 Thread Jun Koi
On Mon, Jul 26, 2010 at 8:16 PM, malc av1...@comtv.ru wrote: On Mon, 26 Jul 2010, Eliot Moss wrote: On 7/26/2010 6:20 AM, Llu?s wrote: Eduardo Cruz writes: Thanks for your awnsers. Stean, after I find the right place to capture the reads and writes I'll definitely try your trace

[Qemu-devel] [patch] use gen_update_cc_op()

2010-07-24 Thread Jun Koi
this patch simplifies target-i386/translate.c a bit by replacing some code with gen_update_cc_op() Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/target-i386/translate.c b/target-i386/translate.c index 9543298..7b6e3c2 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c

Re: [Qemu-devel] Question on save_globals() in TCG

2010-07-24 Thread Jun Koi
On Sat, Jul 24, 2010 at 11:49 AM, Aurelien Jarno aurel...@aurel32.net wrote: On Sat, Jul 24, 2010 at 09:35:44AM +0900, Jun Koi wrote: On Sat, Jul 24, 2010 at 2:53 AM, Aurelien Jarno aurel...@aurel32.net wrote: On Fri, Jul 23, 2010 at 08:59:54PM +0900, Jun Koi wrote: Hi, I am looking

Re: [Qemu-devel] Question on save_globals() in TCG

2010-07-24 Thread Jun Koi
On Sun, Jul 25, 2010 at 7:57 AM, Aurelien Jarno aurel...@aurel32.net wrote: On Sun, Jul 25, 2010 at 01:58:51AM +0900, Jun Koi wrote: On Sat, Jul 24, 2010 at 11:49 AM, Aurelien Jarno aurel...@aurel32.net wrote: On Sat, Jul 24, 2010 at 09:35:44AM +0900, Jun Koi wrote: On Sat, Jul 24, 2010

[Qemu-devel] [patch] add cscope.* to .gitignore

2010-07-23 Thread Jun Koi
we have make cscope, therefore that makes sense to have cscope.* in .gitignore. Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/.gitignore b/.gitignore index a32b7c4..ec6f89f 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ pc-bios/optionrom/linuxboot.bin pc-bios/optionrom

[Qemu-devel] [patch] remove dead code

2010-07-23 Thread Jun Koi
this patch removes unused function cpu_restore_state_copy(). Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/exec-all.h b/exec-all.h index 58b5575..3a53fe6 100644 --- a/exec-all.h +++ b/exec-all.h @@ -86,9 +86,6 @@ int cpu_gen_code(CPUState *env, struct TranslationBlock *tb, int

Re: [Qemu-devel] memory trace with qemu

2010-07-23 Thread Jun Koi
On Fri, Jul 23, 2010 at 3:15 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Fri, Jul 23, 2010 at 4:12 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi... On Fri, Jul 23, 2010 at 05:30, Eduardo Cruz eduardohmdac...@gmail.com wrote: Hello, I need qemu to keep track of all the memory

[Qemu-devel] Question on save_globals() in TCG

2010-07-23 Thread Jun Koi
Hi, I am looking at the save_globals() of TCG code, and it seems this function saves regular registers like EAX, ..., EDI back to CPU state. But I am not sure if it also saves value of other registers, like EFlags, Segments, CR*, DR*, ... (?) From what I saw, it doesnt seem to do so. Is it

[Qemu-devel] [patch] use symbol for DisasContext-is_jmp

2010-07-23 Thread Jun Koi
This patch replaces constant value assigned for (DisasContext *)-is_jmp with DISAS_TB_JUMP. Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/target-i386/translate.c b/target-i386/translate.c index 2fcc026..9543298 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c

Re: [Qemu-devel] Question on save_globals() in TCG

2010-07-23 Thread Jun Koi
On Sat, Jul 24, 2010 at 2:53 AM, Aurelien Jarno aurel...@aurel32.net wrote: On Fri, Jul 23, 2010 at 08:59:54PM +0900, Jun Koi wrote: Hi, I am looking at the save_globals() of TCG code, and it seems this function saves regular registers like EAX, ..., EDI back to CPU state. But I am not sure

Re: [Qemu-devel] regs_to_env() ?

2010-07-22 Thread Jun Koi
On Fri, Jul 23, 2010 at 7:08 AM, Blue Swirl blauwir...@gmail.com wrote: On Thu, Jul 22, 2010 at 2:06 AM, Jun Koi junkoi2...@gmail.com wrote: Hi, Function regs_to_env() in target-i386/exec.h has a code like below: ... #ifdef reg_EAX env-regs[R_EAX] = EAX #endif ... However, elsewhere we

Re: [Qemu-devel] regs_to_env() ?

2010-07-22 Thread Jun Koi
On Fri, Jul 23, 2010 at 10:43 AM, Jun Koi junkoi2...@gmail.com wrote: On Fri, Jul 23, 2010 at 7:08 AM, Blue Swirl blauwir...@gmail.com wrote: On Thu, Jul 22, 2010 at 2:06 AM, Jun Koi junkoi2...@gmail.com wrote: Hi, Function regs_to_env() in target-i386/exec.h has a code like below

Re: [Qemu-devel] [PATCH 8/8] Rework debug exception processing for gdb use

2010-07-22 Thread Jun Koi
On Fri, Jul 23, 2010 at 1:58 PM, TeLeMan gele...@gmail.com wrote: On Fri, Jun 25, 2010 at 22:56, Jan Kiszka jan.kis...@siemens.com wrote: Guest debugging is currently broken under CONFIG_IOTHREAD. The reason is inconsistent or even lacking signaling the debug events from the source VCPU to the

[Qemu-devel] regs_to_env() ?

2010-07-21 Thread Jun Koi
Hi, Function regs_to_env() in target-i386/exec.h has a code like below: ... #ifdef reg_EAX env-regs[R_EAX] = EAX #endif ... However, elsewhere we have EAX defined as: #define EAX (env-regs[R_EAX]) This means effectively, we have code like: env-regs[R_EAX] = env-regs[R_EAX]; What is the

[Qemu-devel] Monitoring memory access

2010-07-09 Thread Jun Koi
Hi, I want to monitor memory reading access in Qemu. According to function tcg/i386/tcg-target.c::tcg_out_qemu_ld(), all the memory access must call qemu_ld_helpers[] functions, which in turn calls __ldX_mmu functions. These __ldX_mmu() functions are declared in softmmu_template.c, with macro

Re: [Qemu-devel] Monitoring memory access

2010-07-09 Thread Jun Koi
On Fri, Jul 9, 2010 at 7:41 PM, malc av1...@comtv.ru wrote: On Fri, 9 Jul 2010, Jun Koi wrote: Hi, I want to monitor memory reading access in Qemu. According to function tcg/i386/tcg-target.c::tcg_out_qemu_ld(), all the memory access must call qemu_ld_helpers[] functions, which in turn

Re: [Qemu-devel] [Bug 581353] Re: qemu doesn't stop execution upon hitting a breakpoint

2010-06-16 Thread Jun Koi
On Wed, Jun 16, 2010 at 4:07 PM, Alfredo Mungo chimerane...@gmail.com wrote: Same thing happens to me, same versions as above.. I must turn to another app to accomplish my work while awaiting for a bug-fix, the code is perfectly executed but while gdb hits the breakpoints qemu goes on.. --

[Qemu-devel] Re: [Bug 581353] Re: qemu doesn't stop execution upon hitting a breakpoint

2010-06-16 Thread Jun Koi
On Wed, Jun 16, 2010 at 4:40 PM, Jan Kiszka jan.kis...@web.de wrote: Jun Koi wrote: On Wed, Jun 16, 2010 at 4:07 PM, Alfredo Mungo chimerane...@gmail.com wrote: Same thing happens to me, same versions as above.. I must turn to another app to accomplish my work while awaiting for a bug-fix

[Qemu-devel] Re: [Bug 581353] Re: qemu doesn't stop execution upon hitting a breakpoint

2010-06-16 Thread Jun Koi
On Wed, Jun 16, 2010 at 4:49 PM, Jan Kiszka jan.kis...@web.de wrote: Jun Koi wrote: On Wed, Jun 16, 2010 at 4:40 PM, Jan Kiszka jan.kis...@web.de wrote: Jun Koi wrote: On Wed, Jun 16, 2010 at 4:07 PM, Alfredo Mungo chimerane...@gmail.com wrote: Same thing happens to me, same versions

Re: [Qemu-devel] [RFC] tcg/interpreter: Add TCG + interpreter for bytecode (virtual machine)

2010-05-12 Thread Jun Koi
On Tue, Sep 29, 2009 at 1:50 AM, Stefan Weil w...@mail.berlios.de wrote: Hello The patch following this mail adds a new code generator to qemu. It includes a README file with more details. Comments and contributions to complete it are welcome. Could you compare the performance of TCG and

[Qemu-devel] [PATCH] A bit optimization for tlb_set_page() (resend)

2010-05-06 Thread Jun Koi
This patch avoids handling write watchpoints on read-only memory access. It also breaks the searching loop for watchpoint once the setup for handling watchpoint later is done. Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/exec.c b/exec.c index 14d1fd7..6fd859f 100644 --- a/exec.c

[Qemu-devel] Armadillo applications on Qemu

2010-04-29 Thread Jun Koi
Hi, I found that many Armadillo-packed programs fail to work on Qemu (but is OK to run on KVM). Something must be wrong on the way we emulate some instructions. Anybody experiences this problem, and know where the issue is? Thanks, Jun

[Qemu-devel] Re: [PATCH] A bit optimization for tlb_set_page()

2010-04-28 Thread Jun Koi
On Wed, Apr 28, 2010 at 3:53 PM, Jan Kiszka jan.kis...@web.de wrote: Jun Koi wrote: On Wed, Apr 28, 2010 at 8:48 AM, Jun Koi junkoi2...@gmail.com wrote: On Wed, Apr 28, 2010 at 3:36 AM, Jan Kiszka jan.kis...@web.de wrote: Jun Koi wrote: It is not necessary to continue searching for watchpoint

[Qemu-devel] Re: Question on implementatio of GETPC()

2010-04-28 Thread Jun Koi
On Wed, Apr 28, 2010 at 5:12 PM, Jan Kiszka jan.kis...@siemens.com wrote: Jun Koi wrote: Hi, In x86, GETPC() is implemented as below: # define GETPC() ((void *)((unsigned long)__builtin_return_address(0) - 1)) As I understand, it gets the returned address on the stack, then subtract 1

[Qemu-devel] Re: Problem with watchpoint in gdbstub

2010-04-27 Thread Jun Koi
On Tue, Apr 27, 2010 at 5:10 PM, Jan Kiszka jan.kis...@siemens.com wrote: Jun Koi wrote: Hi, I am trying to debug a VM using gdb. I connected gdb to Qemu (latest code from git repo), and issued below command: ... (gdb) watch *0x77f44cd8 (gdb) c The idea is to catch the write access

[Qemu-devel] Re: Problem with watchpoint in gdbstub

2010-04-27 Thread Jun Koi
On Tue, Apr 27, 2010 at 6:30 PM, Jan Kiszka jan.kis...@siemens.com wrote: Jun Koi wrote: On Tue, Apr 27, 2010 at 5:10 PM, Jan Kiszka jan.kis...@siemens.com wrote: Jun Koi wrote: Hi, I am trying to debug a VM using gdb. I connected gdb to Qemu (latest code from git repo), and issued below

[Qemu-devel] Multiple monitor interfaces?

2010-04-27 Thread Jun Koi
Hi, I am wondering if is it possible to have multiple monitor interfaces at the same time? If so, how can we open more than one? This might be useful for something like libvirt, so while we leave one monitor port for libvirt, we can still access to another one to control Qemu? Thanks, J

[Qemu-devel] Re: [PATCH] A bit optimization for tlb_set_page()

2010-04-27 Thread Jun Koi
On Wed, Apr 28, 2010 at 3:36 AM, Jan Kiszka jan.kis...@web.de wrote: Jun Koi wrote: It is not necessary to continue searching for watchpoint when we already found one and setup for handling watchpoint in a search loop in tlb_set_page(). This patch breaks that search loop on then. Acked

Re: [Qemu-devel] Re: [PATCH] flush TB on singlestep command

2010-04-27 Thread Jun Koi
On Wed, Apr 28, 2010 at 4:55 AM, Stefan Weil w...@mail.berlios.de wrote: Am 22.04.2010 09:02, schrieb Jan Kiszka: Stefan Weil wrote: Jan Kiszka schrieb: Alexander Graf wrote: On 21.04.2010, at 12:04, Jun Koi wrote: On Tue, Apr 20, 2010 at 8:44 PM, Alexander Graf ag...@suse.de wrote

[Qemu-devel] Re: [PATCH] A bit optimization for tlb_set_page()

2010-04-27 Thread Jun Koi
On Wed, Apr 28, 2010 at 8:48 AM, Jun Koi junkoi2...@gmail.com wrote: On Wed, Apr 28, 2010 at 3:36 AM, Jan Kiszka jan.kis...@web.de wrote: Jun Koi wrote: It is not necessary to continue searching for watchpoint when we already found one and setup for handling watchpoint in a search loop

Re: [Qemu-devel] Multiple monitor interfaces?

2010-04-27 Thread Jun Koi
On Wed, Apr 28, 2010 at 3:26 AM, Luiz Capitulino lcapitul...@redhat.com wrote: On Tue, 27 Apr 2010 23:23:45 +0900 Jun Koi junkoi2...@gmail.com wrote: Hi, I am wondering if is it possible to have multiple monitor interfaces at the same time? If so, how can we open more than one

[Qemu-devel] Question on implementatio of GETPC()

2010-04-27 Thread Jun Koi
Hi, In x86, GETPC() is implemented as below: # define GETPC() ((void *)((unsigned long)__builtin_return_address(0) - 1)) As I understand, it gets the returned address on the stack, then subtract 1 to get back to the above address. Imagine we have code like this (pseudo asm code): CALL

[Qemu-devel] [PATCH] A bit optimization for tlb_set_page()

2010-04-26 Thread Jun Koi
It is not necessary to continue searching for watchpoint when we already found one and setup for handling watchpoint in a search loop in tlb_set_page(). This patch breaks that search loop on then. Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/exec.c b/exec.c index 14d1fd7..6329775

[Qemu-devel] Problem with watchpoint in gdbstub

2010-04-25 Thread Jun Koi
Hi, I am trying to debug a VM using gdb. I connected gdb to Qemu (latest code from git repo), and issued below command: ... (gdb) watch *0x77f44cd8 (gdb) c The idea is to catch the write access to address 0x77f44cd8. But after the c command, I saw that the window title of my VM continuously

[Qemu-devel] Compile Qemu on Windows?

2010-04-22 Thread Jun Koi
Hi, I want to compile Qemu on Windows (then run it there). Is there any instruction on how to do that? (I googled around, to no avail) Many thanks, Jun

Re: [Qemu-devel] Re: [PATCH] flush TB on singlestep command

2010-04-21 Thread Jun Koi
On Tue, Apr 20, 2010 at 8:44 PM, Alexander Graf ag...@suse.de wrote: On 20.04.2010, at 13:38, Jan Kiszka wrote: Alexander Graf wrote: On 20.04.2010, at 09:18, Jan Kiszka wrote: Jun Koi wrote: Thank you for the explanation of this code. Qemu has a command named singlestep, which reduces

Re: [Qemu-devel] [PATCH] flush TB on singlestep command

2010-04-19 Thread Jun Koi
Thank you for the explanation of this code. Qemu has a command named singlestep, which reduces the translated code block to be only one instruction. This new patch flushes TBs both when singlestep is on and off. Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/monitor.c b/monitor.c

Re: [Qemu-devel] Which functions writes to memory?

2010-04-16 Thread Jun Koi
2010/4/16 malc av1...@comtv.ru: On Fri, 16 Apr 2010, Jun Koi wrote: On Fri, Apr 16, 2010 at 3:17 PM, malc av1...@comtv.ru wrote: On Fri, 16 Apr 2010, Jun Koi wrote: Hi, I am writing a small tool to trace all the activities that write to an area of (virtual) memory in Qemu. I am

Re: [Qemu-devel] Which functions writes to memory?

2010-04-16 Thread Jun Koi
On Fri, Apr 16, 2010 at 3:17 PM, malc av1...@comtv.ru wrote: On Fri, 16 Apr 2010, Jun Koi wrote: Hi, I am writing a small tool to trace all the activities that write to an area of (virtual) memory in Qemu. I am currently doing that by putting my code at the top of the below macro

[Qemu-devel] dummy field in CPUTLBEntry?

2010-04-16 Thread Jun Koi
Hi, I find the way we calculate the dummy field in CPUTLBEntry funny. What is the point of having: ((-sizeof(target_ulong) * 3) (sizeof(unsigned long) - 1)) in its size? Why shouldnt it be more simple, like below? uint8_t dummy[(1 CPU_TLB_ENTRY_BITS) -

[Qemu-devel] [PATCH] flush TB on singlestep command

2010-04-15 Thread Jun Koi
on already translated code. This patch fixes the problem by flushing all the TB to force new code generation. Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/monitor.c b/monitor.c index 5659991..948b861 100644 --- a/monitor.c +++ b/monitor.c @@ -1190,8 +1190,14 @@ static void do_log

[Qemu-devel] TLB entry with separate addr_{read|write|code}?

2010-04-15 Thread Jun Koi
Hi, In the TLB entry, why do we need to maintain separately addr_read, addr_write and addr_code? Is it impossible to have only one for all the purposes? As far as I can see in tlb_set_page(), these fields are mutually exclusive, as they either enable or get invalid value (-1). Thanks, Jun

[Qemu-devel] Re: TLB entry with separate addr_{read|write|code}?

2010-04-15 Thread Jun Koi
On Fri, Apr 16, 2010 at 11:49 AM, Jun Koi junkoi2...@gmail.com wrote: Hi, In the TLB entry, why do we need to maintain separately addr_read, addr_write and addr_code? Is it impossible to have only one for all the purposes? As far as I can see in tlb_set_page(), these fields are mutually

[Qemu-devel] Which functions writes to memory?

2010-04-15 Thread Jun Koi
Hi, I am writing a small tool to trace all the activities that write to an area of (virtual) memory in Qemu. I am currently doing that by putting my code at the top of the below macro in softmmu_header.h static inline void glue(glue(st, SUFFIX), MEMSUFFIX) However, it seems I still miss

Re: [Qemu-devel] Re: Missing singlestep for already-translated code?

2010-04-14 Thread Jun Koi
On Wed, Apr 14, 2010 at 12:28 AM, Jan Kiszka jan.kis...@siemens.com wrote: Alexander Graf wrote: On 13.04.2010, at 15:36, Jan Kiszka wrote: Jun Koi wrote: Hi, I am looking into the singlestep command in monitor interface, and it seems that we only take into account the singlestep flag when

  1   2   >