qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 2/2] linux-user/riscv: Update the syscall_nr's to the 5.5


From: Alistair Francis
Subject: Re: [PATCH v2 2/2] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel
Date: Wed, 26 Feb 2020 16:10:29 -0800

On Wed, Feb 26, 2020 at 4:02 PM Laurent Vivier <address@hidden> wrote:
>
> Le 26/02/2020 à 20:32, Alistair Francis a écrit :
> > On Tue, Feb 25, 2020 at 3:50 AM Laurent Vivier <address@hidden> wrote:
> >>
> >> Le 25/02/2020 à 00:21, Alistair Francis a écrit :
> >>> Signed-off-by: Alistair Francis <address@hidden>
> ...
> >> I think you can remove following defintion as they should be translated
> >> by the target glibc.
> >
> > glibc won't be exposing these externally, the current plan is just to
> > use this internally to glibc.
>
> But if they are defined internally to glibc, glibc will always translate
> the older ones to the 64bit ones and thus glibc will never use the older
> ones with the kernel, only the 64bit ones, thus the older syscalls
> should never come to QEMU.

That's part of the problem. QEMU has no TARGET_NR_futex_time64
support, so we define TARGET_NR_futex to be TARGET_NR_futex_time64.

Looking a bit more it looks like there will still be issues as the
syscall.c makes assumptions on time_t and friends being the word
length (which isn't true for RV32), but this is at least a step in the
right direction.

Would it be possible to define the type sizes per architecture like glibc does?

Alistair

>
> So why do we need to define the translation older-to-64bit in QEMU too?
>
> >
> >>
> >>> +/*
> >>> + * Alias some of the older pre 64-bit time_t syscalls to the 64-bit
> >>> + * ones for RV32. This is based on the list used by glibc.
> >>> + */
> >>> +#define TARGET_NR_futex TARGET_NR_futex_time64
> >>> +#define TARGET_NR_rt_sigtimedwait TARGET_NR_rt_sigtimedwait_time64
> >>> +#define TARGET_NR_ppoll TARGET_NR_ppoll_time64
> >>> +#define TARGET_NR_utimensat TARGET_NR_utimensat_time64
> >>> +#define TARGET_NR_pselect6 TARGET_NR_pselect6_time64
> >>> +#define TARGET_NR_recvmmsg TARGET_NR_recvmmsg_time64
> >>> +#define TARGET_NR_semtimedop TARGET_NR_semtimedop_time64
> >>> +#define TARGET_NR_mq_timedreceive TARGET_NR_mq_timedreceive_time64
> >>> +#define TARGET_NR_mq_timedsend TARGET_NR_mq_timedsend_time64
> >>> +#define TARGET_NR_clock_getres TARGET_NR_clock_getres_time64
> >>> +#define TARGET_NR_timerfd_settime TARGET_NR_timerfd_settime64
> >>> +#define TARGET_NR_timerfd_gettime TARGET_NR_timerfd_gettime64
> >>> +#define TARGET_NR_sched_rr_get_interval 
> >>> TARGET_NR_sched_rr_get_interval_time64
> >>> +#define TARGET_NR_clock_adjtime TARGET_NR_clock_adjtime64
> >>> +
> >>> +#endif
> >>> diff --git a/linux-user/riscv/syscall64_nr.h 
> >>> b/linux-user/riscv/syscall64_nr.h
> >>> new file mode 100644
> >>> index 0000000000..b58364b570
> >>> --- /dev/null
> >>> +++ b/linux-user/riscv/syscall64_nr.h
> >>
> >> syscall64_nr.h is correct.
> >>
> >> Thanks,
> >> Laurent
> >>
> >
>



reply via email to

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