[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully

From: Chen Gang S
Subject: Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.
Date: Fri, 13 Feb 2015 13:44:15 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2/13/15 12:56, Peter Maydell wrote:
> On 13 February 2015 at 04:43, Chen Gang S <address@hidden> 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 platforms (e.g. microblaze, arm64) defined them, too.
>>  - It is only for linux-user, can bypass Linux tile kernel. So it is
>>    still correct.
> The question is, does the Linux kernel for this architecture implement
> a particular syscall (eg NR_open)? (That is, is there a syscall number
> defined, and if you try to execute a syscall with this syscall number,
> does it work, or does it fail?) If it does implement it, then you need to
> #define TARGET_NR_open appropriately. If not, then don't define that.
> If QEMU doesn't build as a result, this probably means our linux-user
> code doesn't expect a target architecture with no implementation of
> that syscall. In that case you should fix the linux-user code (eg
> by adding ifdefs).

The tilegx 64-bit Linux kernel doesn't support TARGET_NR_open and others.

>>  - It really wastes memory and storage a little, but for me, the related
>>    maintainers (not me) need to consider about whether let the code more
>>    complex or save memory a little.
> Neither code complexity nor memory use are important here. It is an
> issue of correctness.

Which issue of correctness will occur? I can not enum it. For me, they
are only the waste code:

 - linux-user already bypasses target linux kernel, and libc for tilegx
   can not generate these calls (not defined for libc, either).

 - For any informal using, linux-user can still operate NR_open and
   others, it is harmless.

 - It is about compatible (not about correctness issues).

I guess, tilegx is the new processor than most of others within Tilera,
so it does not want to compatible with the old calls (then can save
memory and spaces, also can let things a little simpler).

Chen Gang

Open, share, and attitude like air, water, and life which God blessed

reply via email to

[Prev in Thread] Current Thread [Next in Thread]