qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH for 6.2 33/49] bsd-user: Rewrite target system call defininti


From: Warner Losh
Subject: Re: [PATCH for 6.2 33/49] bsd-user: Rewrite target system call definintion glue
Date: Thu, 19 Aug 2021 19:10:12 -0600


> On Aug 10, 2021, at 9:18 AM, Richard Henderson <richard.henderson@linaro.org> 
> wrote:
> 
> On 8/7/21 11:42 AM, Warner Losh wrote:
>> From: Warner Losh <imp@FreeBSD.org>
>> Rewrite target definnitions to interface with the FreeBSD system calls.
>> This covers basic types (time_t, iovec, umtx_time, timespec, timeval,
>> rusage, rwusage) and basic defines (mmap, rusage). Also included are
>> FreeBSD version-specific variations.
>> Signed-off-by: Stacey Son <sson@FreeBSD.org>
>> Signed-off-by: Warner Losh <imp@bsdimp.com>
>> ---
>>  bsd-user/bsd-mman.h     | 121 --------------------
>>  bsd-user/mmap.c         |   2 -
>>  bsd-user/syscall_defs.h | 247 ++++++++++++++++++++++++++--------------
>>  3 files changed, 162 insertions(+), 208 deletions(-)
>>  delete mode 100644 bsd-user/bsd-mman.h
> 
> Oof.  Well, I guess it's progress, but it's hard to read.

I too find it… tricky…  Once we have it all integrated and upstream matches our
fork, I’d be happy to do some cleanup in this area if you have good suggestions.

>> +struct target_freebsd_timeval {
>> +    target_freebsd_time_t       tv_sec; /* seconds */
>> +    target_freebsd_suseconds_t  tv_usec;/* and microseconds */
>> +#if !defined(TARGET_I386) && TARGET_ABI_BITS == 32
>> +    abi_long _pad;
>> +#endif
>> +} __packed;
> 
> I question the use of packed here.  You do realize that removes all alignment 
> requirements?  This is probably not what you want.  It's certainly not 
> present in the real freebsd _timeval.h.
> 
> Similarly with _timespec.h.

Yea, these are wrong. they used to be a thing, but as you point out, __packed 
doesn’t do what people think it does…  I’ll remove.

Warner

Attachment: signature.asc
Description: Message signed with OpenPGP


reply via email to

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