[Qemu-devel] [PATCH v2] target-tilegx: Implement v?int_* instructions.

2015-10-04 Thread gang . chen . 5i5j
From: Chen Gang Signed-off-by: Chen Gang --- target-tilegx/helper.h | 5 target-tilegx/simd_helper.c | 56 + target-tilegx/translate.c | 14 3 files changed, 75 insertions(+) diff --git a/target-tilegx/helper.h b/target-tile

[Qemu-devel] [PATCH v2] target-tilegx: Implement v2sh* instructions

2015-10-04 Thread gang . chen . 5i5j
From: Chen Gang It is just according to v1sh* instructions implementation. Signed-off-by: Chen Gang --- target-tilegx/translate.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/target-tilegx/translate.c b/target-tilegx/translate.c index 6ab66f9..9bb8857

[Qemu-devel] [PATCH v2] target-tilegx: Use TILEGX_EXCP_OPCODE_UNKNOWN and TILEGX_EXCP_OPCODE_UNIMPLEMENTED correctly

2015-10-04 Thread gang . chen . 5i5j
From: Chen Gang For some cases, they are for TILEGX_EXCP_OPCODE_UNKNOWN, not for TILEGX_EXCP_OPCODE_UNIMPLEMENTED. Also for some cases, they are for TILEGX_EXCP_OPCODE_UNIMPLEMENTED, not for TILEGX_EXCP_OPCODE_UNKNOWN. When analyzing issues, the correct printing information is necessary, e.g. g

[Qemu-devel] [PATCH v2] target-tilegx: Implement v2mults instruction

2015-10-04 Thread gang . chen . 5i5j
From: Chen Gang Just according to v1multu instruction implementation. Signed-off-by: Chen Gang --- target-tilegx/helper.h | 1 + target-tilegx/simd_helper.c | 13 + target-tilegx/translate.c | 4 3 files changed, 18 insertions(+) diff --git a/target-tilegx/helper.h b

[Qemu-devel] [PATCH] target-tilegx: Use TILEGX_EXCP_OPCODE_UNKNOWN instead of TILEGX_EXCP_OPCODE_UNIMPLEMENTED for some cases

2015-10-03 Thread gang . chen . 5i5j
From: Chen Gang For some cases, they are for TILEGX_EXCP_OPCODE_UNKNOWN, not for TILEGX_EXCP_OPCODE_UNIMPLEMENTED. When analyzing issues, the related output is incorrect (e.g. grep UIMP in the output log for finding qemu tilegx umimplementation issues). Signed-off-by: Chen Gang --- target-til

[Qemu-devel] [PATCH] target-tilegx: Implement v2mults instruction

2015-10-02 Thread gang . chen . 5i5j
From: Chen Gang Just according to v1multu instruction implementation. Signed-off-by: Chen Gang --- target-tilegx/helper.h | 1 + target-tilegx/simd_helper.c | 13 + target-tilegx/translate.c | 5 + 3 files changed, 19 insertions(+) diff --git a/target-tilegx/helper.h

[Qemu-devel] [PATCH] target-tilegx: Implement v?int_* instructions.

2015-10-01 Thread gang . chen . 5i5j
From: Chen Gang Signed-off-by: Chen Gang --- target-tilegx/helper.h | 5 target-tilegx/simd_helper.c | 56 + target-tilegx/translate.c | 14 3 files changed, 75 insertions(+) diff --git a/target-tilegx/helper.h b/target-tile

[Qemu-devel] [PATCH] target-tilegx: Implement v2sh* instructions

2015-10-01 Thread gang . chen . 5i5j
From: Chen Gang It is just according to v1sh* instructions implementation. Signed-off-by: Chen Gang --- target-tilegx/translate.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/target-tilegx/translate.c b/target-tilegx/translate.c index f711c18..03c8e7

[Qemu-devel] [PATCH] target-tilegx: Call dest_gr() later when have to use it

2015-10-01 Thread gang . chen . 5i5j
From: Chen Gang When a nop instruction is generated, but the 'dest' is a valid (e.g. for any qemu skipped instructions, but still be useful in real machine), always allocate dest_gr() will cause issue for these nop instructions. After fix this issue, the temporary implementation of floating poin

[Qemu-devel] [PATCH v3] target-tilegx: Support iret instruction and related special registers

2015-10-01 Thread gang . chen . 5i5j
From: Chen Gang Acording to the __longjmp tilegx libc implementation, and reference from tilegx ISA document, and suggested by tilegx architecture member, we can treat iret instruction as "jrp lr". The related code is below: ENTRY (__longjmp) FEEDBACK_ENTER(__longjmp) #define RESTO

[Qemu-devel] [PATCH v2] target-tilegx: Support iret instruction and related special registers

