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

Re: riscv64 and qemu trunk



On Wed, Oct 24, 2018 at 1:56 AM Michael Clark <michaeljclark@mac.com> wrote:

> Just as FYI to Luke and others.

[ ta, michael. ]

> As far as I know, the requirement on the host kernel being 4.15
> or higher is due to the modern RISC-V/Glibc kernel ABI and the
> way that qemu-riscv64 (linux-user emulation) proxies syscalls
> from the RV64 binaries to the host kernel (probably amd64).

 interesting.

> If your host kernel is too old, it may not contain the syscalls
> that are used by the modern RV64 Glibc. The choice of 4.15.0
> is somewhat arbitrary and the constraint on host kernel version
> could possibly be relaxed.

 anything i could test which can check that?  just for fun i've done
"apt-get install xterm", export DISPLAY=:0.0, and also mount --bind on
/dev/pts to get round the "not enough ptys" thing:
/dev/pts /home/lkcl/src/libreriscv/sid-riscv64-sbuild/dev/pts   none
 bind    0   0

 that works fine.

 so the chroot is up and running (or, both of them).

> There was a patch that raised the minimum from 3.8.0 to 4.15.0
>
> https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg04325.html
>
> I’m not sure if this is related, but you can grep -r the qemu source tree to find the error message.
>
> The kernel version used in the patch may or may not be the
> minimum host kernel version. That requires a little analysis.
>  I vaguely remember there may be some new syscall like
> renameat or renameat2 that needs to be present on the host kernel.

 looks like that one was added a while back
 https://stackoverflow.com/questions/41655386/no-renameat2-system-call-function-on-ubuntu-16-04
 https://lore.kernel.org/patchwork/patch/458491/

> The correct minimum host kernel version is in fact the kernel that contains the most recent ABI change that Glibc RISC-V depends on and that isn’t strictly the first version of Linux kernel that included RISC-V. They could indeed be the same version but, that needs analysis...

 linux-image-4.13-amd64 host here, seems to not have obviously broken
yet, although i've not run anything particularly extensive: xterm's
quite a lot :)

 hm i'll try something exciting like installing surf, it's based on
libwebkitgtk so should bring in a whole ton-o-crud

> I suspect qemu-riscv64 will run on older kernels if you patch
> the kernel version check, but be prepared for unpredictable results.

 :)


Reply to: