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

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

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

[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

[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

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] [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] 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] TCG is hard to understand!

2009-12-10 Thread Jun Koi
Hi, I am trying to understand how TCG works. For example, I look at the LLDT insn on x86. In target-i386/translate.c, we translate LLDT to TCG code, like below: static TCGv_i32 cpu_tmp2_i32; // 1 ... gen_ldst_modrm(s, modrm, OT_WORD, OR_TMP0, 0); // 2

Re: [Qemu-devel] TCG is hard to understand!

2009-12-10 Thread Jun Koi
On Fri, Dec 11, 2009 at 7:21 AM, Andreas Färber andreas.faer...@web.de wrote: Hi, Am 10.12.2009 um 17:44 schrieb Jun Koi: I am trying to understand how TCG works. For example, I look at the LLDT insn on x86. In target-i386/translate.c, we translate LLDT to TCG code, like below: static

Re: [Qemu-devel] TCG is hard to understand!

2009-12-10 Thread Jun Koi
Hi Alex, However, I still dont understand what the line (3) does. Could you give some hints? static TCGv_i32 cpu_tmp2_i32;                                      // 1 ... gen_ldst_modrm(s, modrm, OT_WORD, OR_TMP0, 0);   // 2 gen_jmp_im(pc_start - s-cs_base);                                //

Re: [Qemu-devel] TCG is hard to understand!

2009-12-11 Thread Jun Koi
On Fri, Dec 11, 2009 at 4:36 PM, Laurent Desnogues laurent.desnog...@gmail.com wrote: On Fri, Dec 11, 2009 at 4:18 AM, Jun Koi junkoi2...@gmail.com wrote: Another question: I look at tcg_gen_callN() to see how the helper is executed. We put the helper opcode into the TCG code buffer, and put

[Qemu-devel] [Patch] remove unused params in some TCG functions

2009-12-11 Thread Jun Koi
Hi, Thanks to everybody helping me to have more understanding on QEmu internals. This community is great! This trivial patch removes some unused params in tcg_out_st() and tcg_out_ld(). Probably this remains from dyngen time? Thanks, Jun diff --git a/tcg/i386/tcg-target.c

Re: [Qemu-devel] Spice project is now open

2009-12-11 Thread Jun Koi
On Fri, Dec 11, 2009 at 10:45 PM, Yaniv Kamay yka...@redhat.com wrote: Hi, Spice project is now open, for more information visit http://spice-space.org, due to a server relocation the site will be down during this weekend. Spice ship patched QEMU based on fairly old KVM snapshot as a

Re: [Qemu-devel] Spice project is now open

2009-12-11 Thread Jun Koi
On Fri, Dec 11, 2009 at 11:09 PM, Alexander Graf ag...@suse.de wrote: On 11.12.2009, at 14:45, Yaniv Kamay wrote: Hi, Spice project is now open, for more information visit http://spice-space.org, due to a server relocation the site will be down during this weekend. Spice ship patched QEMU

[Qemu-devel] SVM support in 0.12?

2009-12-17 Thread Jun Koi
Hi, I am running latest Qemu 0.12-rc. My guest VM runs Linux kernel 2.6.31. Because Qemu now supports SVM, I expect to see the SVM flag in /proc/cpuinfo, but that is not the case. So it seems SVM support is not enabled by default configuration?? Thanks, Jun

[Qemu-devel] Re: SVM support in 0.12?

2009-12-17 Thread Jun Koi
On Fri, Dec 18, 2009 at 11:37 AM, Jun Koi junkoi2...@gmail.com wrote: Hi, I am running latest Qemu 0.12-rc. My guest VM runs Linux kernel 2.6.31. Because Qemu now supports SVM, I expect to see the SVM flag in /proc/cpuinfo, but that is not the case. So it seems SVM support is not enabled

Re: [Qemu-devel] Re: SVM support in 0.12?

2009-12-18 Thread Jun Koi
On Fri, Dec 18, 2009 at 8:35 PM, Alexander Graf ag...@suse.de wrote: Am 18.12.2009 um 03:39 schrieb Jun Koi junkoi2...@gmail.com On Fri, Dec 18, 2009 at 11:37 AM, Jun Koi junkoi2...@gmail.com wrote: Hi, I am running latest Qemu 0.12-rc. My guest VM runs Linux kernel 2.6.31. Because Qemu

Re: [Qemu-devel] Re: SVM support in 0.12?

2009-12-21 Thread Jun Koi
On Sat, Dec 19, 2009 at 2:34 AM, Alexander Graf ag...@suse.de wrote: Am 18.12.2009 um 17:52 schrieb Jun Koi junkoi2...@gmail.com: On Fri, Dec 18, 2009 at 8:35 PM, Alexander Graf ag...@suse.de wrote: Am 18.12.2009 um 03:39 schrieb Jun Koi junkoi2...@gmail.com On Fri, Dec 18, 2009 at 11:37

[Qemu-devel] Exposing monitor on socket interface?

2010-03-23 Thread Jun Koi
Hi, Is it possible to use -monitor option to expose the monitor on socket interface, such as TCP or Unix domain port, so I can access the monitor using non-stdio way? Thanks a lot, Jun

[Qemu-devel] Re: Exposing monitor on socket interface?

2010-03-24 Thread Jun Koi
Thanks a lot, Juan! Jun On Wed, Mar 24, 2010 at 6:41 PM, Juan Quintela quint...@redhat.com wrote: Jun Koi junkoi2...@gmail.com wrote: Hi, Is it possible to use -monitor option to expose the monitor on socket interface, such as TCP or Unix domain port, so I can access the monitor using non