2015-10-01 Thread gang . chen . 5i5j
From: Chen Gang Acording to the __longjmp tilegx libc implementation, and reference from tilegx ISA document, we can left iret instruction empty. The related code is below: ENTRY (__longjmp) FEEDBACK_ENTER(__longjmp) #define RESTORE(r) { LD r, r0 ; ADDI_PTR r0, r0, REGSIZE }

[Qemu-devel] [PATCH] target-tilegx: Fix a typo for mnemonic about "ld_add"

2015-09-30 Thread gang . chen . 5i5j
From: Chen Gang Signed-off-by: Chen Gang --- target-tilegx/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-tilegx/translate.c b/target-tilegx/translate.c index d2b2b6e..251b254 100644 --- a/target-tilegx/translate.c +++ b/target-tilegx/translate.c @@ -1500

[Qemu-devel] [PATCH] target-tilegx: Support iret instruction and related special registers

2015-09-28 Thread gang . chen . 5i5j
From: Chen Gang Acording to the __longjmp tilegx libc implementation, and reference from tilegx ISA document, we can left iret instruction empty. The related code is below: ENTRY (__longjmp) FEEDBACK_ENTER(__longjmp) #define RESTORE(r) { LD r, r0 ; ADDI_PTR r0, r0, REGSIZE }

[Qemu-devel] [PATCH] target-tilegx: Check zero dest register for ld instructions

2015-09-28 Thread gang . chen . 5i5j
From: Chen Gang At present, qemu x86_64 host backend can not remove the related dummy instructions. Even the worse, sometimes, it will generate the incorrect instructions which will cause segment fault for prefetch_l3 instruction. Signed-off-by: Chen Gang --- target-tilegx/translate.c | 10 +++

[Qemu-devel] [PATCH] target-tilegx: Let v1addi call its own implementation

2015-09-27 Thread gang . chen . 5i5j
From: Chen Gang Original implementation let v1addi instruction call v1cmpeqi. It will cause gcc testsuite fail: the relate test is for mm instruction, tilegx qemu implement mm instruction correctly, but its 'v1addi' causes test abort. Signed-off-by: Chen Gang --- target-tilegx/translate.c | 5

[Qemu-devel] [PATCH] tilegx: Implement tilegx signal features

2015-09-26 Thread gang . chen . 5i5j
From: Chen Gang After this patch, tilegx can handle raise instruction succesfully. Signed-off-by: Chen Gang --- linux-user/signal.c | 171 +++- linux-user/tilegx/syscall.h | 4 ++ target-tilegx/cpu.h | 3 +- 3 files changed, 176 inser

[Qemu-devel] [PATCH] tilegx: Generate ill related instructions according to Linux kernel

2015-09-25 Thread gang . chen . 5i5j
From: Chen Gang At present, tilegx qemu will abort for "setup_frame: not implemented", when meet raise instruction. Signed-off-by: Chen Gang --- linux-user/main.c | 14 target-tilegx/cpu.h | 3 ++ target-tilegx/translate.c | 89 +++---

[Qemu-devel] [PATCH] linux-user/syscall_defs.h: Sync the latest si_code from Linux kernel

2015-09-25 Thread gang . chen . 5i5j
From: Chen Gang They content several new macro members, also contents TARGET_N*. Signed-off-by: Chen Gang --- linux-user/syscall_defs.h | 44 ++-- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/sysc

[Qemu-devel] [PATCH] target-tilegx: Let x1 pipe process bpt instruction only

2015-09-25 Thread gang . chen . 5i5j
From: Chen Gang According to the related document, bpt can be only in x1 pipe. Signed-off-by: Chen Gang --- target-tilegx/translate.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target-tilegx/translate.c b/target-tilegx/translate.c index a9fc4ce..6622aeb 100644 -

[Qemu-devel] [PATCH v3] target-tilegx: Implement v*add and v*sub instructions

2015-09-22 Thread gang . chen . 5i5j
From: Chen Gang v4* are implemented in normal code, another are implemented in helper functions. Signed-off-by: Chen Gang --- target-tilegx/helper.h | 5 + target-tilegx/simd_helper.c | 23 +++ target-tilegx/translate.c | 46 +

[Qemu-devel] [PATCH v2] target-tilegx: Implement v1multu instruction

2015-09-21 Thread gang . chen . 5i5j
From: Chen Gang Only according to v1shrs implementation. Signed-off-by: Chen Gang Reviewed-by: Richard Henderson --- target-tilegx/helper.h | 2 ++ target-tilegx/simd_helper.c | 13 + target-tilegx/translate.c | 4 3 files changed, 19 insertions(+) diff --git a/targ

[Qemu-devel] [PATCH v2] target-tilegx: Implement v*add and v*sub instructions

