qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>,
	virtualization@lists.linux-foundation.org
Subject: Re: [Qemu-devel] [PATCH 1/2] virtio: add modern config accessors
Date: Mon, 2 Mar 2015 12:55:32 +0100	[thread overview]
Message-ID: <20150302125532.5d4ee026.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1425296404-12903-1-git-send-email-mst@redhat.com>

On Mon, 2 Mar 2015 12:40:25 +0100
"Michael S. Tsirkin" <mst@redhat.com> 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@redhat.com>
> ---
>  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@de.ibm.com>

      parent reply	other threads:[~2015-03-02 11:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 11:40 [Qemu-devel] [PATCH 1/2] virtio: add modern config accessors Michael S. Tsirkin
2015-03-02 11:40 ` [Qemu-devel] [PATCH 2/2] virtio-pci: switch to modern accessors for 1.0 Michael S. Tsirkin
2015-03-02 11:56   ` Cornelia Huck
2015-03-02 12:16     ` Michael S. Tsirkin
2015-03-04  0:36   ` Rusty Russell
2015-03-04 10:14     ` Michael S. Tsirkin
2015-03-05  0:13       ` Rusty Russell
2015-03-02 11:55 ` Cornelia Huck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150302125532.5d4ee026.cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=aliguori@amazon.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).