[Qemu-devel] Semantic meaning of stop command?

2010-04-05 Thread Jun Koi
Hi, I always thought that the stop command provided by the monitor interface would pause the VM completely, but it doesnt seem so? I checked this by issuing the stop command on my VM, and noted its clock. Few minutes later, I resumed the VM (with cont command). The clock is immediately updated

[Qemu-devel] Re: Semantic meaning of stop command?

2010-04-06 Thread Jun Koi
On Tue, Apr 6, 2010 at 9:59 PM, Juan Quintela quint...@redhat.com wrote: Jun Koi junkoi2...@gmail.com wrote: Hi, I always thought that the stop command provided by the monitor interface would pause the VM completely, but it doesnt seem so? I checked this by issuing the stop command on my VM

[Qemu-devel] Weird thing happen when the VM is stop! (0.12.3)

2010-04-09 Thread Jun Koi
Hi, I found something very funny happening with 0.12.3: it seems the VM is still running even I already stopped it. Here is how I verified that: Boot any OS (I checked with Windows XP and Ubuntu) with 0.12.3, and stop it any time after it booted up. Use stop command on monitor interface. Now

[Qemu-devel] [PATCH] Cleanup dead code

2010-04-09 Thread Jun Koi
This patch removes some dead code in exec.c Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/exec.c b/exec.c index 76163aa..43366ac 100644 --- a/exec.c +++ b/exec.c @@ -2884,15 +2884,12 @@ void *qemu_get_ram_ptr(ram_addr_t addr) (typically a TLB entry) back to a ram offset

Re: [Qemu-devel] Weird thing happen when the VM is stop! (0.12.3)

2010-04-09 Thread Jun Koi
On Fri, Apr 9, 2010 at 10:20 PM, Luiz Capitulino lcapitul...@redhat.com wrote: On Fri, 9 Apr 2010 18:32:21 +0900 Jun Koi junkoi2...@gmail.com wrote: Hi, I found something very funny happening with 0.12.3: it seems the VM is still running even I already stopped it. Here is how I verified

Re: [Qemu-devel] Weird thing happen when the VM is stop! (0.12.3)

2010-04-12 Thread Jun Koi
On Sat, Apr 10, 2010 at 3:09 AM, Marcelo Tosatti mtosa...@redhat.com wrote: On Sat, Apr 10, 2010 at 01:12:27AM +0900, Jun Koi wrote: On Fri, Apr 9, 2010 at 10:20 PM, Luiz Capitulino lcapitul...@redhat.com wrote: On Fri, 9 Apr 2010 18:32:21 +0900 Jun Koi junkoi2...@gmail.com wrote: Hi

[Qemu-devel] [Patch] Simplify cpu_can_run()

2010-04-12 Thread Jun Koi
This patch simplifies cpu_can_run(). Signed-off-by: Jun Koi junkoi2...@gmail.com diff --git a/cpus.c b/cpus.c index 0debe77..4adb66d 100644 --- a/cpus.c +++ b/cpus.c @@ -98,9 +98,7 @@ static void do_vm_stop(int reason) static int cpu_can_run(CPUState *env) { -if (env-stop

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

2010-04-12 Thread Jun Koi
Hi, I am looking into the singlestep command in monitor interface, and it seems that we only take into account the singlestep flag when we are translating code. So for the already-translated code, we will miss singlestep? Thanks, Jun

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

2010-04-13 Thread Jun Koi
On Tue, Apr 13, 2010 at 6:21 PM, takas...@ops.dti.ne.jp wrote: Hi, So for the already-translated code, we will miss singlestep? At least SH4(and mips?) shows such behaviour. I think a patch below enables single stepping in such case, too. But, I'm not sure if this behaviour is on purpose,

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

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

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

[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

[Qemu-devel] Questions on hidden functions in QEMU source code

2007-10-16 Thread Jun Koi
Hi, I am looking at the source code of QEMU, and there are some mystery to me: some functions are not defined anywhere. For example, functions like compute_all_incb() and compute_c_incl() in target-i386/op.c are never defined anywhere. So how the compilation process generates these functions?

Re: [Qemu-devel] Questions on hidden functions in QEMU source code

2007-10-17 Thread Jun Koi
On 10/16/07, Johannes Schindelin [EMAIL PROTECTED] wrote: Hi, On Tue, 16 Oct 2007, Stuart Brady wrote: On Tue, Oct 16, 2007 at 05:28:24PM +0900, Jun Koi wrote: For example, functions like compute_all_incb() and compute_c_incl() in target-i386/op.c are never defined anywhere

[Qemu-devel] PC Bios source code?

2007-11-07 Thread Jun Koi
Hi, In pc-bios/ directory, we have bios.bin and bios.diff. As I understand, qemu's bios is modified from bochs bios. But what are the differences between our bios.bin and bochs bios.bin? As there are some differences, where is the source code of our bios.bin?? Thanks, Jun

[Qemu-devel] Entry point of BIOS

2007-12-27 Thread Jun Koi
Hi, I am wondering how qemu can find exactly where is the entry point of BIOS? Of course it is at offset 0xfff0 of BIOS, starting from the base address of BIOS. It is easy to understand how it works with the BIOS legacy. However, if we use the BIOS-latest, which is made by prepending the

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

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

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

[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

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

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

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

[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

[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

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

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

  1   2   >