qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v5 0/8] virtio endian-ambivalent target fixes
@ 2014-02-21 11:28 Greg Kurz
  2014-02-21 11:28 ` [Qemu-devel] [PATCH v5 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio Greg Kurz
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Greg Kurz @ 2014-02-21 11:28 UTC (permalink / raw)
  To: afaerber
  Cc: kwolf, peter.maydell, thuth, mst, marc.zyngier, rusty, agraf,
	qemu-devel, stefanha, cornelia.huck, pbonzini, anthony

Hi,

This serie introduces helpers to enable virtio devices in a cross-endian
environment. As of today, we only have legacy virtio but hopefully this
helpers will be reused when we implement virtio 1.0.

Some assumptions are made for the legacy implementation:
- all guest cpus have the same endianness
- all virtio devices have the same endianness
- endianness does not change while the device is in use

The decision to byteswap or not is hence controlled by a global variable that
gets initialized on the virtio reset path for each device. This is slightly
suboptimal, but since reset is not a critical path, it is a viable solution.

Of course, this patchset needs some arch specific enablement to be fully
functionnal (PPC patches have already been posted to support KVM and TCG).

The changes since the last post are:
- fixed SoB lines and subjects, as suggested by Andreas
- fixed missing virtio_ in patch 2/8, spotted by Cornelia
- relicensed virtio-access.h to GPLv2+ in patch 1/8, as requested by Rusty

Thanks for your comments.

Best Regards.

--
Greg

---

Greg Kurz (1):
      virtio-9p: use virtio wrappers to access headers

Rusty Russell (7):
      virtio_get_byteswap: function for endian-ambivalent targets using virtio
      virtio: allow byte swapping for vring and config access
      virtio-net: use virtio wrappers to access headers
      virtio-balloon: use virtio wrappers to access page frame numbers
      virtio-blk: use virtio wrappers to access headers
      virtio-scsi: use virtio wrappers to access headers
      virtio-serial-bus: use virtio wrappers to access headers


 hw/9pfs/virtio-9p-device.c        |    3 +
 hw/block/virtio-blk.c             |   35 +++++-----
 hw/char/virtio-serial-bus.c       |   34 +++++----
 hw/net/virtio-net.c               |   15 ++--
 hw/scsi/virtio-scsi.c             |   33 +++++----
 hw/virtio/virtio-balloon.c        |    3 +
 hw/virtio/virtio.c                |   38 ++++++----
 include/hw/virtio/virtio-access.h |  134 +++++++++++++++++++++++++++++++++++++
 include/hw/virtio/virtio.h        |    2 +
 stubs/Makefile.objs               |    1 
 stubs/virtio_get_byteswap.c       |    6 ++
 11 files changed, 230 insertions(+), 74 deletions(-)
 create mode 100644 include/hw/virtio/virtio-access.h
 create mode 100644 stubs/virtio_get_byteswap.c

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-02-25 16:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 11:28 [Qemu-devel] [PATCH v5 0/8] virtio endian-ambivalent target fixes Greg Kurz
2014-02-21 11:28 ` [Qemu-devel] [PATCH v5 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio Greg Kurz
2014-02-25 15:21   ` Stefan Hajnoczi
2014-02-25 15:59     ` Greg Kurz
2014-02-21 11:28 ` [Qemu-devel] [PATCH v5 2/8] virtio: allow byte swapping for vring and config access Greg Kurz
2014-02-21 11:28 ` [Qemu-devel] [PATCH v5 3/8] virtio-net: use virtio wrappers to access headers Greg Kurz
2014-02-21 11:28 ` [Qemu-devel] [PATCH v5 4/8] virtio-balloon: use virtio wrappers to access page frame numbers Greg Kurz
2014-02-21 11:28 ` [Qemu-devel] [PATCH v5 5/8] virtio-blk: use virtio wrappers to access headers Greg Kurz
2014-02-21 11:28 ` [Qemu-devel] [PATCH v5 6/8] virtio-scsi: " Greg Kurz
2014-02-21 11:28 ` [Qemu-devel] [PATCH v5 7/8] virtio-serial-bus: " Greg Kurz
2014-02-21 11:29 ` [Qemu-devel] [PATCH v5 8/8] virtio-9p: " Greg Kurz
2014-02-25 15:22 ` [Qemu-devel] [PATCH v5 0/8] virtio endian-ambivalent target fixes Stefan Hajnoczi

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).