qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v4 03/28] cpu: Introduce cpu_virtio_is_big_endian()


From: Richard Henderson
Subject: Re: [PATCH v4 03/28] cpu: Introduce cpu_virtio_is_big_endian()
Date: Wed, 3 Mar 2021 14:18:01 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 3/3/21 2:15 PM, Michael S. Tsirkin wrote:
On Wed, Mar 03, 2021 at 05:08:36PM -0500, Michael S. Tsirkin wrote:
On Wed, Mar 03, 2021 at 10:46:43PM +0100, Philippe Mathieu-Daudé wrote:
Introduce the cpu_virtio_is_big_endian() generic helper to avoid
calling CPUClass internal virtio_is_big_endian() one.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Using virtio in the name here probably because virtio wants this?
That doesn't sound like a good naming strategy, name should
tell us what function does not how it's used.

On a more concrete proposal, how about using this change
to rename the virtio_is_big_endian field to guest_is_big_endian(),
and put the wrapper somewhere in a virtio header instead?

We already one for normal guest endianness. This one is for when virtio specifically differs from that.


r~



reply via email to

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