2015-09-21 Thread gang . chen . 5i5j
From: Chen Gang v4* are implemented in normal code, another are implemented in helper functions. Signed-off-by: Chen Gang --- target-tilegx/helper.h | 5 + target-tilegx/simd_helper.c | 23 +++ target-tilegx/translate.c | 46 +

[Qemu-devel] [PATCH v2] target-tilegx: Implement v*shl, v*shru, and v*shrs instructions

2015-09-21 Thread gang . chen . 5i5j
From: Chen Gang v2sh* are implemented with helper fucntions, according to the v1sh* implementations. v4sh* are implmeneted in normal code. Signed-off-by: Chen Gang --- target-tilegx/helper.h | 3 +++ target-tilegx/simd_helper.c | 31 +++ target-tilegx/transla

[Qemu-devel] [PATCH] target-tilegx: Implement v1multu instruction

2015-09-18 Thread gang . chen . 5i5j
From: Chen Gang Only according to v1add implementation. Signed-off-by: Chen Gang --- target-tilegx/helper.h | 1 + target-tilegx/simd_helper.c | 13 + target-tilegx/translate.c | 4 3 files changed, 18 insertions(+) diff --git a/target-tilegx/helper.h b/target-tilegx

[Qemu-devel] [PATCH] target-tilegx: Implement v*add and v*sub instructions

2015-09-18 Thread gang . chen . 5i5j
From: Chen Gang Only according to helper_v1shrs. Signed-off-by: Chen Gang --- target-tilegx/helper.h | 8 + target-tilegx/simd_helper.c | 77 + target-tilegx/translate.c | 26 +-- 3 files changed, 109 insertions(+), 2 deletion

[Qemu-devel] [PATCH] target-tilegx: Implement v*shl, v*shru, and v*shrs instructions

2015-09-18 Thread gang . chen . 5i5j
From: Chen Gang Only according to the v1shl, v1shru, and v1shrs implementations. Signed-off-by: Chen Gang --- target-tilegx/helper.h | 6 + target-tilegx/simd_helper.c | 62 + target-tilegx/translate.c | 20 +++ 3 files change

[Qemu-devel] [PATCH] linux-user/syscall.c: Fix issue for checking ptr in different address spaces in TARGET_CMSG_NXTHDR

2015-09-14 Thread gang . chen . 5i5j
From: Chen Gang After fix this issue, qemu can run i386 wine notepad.exe successfully. But the initialization performance is not quite well. Signed-off-by: Chen Gang --- linux-user/syscall.c | 30 +- linux-user/syscall_defs.h | 20 +--- 2 files

[Qemu-devel] [PATCH v2] linux-user/signal.c: Fix several issues for target alpha

2015-09-14 Thread gang . chen . 5i5j
From: Chen Gang Remove useless variable err in setup_frame() and setup_rt_frame(). Add unlock_user_struct() for setup_rt_frame(). Do not call unlock_user_struct() when lock_user_struct() failed in do_rt_sigreturn(). Remove white space of label badframe in do_sigreturn(). Signed-off-by: Chen G

[Qemu-devel] [PATCH] linux-user/signal.c: Skip calling unlock_user_struct() when lock_user_struct() failed for target ppc and ppc64

2015-09-12 Thread gang . chen . 5i5j
From: Chen Gang For target ppc and ppc64, all related funcitons have this issue. Signed-off-by: Chen Gang --- linux-user/signal.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 0265c46..61f98e7 100644 --- a/linu

[Qemu-devel] [PATCH] linux-user/signal.c: Skip calling unlock_user_struct() when lock_user_struct() failed for target m68k

2015-09-12 Thread gang . chen . 5i5j
From: Chen Gang For target m68k, setup_rt_frame() and do_rt_sigreturn() have this issue. Signed-off-by: Chen Gang --- linux-user/signal.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index cead97b..0265c46 100644 --- a/linu

[Qemu-devel] [PATCH] linux-user/signal.c: Use setup_rt_frame() instead of setup_frame() for target openrisc

2015-09-12 Thread gang . chen . 5i5j
From: Chen Gang qemu has already considered about some targets may have no traditional signals. And openrisc's setup_frame() is dummy, but it can be supported by setup_rt_frame(). Signed-off-by: Chen Gang --- linux-user/signal.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) d

[Qemu-devel] [PATCH v3] linux-user/main.c: Set environments variables from command line options

2015-09-10 Thread gang . chen . 5i5j
From: Chen Gang When qemu execute execve() system call, the related command line options can not be passed to the second qemu process, which causes the second process fail. Signed-off-by: Chen Gang --- linux-user/main.c | 5 + 1 file changed, 5 insertions(+) diff --git a/linux-user/main.c

