qemu-devel
[Top][All Lists]
Advanced

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

[Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c


From: puchuu
Subject: [Bug 1858461] Re: Please refactor linux-user/mips/cpu_loop.c
Date: Tue, 07 Jan 2020 19:07:15 -0000

It is possible to do the following:

cd /usr/src/linux
make clean
make CC=clang
~/workspace/CastXML/build/bin/castxml -nostdinc -isystem 
/usr/lib/clang/9.0.1/include -I./arch/x86/include 
-I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi 
-I./arch/x86/include/generated/uapi -I./include/uapi -include 
./include/linux/kconfig.h -D__KERNEL__ arch/x86/entry/syscall_32.c 
--castxml-output=1 -o /tmp/syscall_32.xml

It generates all information including params about 32bit syscalls for
current amd64 platform. Unfortunately cross compilation of generic
kernel using mips clang toolchain is almost impossible today. It is an
idea for future. So today we have to parse "include/linux/syscalls.h",
"include/linux/compat.h", "arch/mips/kernel/linux32.c", etc without
respect to config and syntax.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1858461

Title:
  Please refactor linux-user/mips/cpu_loop.c

Status in QEMU:
  New

Bug description:
  Hello. I am working with qemu on test images. I've added a new syscall
  (436) to qemu but received ENOSYS from mips application.

  Please open "linux-user/mips/cpu_loop.c". I've added at the end of
  "mips_syscall_args" the following:

  ```
  MIPS_SYS(sys_getdents64_x32, 3)
  ```

  But

  ```
  syscall_num = env->active_tc.gpr[2] - 4000;
  if (syscall_num >= sizeof(mips_syscall_args)) {
    ret = -TARGET_ENOSYS;
  ```

  returns -TARGET_ENOSYS

  We can see that "linux-user/mips/cpu_loop.c" differs a lot from
  "linux-user/arm/cpu_loop.c". Arm has it's own "ARM_NR_BASE" and etc.

  Can you please refactor mips cpu loop in the same way as arm? Thank
  you.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1858461/+subscriptions



reply via email to

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