qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/12 v9] linux-user: tilegx: Add target feature


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 02/12 v9] linux-user: tilegx: Add target features support within qemu
Date: Fri, 10 Apr 2015 23:59:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Am 10.04.2015 um 23:51 schrieb Peter Maydell:
> On 10 April 2015 at 21:41, Chen Gang <address@hidden> wrote:
>> On 4/10/15 05:31, Peter Maydell wrote:
>>> On 27 March 2015 at 10:49, Chen Gang <address@hidden> wrote:
>>>> +typedef struct target_sigaltstack {
>>>> +    abi_ulong ss_sp;
>>>> +    abi_ulong ss_size;
>>>> +    abi_long ss_flags;
>>>> +} target_stack_t;
>>>
>>> Where does this come from? It doesn't match the kernel's
>>> generic-headers struct layout.
>>>
>>
>> Oh, sorry, originally, I guess, I only copied it from microblaze, did
>> not check kernel.
> 
> These structures are all user-guest-facing ABI, so they must
> match the kernel's structures for your target architecture.
> 
>> I shall use generic-headers which tilegx will use (the result will like
>> alpha has done):
>>
>> typedef struct target_sigaltstack {
>>     abi_ulong ss_sp;
>>     int32_t ss_flags;
>>     int32_t dummy;
>>     abi_ulong ss_size;
>> } target_stack_t;
> 
> This doesn't match the kernel either.
> 
> http://lxr.free-electrons.com/source/include/uapi/asm-generic/signal.h#L111
> 
> You have a pointer, an int and a size_t, so you want
>     abi_ulong ss_sp;
>     abi_int ss_flags;
>     abi_ulong ss_size;
> 
> like aarch64.

I know linux-user is a mess. But that does not sound appealing. If this
is from a generic header, can't we put that in a shared header too and
#include it from aarch64 and tilegx without duplicating it?

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)



reply via email to

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