qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] virtio: add modern config accessors


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH 1/2] virtio: add modern config accessors
Date: Mon, 2 Mar 2015 12:55:32 +0100

On Mon, 2 Mar 2015 12:40:25 +0100
"Michael S. Tsirkin" <address@hidden> wrote:

> virtio 1.0 defines config space as LE,
> as opposed to pre-1.0 which was native endian.
> 
> Add API for transports to execute word/dword accesses in
> little endian format - will be useful for mmio
> and pci (byte access is also wrapped, for completeness).
> 
> For simplicity, we still keep config in host native
> endian format, byteswap to LE on guest access.
> 
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
>  include/hw/virtio/virtio.h |  6 +++
>  hw/virtio/virtio.c         | 93 
> ++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 99 insertions(+)

One could also imagine making the accessors dependant on whether the
provided virtio device is standard compliant, but as mmio will probably
register different MemoryRegionOps for v1.0 devices as well, this
should work out nicer this way.

Reviewed-by: Cornelia Huck <address@hidden>




reply via email to

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