Re: [PATCH 0/3] vhost_net: support for cross endian guests

2 messages, 2 authors, 2015-02-23 · open the first message on its own page

Re: [PATCH 0/3] vhost_net: support for cross endian guests

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2015-02-22 09:54:02

On Fri, Feb 20, 2015 at 11:07:24AM +0100, Greg Kurz wrote:
Hi,

This patchset allows vhost_net to be used with legacy virtio
when guest and host have a different endianness. It is based
on previous work by Cédric Le Goater:

https://www.mail-archive.com/kvm-ppc@vger.kernel.org/msg09848.html

As suggested by MST:
- the API now asks for a specific format (big endian) instead of the hint
  whether byteswap is needed or not (patch 1)
- rebased on top of the virtio-1 accessors (patch 2)

Patch 3 is a separate fix: I think it is also valid for virtio-1.
I don't think so. See e.g. this code in tun:
                        gso.csum_offset = cpu_to_tun16(tun, skb->csum_offset);
looks like it has the correct endian-ness for virtio-1.


Please comment.

---

Greg Kurz (3):
      vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag
      vhost: add support for legacy virtio
      vhost_net: fix virtio_net header endianness


 drivers/vhost/net.c        |   32 ++++++++++++++++++++++++++------
 drivers/vhost/vhost.c      |    6 +++++-
 drivers/vhost/vhost.h      |   23 +++++++++++++++++------
 include/uapi/linux/vhost.h |    2 ++
 4 files changed, 50 insertions(+), 13 deletions(-)

--
Greg

Re: [PATCH 0/3] vhost_net: support for cross endian guests

From: Greg Kurz <hidden>
Date: 2015-02-23 13:25:22

On Sun, 22 Feb 2015 10:53:51 +0100
"Michael S. Tsirkin" [off-list ref] wrote:
On Fri, Feb 20, 2015 at 11:07:24AM +0100, Greg Kurz wrote:
quoted
Hi,

This patchset allows vhost_net to be used with legacy virtio
when guest and host have a different endianness. It is based
on previous work by Cédric Le Goater:

https://www.mail-archive.com/kvm-ppc@vger.kernel.org/msg09848.html

As suggested by MST:
- the API now asks for a specific format (big endian) instead of the hint
  whether byteswap is needed or not (patch 1)
- rebased on top of the virtio-1 accessors (patch 2)

Patch 3 is a separate fix: I think it is also valid for virtio-1.
I don't think so. See e.g. this code in tun:
                        gso.csum_offset = cpu_to_tun16(tun, skb->csum_offset);
looks like it has the correct endian-ness for virtio-1.
Indeed. I will fix tun/macvtap as you suggested.

Thanks for the review.

--
Greg
quoted
Please comment.

---

Greg Kurz (3):
      vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag
      vhost: add support for legacy virtio
      vhost_net: fix virtio_net header endianness


 drivers/vhost/net.c        |   32 ++++++++++++++++++++++++++------
 drivers/vhost/vhost.c      |    6 +++++-
 drivers/vhost/vhost.h      |   23 +++++++++++++++++------
 include/uapi/linux/vhost.h |    2 ++
 4 files changed, 50 insertions(+), 13 deletions(-)

--
Greg
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help