qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] hw/acpi/nvdimm: Don't take address of fields in


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] hw/acpi/nvdimm: Don't take address of fields in packed structs
Date: Mon, 12 Nov 2018 15:14:01 +0000

On 12 November 2018 at 15:01, Michael S. Tsirkin <address@hidden> wrote:
> On Mon, Nov 12, 2018 at 02:42:16PM +0000, Peter Maydell wrote:
>> Since nobody responded to my ping of a week ago I propose to just
>> apply this to master...
>>
>> thanks
>> -- PMM
>
> Sorry. My LPC talk proposal suddenly got accepted and
> I was scrambling to get ready.
>
> Please feel free to apply this for now:
>
> Reviewed-by: Michael S. Tsirkin <address@hidden>

Thanks.

> Generally I think we need to rethink our approach to endian-ness. I
> think we want to tag fields with specific endian-ness and use static
> checkers to verify it. That is how Linux does it.
> In particular this will mean no swapping bytes in place.

Yeah, I agree that swapping-in-place is definitely not ideal.
Personally I prefer to avoid having structs that try to match
in-memory binary layouts entirely (ie no packed structs).

> But that's a subject for another day.

Indeed.

-- PMM



reply via email to

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