qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe


From: Richard Henderson
Subject: Re: [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe
Date: Sat, 3 Jun 2023 10:48:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

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~



reply via email to

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