From: Richard Henderson <richard.henderson@linaro.org>
To: Andrew Jones <ajones@ventanamicro.com>
Cc: Robbin Ehn <rehn@rivosinc.com>,
qemu-devel@nongnu.org, laurent@vivier.eu, qemu-riscv@nongnu.org
Subject: Re: [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe
Date: Sat, 3 Jun 2023 10:48:06 -0700 [thread overview]
Message-ID: <9e7e7b8e-38c7-3dee-d881-05bcd306c309@linaro.org> (raw)
In-Reply-To: <20230603-c4d94ebf5c1a129e5cf3ebb4@orel>
On 6/3/23 08:50, Andrew Jones wrote:
> On Fri, Jun 02, 2023 at 07:58:30PM -0700, Richard Henderson wrote:
>> On 6/2/23 07:02, Andrew Jones wrote:
>>>> +struct riscv_hwprobe {
>>>> + int64_t key;
>>>> + uint64_t value;
>>>> +};
>>>
>>> The above is all uapi so Linux's arch/riscv/include/uapi/asm/hwprobe.h
>>> should be picked up on Linux header update. You'll need to modify the
>>> script, scripts/update-linux-headers.sh, to do that by adding a new
>>> riscv-specific block. Hacking this by importing the header file manually
>>> is fine for an RFC, but that should be a separate patch or part of the
>>> syscall define hack patch. And hack patches should be clearly tagged as
>>> "NOT FOR MERGE".
>>
>>
>> Not true. linux-user/ never looks at linux-headers/.
>
> Ah, thanks. I should have known better than to try and review a linux-user
> patch, since I know almost nothing about it! Is uapi like this usually
> duplicated, as was done in this patch?
Yes, because linux-headers is only for the "native" compiler, whereas linux-user requires
the ABI of the guest.
If we were doing this all from scratch, we would mechanically parse and rewrite linux-headers.
r~
next prev parent reply other threads:[~2023-06-03 17:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 9:41 [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe Robbin Ehn
2023-06-02 14:02 ` Andrew Jones
2023-06-02 14:39 ` Robbin Ehn
2023-06-02 15:07 ` Andrew Jones
2023-06-03 3:00 ` Richard Henderson
2023-06-05 14:27 ` Robbin Ehn
2023-06-03 2:58 ` Richard Henderson
2023-06-03 15:50 ` Andrew Jones
2023-06-03 17:48 ` Richard Henderson [this message]
2023-06-03 2:57 ` Richard Henderson
2023-06-05 14:23 ` Robbin Ehn
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=9e7e7b8e-38c7-3dee-d881-05bcd306c309@linaro.org \
--to=richard.henderson@linaro.org \
--cc=ajones@ventanamicro.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=rehn@rivosinc.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).