Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-12 Thread Chris Metcalf
On 2/11/2015 10:32 PM, Chen Gang S wrote: + */ +#define TARGET_NR_io_setup 0 +#define TARGET_NR_io_destroy1 +#define TARGET_NR_io_submit 2 [...] Isn't there a way to say use the asm-generic syscalls? What does ARM64 do, for

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-12 Thread Chris Metcalf
On 2/11/2015 10:48 PM, Chen Gang S wrote: On 2/12/15 11:32, Chen Gang S wrote: +#define EM_TILE 191 /* Tile */ +#define EM_TILE_OLD 0x2597 /* Tile compat */ No need for EM_TILE_OLD - it never really got out into the wild. Also, 191 is EM_TILEGX in elf.h, so you really should

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-12 Thread Peter Maydell
On 13 February 2015 at 05:44, Chen Gang S gang.c...@sunrus.com.cn wrote: Which issue of correctness will occur? I can not enum it. If the Linux kernel does not implement these syscalls then QEMU must not either. Attempting them should fail, same as if you attempted them with the real kernel.

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-12 Thread Chen Gang S
On 2/13/15 06:32, Chris Metcalf wrote: On 2/11/2015 10:48 PM, Chen Gang S wrote: On 2/12/15 11:32, Chen Gang S wrote: +#define EM_TILE 191 /* Tile */ +#define EM_TILE_OLD 0x2597 /* Tile compat */ No need for EM_TILE_OLD - it never really got out into the wild. Also, 191 is

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-12 Thread Chen Gang S
On 2/13/15 12:56, Peter Maydell wrote: On 13 February 2015 at 04:43, Chen Gang S gang.c...@sunrus.com.cn wrote: Originally, I have tried to remove TARGET_NR_open and others, they can not pass building, and I also noticed about NR_openat. But at last, I still remain TARGET_NR_open and others

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-12 Thread Peter Maydell
On 13 February 2015 at 04:43, Chen Gang S gang.c...@sunrus.com.cn wrote: Originally, I have tried to remove TARGET_NR_open and others, they can not pass building, and I also noticed about NR_openat. But at last, I still remain TARGET_NR_open and others (with related comments): - Another

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-12 Thread Chen Gang S
On 2/13/15 06:31, Chris Metcalf wrote: On 2/11/2015 10:32 PM, Chen Gang S wrote: And excuse me, my English is not quite well, I don't quite understand: fixing anything that breaks as a result. Could you provide more details? Thanks. So if you undefine TARGET_NR_open, etc, hopefully

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-12 Thread Chen Gang S
On 2/13/15 13:43, Peter Maydell wrote: On 13 February 2015 at 05:44, Chen Gang S gang.c...@sunrus.com.cn wrote: Which issue of correctness will occur? I can not enum it. If the Linux kernel does not implement these syscalls then QEMU must not either. Attempting them should fail, same as if

[Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-11 Thread Chen Gang S
After load elf64 tilegx binary for linux-user, the working flow reaches the first correct instruction postion __start. Next, we shall load all instructions for qemu using. This patch is based on Linux kernel tile architecture tilegx 64-bit implementation, and also based on tilegx architecture ABI

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-11 Thread Chen Gang S
Oh, sorry, I forgot to Cc to tile related members. Thanks. On 2/12/15 08:00, Chen Gang S wrote: After load elf64 tilegx binary for linux-user, the working flow reaches the first correct instruction postion __start. Next, we shall load all instructions for qemu using. This patch is based

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-11 Thread Peter Maydell
On 12 February 2015 at 00:00, Chen Gang S gang.c...@sunrus.com.cn wrote: After load elf64 tilegx binary for linux-user, the working flow reaches the first correct instruction postion __start. Next, we shall load all instructions for qemu using. --- configure | 7

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-11 Thread Chen Gang S
On 2/12/15 08:24, Chris Metcalf wrote: On 2/12/15 08:00, Chen Gang S wrote: After load elf64 tilegx binary for linux-user, the working flow reaches the first correct instruction postion __start. Congratulations on getting started. I hope you have success with the emulation part. Thank

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-11 Thread Chen Gang S
On 2/12/15 08:49, Peter Maydell wrote: On 12 February 2015 at 00:00, Chen Gang S gang.c...@sunrus.com.cn wrote: After load elf64 tilegx binary for linux-user, the working flow reaches the first correct instruction postion __start. Next, we shall load all instructions for qemu using. ---

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-11 Thread Chen Gang S
On 2/12/15 11:32, Chen Gang S wrote: +#define EM_TILE 191 /* Tile */ +#define EM_TILE_OLD 0x2597 /* Tile compat */ No need for EM_TILE_OLD - it never really got out into the wild. Also, 191 is EM_TILEGX in elf.h, so you really should use the same name here, not EM_TILE.

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.

2015-02-11 Thread Chris Metcalf
On 2/12/15 08:00, Chen Gang S wrote: After load elf64 tilegx binary for linux-user, the working flow reaches the first correct instruction postion __start. Congratulations on getting started. I hope you have success with the emulation part. index f185dd0..d9e0dec 100755 --- a/configure +++