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

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

 



On Mon, 2 Mar 2015 12:40:25 +0100
"Michael S. Tsirkin" <mst@xxxxxxxxxx> 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 <mst@xxxxxxxxxx>
> ---
>  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 <cornelia.huck@xxxxxxxxxx>

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux