qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/4] Enable virtio-fs on s390x
@ 2020-06-25 10:04 Marc Hartmayer
  2020-06-25 10:04 ` [RFC 1/4] virtio: add vhost-user-fs-ccw device Marc Hartmayer
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Marc Hartmayer @ 2020-06-25 10:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrangé, Michael S. Tsirkin, Cornelia Huck,
	Halil Pasic, Stefan Hajnoczi, Marc-André Lureau

This RFC is about enabling virtio-fs on s390x. For that we need
 + some shim code (first patch), and we need
 + libvhost-user to deal with virtio endiannes as mandated by the spec.
 
The second part is trickier, because unlike QEMU we are not certain
about the guest's native endianness, which is needed to handle the
legacy-interface appropriately. In fact, this is the reason why just
RFC.

One of the open questions is whether to build separate versions, one
for guest little endian and one for guest big endian, or do we want
something like a command line option? (Digression on the libvirt
modeling)

A third option would be to refuse legacy altogether.

libvhost-access.h is based on hw/virtio/virtio-access.h.


How to use?

For general instructions how to use virtio-fs (on x86) please have a
look at https://virtio-fs.gitlab.io/howto-qemu.html. Most of the
instructions can also be applied on s390x.

In short:

1. Install self-compiled QEMU with this patch series applied
2. Prepare host and guest kernel so they support virtio-fs

Start virtiofsd on the host

 $ virtiofsd -f --socket-path=/tmp/vhostqemu -o source=/tmp/shared

Now you can start QEMU in a separate shell on the host:

 $ qemu-system-s390x -machine type=s390-ccw-virtio,accel=kvm,memory-backend=mem \
   -object memory-backend-file,id=mem,size=2G,mem-path=/dev/shm/virtiofs,share=on,prealloc=on,prealloc-threads=1 \
   -chardev socket,id=char0,path=/tmp/vhostqemu -device vhost-user-fs-ccw,queue-size=1024,chardev=char0,tag=myfs \
   -drive if=virtio,file=disk.qcow2 \
   -m 2G -smp 2 -nographic

Log into the guest and mount it

 $ mount -t virtiofs myfs /mnt


Halil Pasic (1):
  virtio: add vhost-user-fs-ccw device

Marc Hartmayer (3):
  libvhost-user: print invalid address on vu_panic
  libvhost-user: handle endianness as mandated by the spec
  HACK: Hard-code the libvhost-user.o-cflags for s390x

 Makefile.objs                           |   1 +
 contrib/libvhost-user/libvhost-access.h |  87 +++++++++++++++++
 contrib/libvhost-user/libvhost-user.c   | 124 ++++++++++++------------
 hw/s390x/Makefile.objs                  |   1 +
 hw/s390x/vhost-user-fs-ccw.c            |  74 ++++++++++++++
 5 files changed, 227 insertions(+), 60 deletions(-)
 create mode 100644 contrib/libvhost-user/libvhost-access.h
 create mode 100644 hw/s390x/vhost-user-fs-ccw.c

-- 
2.25.4



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

end of thread, other threads:[~2020-07-02 10:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-25 10:04 [RFC 0/4] Enable virtio-fs on s390x Marc Hartmayer
2020-06-25 10:04 ` [RFC 1/4] virtio: add vhost-user-fs-ccw device Marc Hartmayer
2020-06-25 10:50   ` Cornelia Huck
2020-06-25 10:04 ` [RFC 2/4] libvhost-user: print invalid address on vu_panic Marc Hartmayer
2020-06-25 10:04 ` [RFC 3/4] libvhost-user: handle endianness as mandated by the spec Marc Hartmayer
2020-06-25 10:04 ` [RFC 4/4] HACK: Hard-code the libvhost-user.o-cflags for s390x Marc Hartmayer
2020-06-25 10:13 ` [RFC 0/4] Enable virtio-fs on s390x no-reply
2020-06-25 10:16 ` no-reply
2020-06-25 10:17 ` Cornelia Huck
2020-06-25 12:13   ` Halil Pasic
2020-06-25 10:19 ` Daniel P. Berrangé
2020-06-25 10:31   ` Cornelia Huck
2020-06-25 10:39     ` Daniel P. Berrangé
2020-06-25 10:46       ` Cornelia Huck
2020-06-25 11:07   ` Dr. David Alan Gilbert
2020-06-25 12:21   ` Halil Pasic
2020-06-29 12:53 ` Stefan Hajnoczi
2020-06-29 13:07   ` Daniel P. Berrangé
2020-06-30  9:04     ` Stefan Hajnoczi
2020-06-30  9:39       ` Cornelia Huck
2020-07-02 10:01         ` Michael S. Tsirkin

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