qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL v2 00/28] pci, pc, virtio: fixes, features


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL v2 00/28] pci, pc, virtio: fixes, features
Date: Fri, 26 Oct 2018 20:21:06 +0100

On 26 October 2018 at 14:26, Singh, Brijesh <address@hidden> wrote:
>
>
> On 10/25/2018 07:59 PM, Michael S. Tsirkin wrote:
>> On Thu, Oct 25, 2018 at 08:16:44PM +0100, Peter Maydell wrote:
>>> These should presumably all be "ULL". (The "UL" suffix is
>>> usually a bug, as it's either unnecessary or should be ULL.)
>>
>> Yea.  Fixed. Brijesh could you start cleaning up that header generally?
>> It has all kind of weird code like using bitfields for hardware
>> accesses. That isn't portable - switch to full dword fields with shift
>> and | to operate them and proper cpu_to_le APIs or similar please.
>>
>
>
> Noted, I will look into cleaning up this and send patches for reviews.

Thanks. You might like to look at the extract32()/extract64()/
deposit32()/deposit64() functions in bitops.h, which are often (but not
always) cleaner than hand-rolled shifts-and-logical-ops for assembling
and disassembling fields.

thanks
-- PMM



reply via email to

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