[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 009/108] linux-user: Set up infrastructure fo
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 009/108] linux-user: Set up infrastructure for table-izing syscalls |
Date: |
Sun, 10 Jun 2018 09:03:45 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 06/10/2018 02:39 AM, Peter Maydell wrote:
> It would be cleaner to have a single
> #if something
> static foo_impl(..) { ... }
> static syscall_impl foo = {
> .name = "foo",
> .impl = foo_impl,
> .strace_stuff = ...,
> };
> register_syscall(foo);
> #endif
>
> Hash table?
It would be cleaner to have everything in one place, yes. I just replied along
those lines elsewhere in the thread.
Indeed, now that I'm thinking along the lines of strace, I'm thinking that
there should be a separate argument extraction step that would be shared by
both strace and syscall implementation.
I'm not a fan of register_syscall(foo) and the startup costs that implies.
The set of syscalls that we support is fixed at compile time. We should have a
compile-time generation step that builds everything that is required. Whether
this is C emitting C, or python emitting C, I do not yet have an opinion.
r~
- Re: [Qemu-devel] [PATCH v2 001/108] linux-user: Remove DEBUG, (continued)
- [Qemu-devel] [PATCH v2 002/108] linux-user: Split out do_syscall1, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 005/108] linux-user: Propagate goto unimplemented_nowarn to return, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 006/108] linux-user: Propagate goto unimplemented to default, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 007/108] linux-user: Propagate goto fail to return, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 004/108] linux-user: Propagate goto efault to return, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 008/108] linux-user: Make syscall number unsigned, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 009/108] linux-user: Set up infrastructure for table-izing syscalls, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 010/108] linux-user: Split out brk, close, exit, read, write, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 003/108] linux-user: Relax single exit from "break", Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 011/108] linux-user: Split out execve, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 012/108] linux-user: Split out open, openat, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 013/108] linux-user: Split out name_to_handle_at, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 014/108] linux-user: Split out open_to_handle_at, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 016/108] linux-user: Split out link, linkat, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 015/108] linux-user: Split out creat, fork, waitid, waitpid, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 017/108] linux-user: Split out unlink, unlinkat, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 018/108] linux-user: Split out chdir, mknod, mknodat, time, chmod, Richard Henderson, 2018/06/09