From: Peter Maydell <peter.maydell@linaro.org>
To: Chen Gang <xili_gchen_5257@hotmail.com>
Cc: "Riku Voipio" <riku.voipio@iki.fi>,
qemu-devel <qemu-devel@nongnu.org>,
"Chris Metcalf" <cmetcalf@ezchip.com>,
"walt@tilera.com" <walt@tilera.com>,
"Andreas Färber" <afaerber@suse.de>,
"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 02/12 v9] linux-user: tilegx: Add target features support within qemu
Date: Fri, 10 Apr 2015 22:51:57 +0100 [thread overview]
Message-ID: <CAFEAcA9TGdHbVXUABaVmhAUdJoNaHDe-K5MeqaO7wNBbBKBaXA@mail.gmail.com> (raw)
In-Reply-To: <BLU437-SMTP77E53BAA54C8202717A4BAB9FA0@phx.gbl>
On 10 April 2015 at 21:41, Chen Gang <xili_gchen_5257@hotmail.com> wrote:
> On 4/10/15 05:31, Peter Maydell wrote:
>> On 27 March 2015 at 10:49, Chen Gang <xili_gchen_5257@hotmail.com> 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.
>
> [...]
>>> +
>>> +struct target_ipc_perm {
>>> + abi_int __key; /* Key. */
>>> + abi_uint uid; /* Owner's user ID. */
>>> + abi_uint gid; /* Owner's group ID. */
>>> + abi_uint cuid; /* Creator's user ID. */
>>> + abi_uint cgid; /* Creator's group ID. */
>>> + abi_uint mode; /* Read/write permission. */
>>> + abi_ushort __seq; /* Sequence number. */
>>> + abi_ushort __pad2;
>>> + abi_ulong __unused1;
>>> + abi_ulong __unused2;
>>> +};
>>
>> Again, doesn't seem to match kernel?
>>
>
> For me, it matches kernel. mode is abi_uint (__kernel_mode_t is 32-bit).
I'm looking at
http://lxr.free-electrons.com/source/include/uapi/linux/ipc.h#L9
which doesn't have that padding and unused fields at the end.
However the ipc structs are pretty confusing so maybe that's
the wrong one -- which one are you looking at?
-- PMM
next prev parent reply other threads:[~2015-04-10 21:52 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <55153546.5060906@hotmail.com>
2015-03-27 10:48 ` [Qemu-devel] [PATCH 01/12 v9] linux-user: tilegx: Firstly add architecture related features Chen Gang
2015-04-09 21:21 ` Peter Maydell
2015-04-10 20:01 ` Chen Gang
2015-04-10 21:38 ` Peter Maydell
2015-04-11 2:39 ` Chen Gang
2015-03-27 10:49 ` [Qemu-devel] [PATCH 02/12 v9] linux-user: tilegx: Add target features support within qemu Chen Gang
2015-04-09 21:31 ` Peter Maydell
2015-04-10 20:41 ` Chen Gang
2015-04-10 21:51 ` Peter Maydell [this message]
2015-04-10 21:59 ` Andreas Färber
2015-04-10 22:21 ` Peter Maydell
2015-04-11 3:37 ` Chen Gang
2015-03-27 10:50 ` [Qemu-devel] [PATCH 03/12 v9] linux-user: Support tilegx architecture in syscall Chen Gang
2015-04-09 21:38 ` Peter Maydell
2015-04-10 20:46 ` Chen Gang
2015-03-27 10:52 ` [Qemu-devel] [PATCH 04/12 v9] linux-user: Support tilegx architecture in linux-user Chen Gang
2015-04-09 21:44 ` Peter Maydell
2015-04-10 20:51 ` Chen Gang
2015-03-27 10:53 ` [Qemu-devel] [PATCH 05/12 v9] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx Chen Gang
2015-04-09 21:46 ` Peter Maydell
2015-04-10 20:57 ` Chen Gang
2015-03-27 10:54 ` [Qemu-devel] [PATCH 06/12 v9] target-tilegx: Add cpu basic features for linux-user Chen Gang
2015-04-09 21:55 ` Peter Maydell
2015-04-10 21:04 ` Chen Gang
[not found] ` <55283AC6.2000205@hotmail.com>
2015-05-10 8:50 ` Chen Gang
2015-03-27 10:55 ` [Qemu-devel] [PATCH 07/12 v9] target-tilegx: Add helper " Chen Gang
2015-03-27 10:56 ` [Qemu-devel] [PATCH 08/12 v9] target-tilegx: Add opcode basic implementation for tilegx Chen Gang
2015-04-09 22:03 ` Peter Maydell
2015-04-10 21:06 ` Chen Gang
2015-03-27 10:57 ` [Qemu-devel] [PATCH 09/12 v9] target-tilegx: Finish processing bundle and preparing decoding pipes Chen Gang
2015-04-09 22:08 ` Peter Maydell
2015-04-10 21:08 ` Chen Gang
2015-03-27 11:00 ` [Qemu-devel] [PATCH 10/12 v9] target-tilegx: Add TILE-Gx building files Chen Gang
2015-04-09 22:10 ` Peter Maydell
2015-04-10 21:11 ` Chen Gang
2015-03-27 11:05 ` [Qemu-devel] [PATCH 11/12 v9] target-tilegx: Decoding pipes to support finish running 1st system call Chen Gang
2015-03-27 11:07 ` [Qemu-devel] [PATCH 12/12 v9] target-tilegx: Generate tcg instructions to execute to " Chen Gang
2015-04-09 22:19 ` Peter Maydell
2015-04-10 21:28 ` Chen Gang
2015-04-10 21:56 ` Peter Maydell
2015-04-11 3:11 ` Chen Gang
2015-04-21 21:01 ` Chen Gang
2015-04-21 21:15 ` Peter Maydell
2015-04-21 21:23 ` Chen Gang
2015-04-21 21:31 ` Peter Maydell
2015-04-22 13:42 ` Chen Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA9TGdHbVXUABaVmhAUdJoNaHDe-K5MeqaO7wNBbBKBaXA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=afaerber@suse.de \
--cc=cmetcalf@ezchip.com \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=rth@twiddle.net \
--cc=walt@tilera.com \
--cc=xili_gchen_5257@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).