[Qemu-devel] [PATCH v2] linux-user/main.c: Set environments variables from command line options

2015-09-10 Thread gang . chen . 5i5j
From: Chen Gang When qemu execute execve() system call, the related command line options can not be passed to the second qemu process, which causes the second process fail. Signed-off-by: Chen Gang --- linux-user/main.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/main.c

[Qemu-devel] [PATCH] linux-user/main.c: Always set QEMU_LD_PREFIX when interp_prefix is changed

2015-09-09 Thread gang . chen . 5i5j
From: Chen Gang If qemu sets interp_prfix via command line '-L' instead of environments variable QEMU_LD_PREFIX, it will cause syscall execve() failed. Because the 2nd qemu has no command line '-L'. So qemu need always set QEMU_LD_PREFIX when interp_prefix is changed. Signed-off-by: Chen Gang

[Qemu-devel] [PATCH] linux-user/syscall.c: Add EAGAIN to host_to_target_errno_table for

2015-09-06 Thread gang . chen . 5i5j
From: Chen Gang Under Alpha host, EAGAIN is redefined to 35, so it need be remapped too. Signed-off-by: Chen Gang --- linux-user/syscall.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f62c698..380f5a8 100644 --- a/li

[Qemu-devel] [PATCH 1/2] alpha-host: Add Alpha host tcg backend.

2015-08-31 Thread gang . chen . 5i5j
From: Chen Gang It is merged from git://github.com/rth7680/qemu.git tcg-alpha-2 Signed-off-by: Richard Henderson Signed-off-by: Chen Gang --- configure | 16 +- include/exec/exec-all.h | 11 +- include/qemu-common.h |4 +- tcg/alpha/tcg-target.c | 1945 +++

[Qemu-devel] [PATCH 2/2] alpha-host: Fix alpha host related merging issues.

2015-08-31 Thread gang . chen . 5i5j
From: Chen Gang It can pass simple test for i386-linux-user under ALpha VM: run i386 bash successfully (let pagesize be TARGET_PAGE_SIZE, temporary). Signed-off-by: Chen Gang --- tcg/alpha/tcg-target.c | 139 +++-- tcg/alpha/tcg-target.h | 8 ++- 2

[Qemu-devel] [PATCH 0/2] alpha-host: Add Alpha host tcg backend to latest QEMU

2015-08-31 Thread gang . chen . 5i5j
From: Chen Gang It is only for version merging, no any functional modification. Chen Gang (2): alpha-host: Add Alpha host tcg backend. alpha-host: Fix alpha host related merging issues. configure | 16 +- include/exec/exec-all.h | 11 +- include/qemu-common.h |4 +-

Re: [Qemu-devel] Subject: [PATCH 01/16] linux-user: tilegx: Firstly add architecture related features

2015-08-30 Thread gang . chen . 5i5j
At present, I can send mail through git client directly with my qq mail address, I reply this mail again to test whether our qemu mailing list can accept qq mail address or not. If it can accept qq mail address, I shall send mail through git client directly. > OK, thanks. I guess I should send ma

Re: [Qemu-devel] Subject: [PATCH 01/16] linux-user: tilegx: Firstly add architecture related features

2015-08-29 Thread gang . chen . 5i5j
At present, I can send mail through git client directly with my qq mail address, I reply this mail again to test whether our qemu mailing list can accept qq mail address or not. If it can accept qq mail address, I shall send mail through git client directly. > OK, thanks. I guess I should send ma

Re: [Qemu-devel] Subject: [PATCH 01/16] linux-user: tilegx: Firstly add architecture related features

2015-08-29 Thread gang . chen . 5i5j
At present, I can send mail through git client directly with my qq mail address, I reply this mail again to test whether our qemu mailing list can accept qq mail address or not. If it can accept qq mail address, I shall send mail through git client directly. > OK, thanks. I guess I should send ma

Re: [Qemu-devel] [PATCH] tcg: Use macro instead of hard code number 0xffffffff for tcg_target_ulong using

2015-01-20 Thread Gang Chen
It is not for fixing bugs. I guess it belongs to trivial patch (not fix bugs, not changing any working flow). And excuse me, gmail is broken again, in China, I have to reply on web site via my Mac book Safari (which is not a pure text). On Mon, Jan 19, 2015 at 11:58 PM, Peter Maydell wrote: > O

Re: [Qemu-devel] [PATCH] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation

2014-02-24 Thread Gang Chen
Firstly, thank you very much for your reviewing. :-) On 02/24/2014 05:22 PM, Markus Armbruster wrote: > Chen Gang writes: > >> When path is truncated by PATH_MAX limitation, it causes QEMU to access >> incorrect file. So use original full path instead of PATH_MAX within >> 9pfs (need check/proce