[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 12/19] linux-user: Setup split syscall infras
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v3 12/19] linux-user: Setup split syscall infrastructure |
Date: |
Fri, 22 Jun 2018 10:32:36 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 06/22/2018 03:30 AM, Peter Maydell wrote:
>> +struct SyscallDef {
>> + const char *name;
>> + SyscallArgsFn *args;
>> + SyscallImplFn *impl;
>> + SyscallPrintFn *print;
>> + SyscallPrintRetFn *print_ret;
>
> Are all these hook functions mandatory, or can a syscall
> implementation leave some of them NULL for a default behaviour?
Only impl is mandatory. You're right that there should be more doco here at
the structure definition. Here, the docs got split down to the macros that
define the most common forms of the structures. Will fix.
>> static void
>> print_flags(const struct flags *f, abi_long flags, int last)
>> {
>> - const char *sep = "";
>> - int n;
>> + char buf[256];
>> + add_flags(buf, sizeof(buf), f, flags, false);
>> + gemu_log("%s%s", buf, get_comma(last));
>> +}
>
> All this refactoring of the strace functions feels like it
> should have been in a separate patch...
Fair.
r~
- Re: [Qemu-devel] [PATCH v3 09/19] linux-user: Propagate goto unimplemented_nowarn to return, (continued)
- [Qemu-devel] [PATCH v3 10/19] linux-user: Propagate goto unimplemented to default, Richard Henderson, 2018/06/11
- [Qemu-devel] [PATCH v3 08/19] linux-user: Propagate goto efault to return, Richard Henderson, 2018/06/11
- [Qemu-devel] [PATCH v3 11/19] linux-user: Propagate goto fail to return, Richard Henderson, 2018/06/11
- [Qemu-devel] [PATCH v3 07/19] linux-user: Relax single exit from "break", Richard Henderson, 2018/06/11
- [Qemu-devel] [PATCH v3 12/19] linux-user: Setup split syscall infrastructure, Richard Henderson, 2018/06/11
- [Qemu-devel] [PATCH v3 13/19] linux-user: Split out close, open, openat, read, write, Richard Henderson, 2018/06/11
- [Qemu-devel] [PATCH v3 14/19] linux-user: Split out preadv, pwritev, readv, writev, Richard Henderson, 2018/06/11
- [Qemu-devel] [PATCH v3 15/19] linux-user: Split out pread64, pwrite64, Richard Henderson, 2018/06/11
- [Qemu-devel] [PATCH v3 16/19] linux-user: Split out name_to_handle_at, open_by_handle_at, Richard Henderson, 2018/06/11
- [Qemu-devel] [PATCH v3 18/19] linux-user: Split out memory syscalls, Richard Henderson, 2018/06/11