All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user: set minimum uname for RISC-V
@ 2018-04-24 16:03 Alex Bennée
  2018-04-24 16:40 ` Palmer Dabbelt
  2018-04-24 23:59 ` Richard Henderson
  0 siblings, 2 replies; 5+ messages in thread
From: Alex Bennée @ 2018-04-24 16:03 UTC (permalink / raw)
  To: qemu-devel, mjc, palmer, sagark, kbastian
  Cc: Alex Bennée, Riku Voipio, Laurent Vivier

As support was merged into the mainline kernel at 4.15 it is unlikely
3.8.0 is the correct value. Indeed when I testing binaries created by
the current Debian SID compiler the tests failed with:

  FATAL: kernel too old

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 linux-user/riscv/target_syscall.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/riscv/target_syscall.h b/linux-user/riscv/target_syscall.h
index d4e109a27f..ee81d8bc88 100644
--- a/linux-user/riscv/target_syscall.h
+++ b/linux-user/riscv/target_syscall.h
@@ -45,7 +45,7 @@ struct target_pt_regs {
 #else
 #define UNAME_MACHINE "riscv64"
 #endif
-#define UNAME_MINIMUM_RELEASE "3.8.0"
+#define UNAME_MINIMUM_RELEASE "4.15.0"
 
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_MLOCKALL_MCL_CURRENT 1
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: set minimum uname for RISC-V
  2018-04-24 16:03 [Qemu-devel] [PATCH] linux-user: set minimum uname for RISC-V Alex Bennée
@ 2018-04-24 16:40 ` Palmer Dabbelt
  2018-04-24 19:07   ` Peter Maydell
  2018-04-24 23:59 ` Richard Henderson
  1 sibling, 1 reply; 5+ messages in thread
From: Palmer Dabbelt @ 2018-04-24 16:40 UTC (permalink / raw)
  Cc: qemu-devel, Michael Clark, sagark, kbastian, alex.bennee,
	riku.voipio, laurent

On Tue, 24 Apr 2018 09:03:29 PDT (-0700), alex.bennee@linaro.org wrote:
> As support was merged into the mainline kernel at 4.15 it is unlikely
> 3.8.0 is the correct value. Indeed when I testing binaries created by
> the current Debian SID compiler the tests failed with:
>
>   FATAL: kernel too old
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  linux-user/riscv/target_syscall.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/linux-user/riscv/target_syscall.h b/linux-user/riscv/target_syscall.h
> index d4e109a27f..ee81d8bc88 100644
> --- a/linux-user/riscv/target_syscall.h
> +++ b/linux-user/riscv/target_syscall.h
> @@ -45,7 +45,7 @@ struct target_pt_regs {
>  #else
>  #define UNAME_MACHINE "riscv64"
>  #endif
> -#define UNAME_MINIMUM_RELEASE "3.8.0"
> +#define UNAME_MINIMUM_RELEASE "4.15.0"
>
>  #define TARGET_MINSIGSTKSZ 2048
>  #define TARGET_MLOCKALL_MCL_CURRENT 1

If I understand this correctly, this will make host kernels older than 4.15.0 
look like 4.15.0 when a program running in user-mode emulation on a RISC-V 
system?  I think that's the correct thing to do, so if that's the case then 
feel free to add a

    Reviewed-by: Palmer Dabbelt <palmer@sifive.com>

if that helps any.

Thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: set minimum uname for RISC-V
  2018-04-24 16:40 ` Palmer Dabbelt
@ 2018-04-24 19:07   ` Peter Maydell
  2018-04-24 19:44     ` Palmer Dabbelt
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2018-04-24 19:07 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Alex Bennée, Sagar Karandikar, Bastian Koppelmann,
	Riku Voipio, QEMU Developers, Laurent Vivier, Michael Clark

On 24 April 2018 at 17:40, Palmer Dabbelt <palmer@sifive.com> wrote:
> On Tue, 24 Apr 2018 09:03:29 PDT (-0700), alex.bennee@linaro.org wrote:
>>
>> As support was merged into the mainline kernel at 4.15 it is unlikely
>> 3.8.0 is the correct value. Indeed when I testing binaries created by
>> the current Debian SID compiler the tests failed with:
>>
>>   FATAL: kernel too old
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  linux-user/riscv/target_syscall.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/linux-user/riscv/target_syscall.h
>> b/linux-user/riscv/target_syscall.h
>> index d4e109a27f..ee81d8bc88 100644
>> --- a/linux-user/riscv/target_syscall.h
>> +++ b/linux-user/riscv/target_syscall.h
>> @@ -45,7 +45,7 @@ struct target_pt_regs {
>>  #else
>>  #define UNAME_MACHINE "riscv64"
>>  #endif
>> -#define UNAME_MINIMUM_RELEASE "3.8.0"
>> +#define UNAME_MINIMUM_RELEASE "4.15.0"
>>
>>  #define TARGET_MINSIGSTKSZ 2048
>>  #define TARGET_MLOCKALL_MCL_CURRENT 1
>
>
> If I understand this correctly, this will make host kernels older than
> 4.15.0 look like 4.15.0 when a program running in user-mode emulation on a
> RISC-V system?

Yes. Typically you want to set this to whatever glibc has
baked in as its arch_minimum_kernel, which in this case
does seem to be 4.15.0:

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/riscv/configure.ac;h=4fae013ec91451370a6d14b15b7e6d37fcd669af;hb=HEAD

thanks
-- PMM

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: set minimum uname for RISC-V
  2018-04-24 19:07   ` Peter Maydell
@ 2018-04-24 19:44     ` Palmer Dabbelt
  0 siblings, 0 replies; 5+ messages in thread
From: Palmer Dabbelt @ 2018-04-24 19:44 UTC (permalink / raw)
  To: peter.maydell
  Cc: alex.bennee, sagark, kbastian, riku.voipio, qemu-devel, laurent,
	Michael Clark

On Tue, 24 Apr 2018 12:07:43 PDT (-0700), peter.maydell@linaro.org wrote:
> On 24 April 2018 at 17:40, Palmer Dabbelt <palmer@sifive.com> wrote:
>> On Tue, 24 Apr 2018 09:03:29 PDT (-0700), alex.bennee@linaro.org wrote:
>>>
>>> As support was merged into the mainline kernel at 4.15 it is unlikely
>>> 3.8.0 is the correct value. Indeed when I testing binaries created by
>>> the current Debian SID compiler the tests failed with:
>>>
>>>   FATAL: kernel too old
>>>
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>> ---
>>>  linux-user/riscv/target_syscall.h | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/linux-user/riscv/target_syscall.h
>>> b/linux-user/riscv/target_syscall.h
>>> index d4e109a27f..ee81d8bc88 100644
>>> --- a/linux-user/riscv/target_syscall.h
>>> +++ b/linux-user/riscv/target_syscall.h
>>> @@ -45,7 +45,7 @@ struct target_pt_regs {
>>>  #else
>>>  #define UNAME_MACHINE "riscv64"
>>>  #endif
>>> -#define UNAME_MINIMUM_RELEASE "3.8.0"
>>> +#define UNAME_MINIMUM_RELEASE "4.15.0"
>>>
>>>  #define TARGET_MINSIGSTKSZ 2048
>>>  #define TARGET_MLOCKALL_MCL_CURRENT 1
>>
>>
>> If I understand this correctly, this will make host kernels older than
>> 4.15.0 look like 4.15.0 when a program running in user-mode emulation on a
>> RISC-V system?
>
> Yes. Typically you want to set this to whatever glibc has
> baked in as its arch_minimum_kernel, which in this case
> does seem to be 4.15.0:
>
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/riscv/configure.ac;h=4fae013ec91451370a6d14b15b7e6d37fcd669af;hb=HEAD

Sounds good, thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: set minimum uname for RISC-V
  2018-04-24 16:03 [Qemu-devel] [PATCH] linux-user: set minimum uname for RISC-V Alex Bennée
  2018-04-24 16:40 ` Palmer Dabbelt
@ 2018-04-24 23:59 ` Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2018-04-24 23:59 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel, mjc, palmer, sagark, kbastian
  Cc: Riku Voipio, Laurent Vivier

On 04/24/2018 06:03 AM, Alex Bennée wrote:
> As support was merged into the mainline kernel at 4.15 it is unlikely
> 3.8.0 is the correct value. Indeed when I testing binaries created by
> the current Debian SID compiler the tests failed with:
> 
>   FATAL: kernel too old
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  linux-user/riscv/target_syscall.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-25  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 16:03 [Qemu-devel] [PATCH] linux-user: set minimum uname for RISC-V Alex Bennée
2018-04-24 16:40 ` Palmer Dabbelt
2018-04-24 19:07   ` Peter Maydell
2018-04-24 19:44     ` Palmer Dabbelt
2018-04-24 23:59 ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.