All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] VirtFS support on Xen
@ 2016-01-21 10:28 Wei Liu
  2016-01-21 10:50 ` David Vrabel
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2016-01-21 10:28 UTC (permalink / raw)
  To: Xen-devel; +Cc: wei.liu2

[RFC] VirtFS support on Xen

# Introduction

QEMU/KVM supports file system passthrough via an interface called
VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol [1] and
VirtIO transport.

Xen used to have its own implementation of file system passthrough
called XenFS, but that has been inactive for a few years. The latest
update was in 2009 [2].

This project aims to add VirtFS support on Xen. This is more
sustainable than inventing our own wheel.

# QEMU

Some preliminary work has been done. The original code made a lot of
assumptions that VirtFS was tied to VirtIO, which wasn't true. Patches
to disentangle VirtFS generic code and VirtIO transport have been
upstreamed. What we now need to do is to implement a Xen transport
inside QEMU.

# Linux kernel

Linux kernel has a better shape than QEMU. The generic code and
transport layers are separated cleanly. We need to add a new transport
for Xen.

# Xen toolstack

New interfaces will be added to exposed relevant configuration options
to users. In essence it is just plumbing the right options to QEMU.

# Security

Xen transport will utilise grant table to limit access from backend to
frontend. Users can use several security modes provided by QEMU.

By and large the security of VirtFS on Xen depends on the quality of
QEMU VirtFS code (this is in line with our expectation of other PV
backends in QEMU) and the particular setup of VirtFS (whether a chroot
fs-proxy is used, which security model is picked etc).

# Device type and wire format

I propose to use "virtfs" as device type. A header file named virtfs.h
shall be committed to xen.git as reference for future implementation.

The design of wire format is limited by two factors: 1) 9pfs protocol
is based on transaction -- client sends out request and expects
response, 2) the arrangement of Linux kernel 9pfs places request
buffer and response buffer on the wire at the same time.

Linux seems to be the only one among several popular UNIX / UNIX-like
systems that has in-kernel 9p protocol implementation (correct me if
I'm wrong), so I couldn't fathom what other OSes such as FreeBSD and
NetBSD would need from this wire format. But it would be safe to bet
that they would like to reuse as much code as possible and follow the
same path as Linux does.

So the conclusion so far is that it would make sense for us to follow
the Linux approach (putting two buffers on wire at the same time) to
minimise our work. Other opinions are welcome.

As for the wire format itself, I've attached a draft from my
code. It's far from complete, but it contains the wire format I
envisage.

# Optimisation

The Xen trasnport can be easily extended to use multiple-page ring
should the need arise. A more sophisticated optimisation is to support
"indirect-descriptor" like interface to boost bandwidth.


Wei.


[0] http://www.linux-kvm.org/page/VirtFS
[1] https://en.wikipedia.org/wiki/9P_(protocol)
[2] https://blog.xenproject.org/2009/03/26/status-of-xenfs/
[3] http://wiki.qemu.org/Documentation/9psetup
[4] http://man.cat-v.org/plan_9/5/intro

DRAFT HEADER

/******************************************************************************
 * virtfs.h
 *
 * Copyright (c) 2016, Wei Liu <wei.liu2@citrix.com>
 */

#ifndef __XEN_PUBLIC_IO_VIRTFS_H__
#define __XEN_PUBLIC_IO_VIRTFS_H__

#include <xen/interface/io/ring.h>
#include <xen/interface/grant_table.h>

struct xen_virtfsif_request {
	grant_ref_t gref;      /* Reference to buffer page */
	uint16_t offset;       /* Offset within buffer page */
	uint16_t flags;        /* XEN_VIRTFSF_* */
	uint16_t id;           /* Echoed in response message. */
};

struct xen_virtfsif_response {
	uint16_t id;
	int16_t  status;	/* Indicate whether backend successfully copy / map */
};

/* TODO: RFC style diagrams go in here */

/* TODO: document xenstore path */
/*
 * /local/domain/$guest/device/virtfs/$x/tag
 * /local/domain/$guest/device/virtfs/$x/ring-ref
 * /local/domain/$guest/device/virtfs/$x/event-channel
 */

/*
 * This is wire format for virtfs requests:
 *   Request 1: xen_virtfsif_request -- XEN_VIRTFSF_* (any flag)
 *   Request 2: xen_virtfsif_request -- if request 1 has XEN_VIRTFSF_MORE
 *   Request 3: xen_virtfsif_request -- if request 2 has XEN_VIRTFSF_MORE
 *   ...
 *   Request N: xen_virtfsif_request -- if request (N-1) has XEN_VIRTFSF_MORE,
 *                                      while itself doesn't contain
 *                                      XEN_VIRTFSF_MORE
 *
 *
 *  | slot 0 | slot 1 | ... | slot m | ... | slot n       |
 *  |       9p request buffer        | 9p response buffer |
 *
 *  Grefs for 9p requests (if any) go in first half of wire format,
 *  grefs for 9p responses (if any) go in second half.
 */

/* If this bit is set, the next slot if part of the request. */
#define _XEN_VIRTFSF_MORE (0)
#define XEN_VIRTFSF_MORE  (1U << _XEN_VIRTFSF_MORE)

/*
 * If this bit is set, this gref is for backend to write data (9p
 * response buffer); otherwise it is for backend to read (9p request
 * buffer).
 */
#define _XEN_VIRTFSF_WRITE (1)
#define XEN_VIRTFSF_WRITE  (1U << _XEN_VIRTFSF_WRITE)

DEFINE_RING_TYPES(xen_virtfsif,
		  struct xen_virtfsif_request,
		  struct xen_virtfsif_response);

#endif /* virtfs.h */

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

* Re: [RFC] VirtFS support on Xen
  2016-01-21 10:28 [RFC] VirtFS support on Xen Wei Liu
@ 2016-01-21 10:50 ` David Vrabel
  2016-01-21 10:59   ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: David Vrabel @ 2016-01-21 10:50 UTC (permalink / raw)
  To: Wei Liu, Xen-devel

On 21/01/16 10:28, Wei Liu wrote:
> [RFC] VirtFS support on Xen
> 
> # Introduction
> 
> QEMU/KVM supports file system passthrough via an interface called
> VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol [1] and
> VirtIO transport.
> 
> Xen used to have its own implementation of file system passthrough
> called XenFS, but that has been inactive for a few years. The latest
> update was in 2009 [2].
> 
> This project aims to add VirtFS support on Xen. This is more
> sustainable than inventing our own wheel.#

What's the use case for this?  Who wants this feature?

David

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

* Re: [RFC] VirtFS support on Xen
  2016-01-21 10:50 ` David Vrabel
@ 2016-01-21 10:59   ` Wei Liu
  2016-01-22 10:45     ` Bob Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2016-01-21 10:59 UTC (permalink / raw)
  To: David Vrabel; +Cc: Xen-devel, Wei Liu

On Thu, Jan 21, 2016 at 10:50:08AM +0000, David Vrabel wrote:
> On 21/01/16 10:28, Wei Liu wrote:
> > [RFC] VirtFS support on Xen
> > 
> > # Introduction
> > 
> > QEMU/KVM supports file system passthrough via an interface called
> > VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol [1] and
> > VirtIO transport.
> > 
> > Xen used to have its own implementation of file system passthrough
> > called XenFS, but that has been inactive for a few years. The latest
> > update was in 2009 [2].
> > 
> > This project aims to add VirtFS support on Xen. This is more
> > sustainable than inventing our own wheel.#
> 
> What's the use case for this?  Who wants this feature?
> 

Anyone who wants file system passthrough.  More specifically, VM-based
container solutions can share files from host file system.

http://xendevsummit2015.sched.org/event/3WDg/xen-containers-better-way-to-run-docker-containers-sainath-grandhi-intel?iframe=no&w=&sidebar=yes&bg=no
http://xendevsummit2015.sched.org/event/3X1L/hyper-make-vm-run-like-containers-xu-wang-hyper?iframe=no&w=&sidebar=yes&bg=no

Wei.

> David

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

* Re: [RFC] VirtFS support on Xen
  2016-01-21 10:59   ` Wei Liu
@ 2016-01-22 10:45     ` Bob Liu
  2016-01-22 10:50       ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Bob Liu @ 2016-01-22 10:45 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, David Vrabel

Hi Wei,

On 01/21/2016 06:59 PM, Wei Liu wrote:
> On Thu, Jan 21, 2016 at 10:50:08AM +0000, David Vrabel wrote:
>> On 21/01/16 10:28, Wei Liu wrote:
>>> [RFC] VirtFS support on Xen
>>>
>>> # Introduction
>>>
>>> QEMU/KVM supports file system passthrough via an interface called
>>> VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol [1] and
>>> VirtIO transport.
>>>
>>> Xen used to have its own implementation of file system passthrough
>>> called XenFS, but that has been inactive for a few years. The latest
>>> update was in 2009 [2].
>>>
>>> This project aims to add VirtFS support on Xen. This is more
>>> sustainable than inventing our own wheel.#
>>
>> What's the use case for this?  Who wants this feature?
>>
> 
> Anyone who wants file system passthrough.  More specifically, VM-based
> container solutions can share files from host file system.
> 

I'm a bit confused, can't we just use the VirtFS of Qemu?
E.g
./configure --with-extra-qemuu-configure-args="--enable-virtfs"

Thanks,
Bob

> http://xendevsummit2015.sched.org/event/3WDg/xen-containers-better-way-to-run-docker-containers-sainath-grandhi-intel?iframe=no&w=&sidebar=yes&bg=no
> http://xendevsummit2015.sched.org/event/3X1L/hyper-make-vm-run-like-containers-xu-wang-hyper?iframe=no&w=&sidebar=yes&bg=no
> 
> Wei.
> 

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

* Re: [RFC] VirtFS support on Xen
  2016-01-22 10:45     ` Bob Liu
@ 2016-01-22 10:50       ` Wei Liu
  2016-01-22 11:12         ` Paul Durrant
  2016-01-23  5:33         ` Bob Liu
  0 siblings, 2 replies; 13+ messages in thread
From: Wei Liu @ 2016-01-22 10:50 UTC (permalink / raw)
  To: Bob Liu; +Cc: Xen-devel, Wei Liu, David Vrabel

On Fri, Jan 22, 2016 at 06:45:30PM +0800, Bob Liu wrote:
> Hi Wei,
> 
> On 01/21/2016 06:59 PM, Wei Liu wrote:
> > On Thu, Jan 21, 2016 at 10:50:08AM +0000, David Vrabel wrote:
> >> On 21/01/16 10:28, Wei Liu wrote:
> >>> [RFC] VirtFS support on Xen
> >>>
> >>> # Introduction
> >>>
> >>> QEMU/KVM supports file system passthrough via an interface called
> >>> VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol [1] and
> >>> VirtIO transport.
> >>>
> >>> Xen used to have its own implementation of file system passthrough
> >>> called XenFS, but that has been inactive for a few years. The latest
> >>> update was in 2009 [2].
> >>>
> >>> This project aims to add VirtFS support on Xen. This is more
> >>> sustainable than inventing our own wheel.#
> >>
> >> What's the use case for this?  Who wants this feature?
> >>
> > 
> > Anyone who wants file system passthrough.  More specifically, VM-based
> > container solutions can share files from host file system.
> > 
> 
> I'm a bit confused, can't we just use the VirtFS of Qemu?
> E.g
> ./configure --with-extra-qemuu-configure-args="--enable-virtfs"
> 

Yes, in theory you can -- with VirtIO transport. But I'm not sure if
Virtio has been fixed to work with Xen.  That also means you need QEMU
emulation, which we don't really need (or want) when running in PV or
PVH mode.


Wei.


> Thanks,
> Bob
> 
> > http://xendevsummit2015.sched.org/event/3WDg/xen-containers-better-way-to-run-docker-containers-sainath-grandhi-intel?iframe=no&w=&sidebar=yes&bg=no
> > http://xendevsummit2015.sched.org/event/3X1L/hyper-make-vm-run-like-containers-xu-wang-hyper?iframe=no&w=&sidebar=yes&bg=no
> > 
> > Wei.
> > 

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

* Re: [RFC] VirtFS support on Xen
  2016-01-22 10:50       ` Wei Liu
@ 2016-01-22 11:12         ` Paul Durrant
  2016-01-22 11:31           ` Wei Liu
  2016-01-23  5:33         ` Bob Liu
  1 sibling, 1 reply; 13+ messages in thread
From: Paul Durrant @ 2016-01-22 11:12 UTC (permalink / raw)
  To: Bob Liu; +Cc: Xen-devel, Wei Liu, David Vrabel

> -----Original Message-----
> From: xen-devel-bounces@lists.xen.org [mailto:xen-devel-
> bounces@lists.xen.org] On Behalf Of Wei Liu
> Sent: 22 January 2016 10:51
> To: Bob Liu
> Cc: Xen-devel; Wei Liu; David Vrabel
> Subject: Re: [Xen-devel] [RFC] VirtFS support on Xen
> 
> On Fri, Jan 22, 2016 at 06:45:30PM +0800, Bob Liu wrote:
> > Hi Wei,
> >
> > On 01/21/2016 06:59 PM, Wei Liu wrote:
> > > On Thu, Jan 21, 2016 at 10:50:08AM +0000, David Vrabel wrote:
> > >> On 21/01/16 10:28, Wei Liu wrote:
> > >>> [RFC] VirtFS support on Xen
> > >>>
> > >>> # Introduction
> > >>>
> > >>> QEMU/KVM supports file system passthrough via an interface called
> > >>> VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol [1] and
> > >>> VirtIO transport.
> > >>>
> > >>> Xen used to have its own implementation of file system passthrough
> > >>> called XenFS, but that has been inactive for a few years. The latest
> > >>> update was in 2009 [2].
> > >>>
> > >>> This project aims to add VirtFS support on Xen. This is more
> > >>> sustainable than inventing our own wheel.#
> > >>
> > >> What's the use case for this?  Who wants this feature?
> > >>
> > >
> > > Anyone who wants file system passthrough.  More specifically, VM-
> based
> > > container solutions can share files from host file system.
> > >
> >
> > I'm a bit confused, can't we just use the VirtFS of Qemu?
> > E.g
> > ./configure --with-extra-qemuu-configure-args="--enable-virtfs"
> >
> 
> Yes, in theory you can -- with VirtIO transport. But I'm not sure if
> Virtio has been fixed to work with Xen.  That also means you need QEMU
> emulation, which we don't really need (or want) when running in PV or
> PVH mode.
> 

Is there not scope for:

a) Fixing VirtIO so it does work with Xen?
b) Resurrecting the idea of emulator disaggregation so that we could spawn a QEMU that only serves as a VirtIO backend so that this can be used for PV/PHV guests?

Seems like a better solution that implementing our own 9p transport and backend.

  Paul

> 
> Wei.
> 
> 
> > Thanks,
> > Bob
> >
> > > http://xendevsummit2015.sched.org/event/3WDg/xen-containers-
> better-way-to-run-docker-containers-sainath-grandhi-
> intel?iframe=no&w=&sidebar=yes&bg=no
> > > http://xendevsummit2015.sched.org/event/3X1L/hyper-make-vm-run-
> like-containers-xu-wang-hyper?iframe=no&w=&sidebar=yes&bg=no
> > >
> > > Wei.
> > >
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

* Re: [RFC] VirtFS support on Xen
  2016-01-22 11:12         ` Paul Durrant
@ 2016-01-22 11:31           ` Wei Liu
  0 siblings, 0 replies; 13+ messages in thread
From: Wei Liu @ 2016-01-22 11:31 UTC (permalink / raw)
  To: Paul Durrant; +Cc: Xen-devel, Wei Liu, David Vrabel

On Fri, Jan 22, 2016 at 11:12:01AM +0000, Paul Durrant wrote:
> > -----Original Message-----
> > From: xen-devel-bounces@lists.xen.org [mailto:xen-devel-
> > bounces@lists.xen.org] On Behalf Of Wei Liu
> > Sent: 22 January 2016 10:51
> > To: Bob Liu
> > Cc: Xen-devel; Wei Liu; David Vrabel
> > Subject: Re: [Xen-devel] [RFC] VirtFS support on Xen
> > 
> > On Fri, Jan 22, 2016 at 06:45:30PM +0800, Bob Liu wrote:
> > > Hi Wei,
> > >
> > > On 01/21/2016 06:59 PM, Wei Liu wrote:
> > > > On Thu, Jan 21, 2016 at 10:50:08AM +0000, David Vrabel wrote:
> > > >> On 21/01/16 10:28, Wei Liu wrote:
> > > >>> [RFC] VirtFS support on Xen
> > > >>>
> > > >>> # Introduction
> > > >>>
> > > >>> QEMU/KVM supports file system passthrough via an interface called
> > > >>> VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol [1] and
> > > >>> VirtIO transport.
> > > >>>
> > > >>> Xen used to have its own implementation of file system passthrough
> > > >>> called XenFS, but that has been inactive for a few years. The latest
> > > >>> update was in 2009 [2].
> > > >>>
> > > >>> This project aims to add VirtFS support on Xen. This is more
> > > >>> sustainable than inventing our own wheel.#
> > > >>
> > > >> What's the use case for this?  Who wants this feature?
> > > >>
> > > >
> > > > Anyone who wants file system passthrough.  More specifically, VM-
> > based
> > > > container solutions can share files from host file system.
> > > >
> > >
> > > I'm a bit confused, can't we just use the VirtFS of Qemu?
> > > E.g
> > > ./configure --with-extra-qemuu-configure-args="--enable-virtfs"
> > >
> > 
> > Yes, in theory you can -- with VirtIO transport. But I'm not sure if
> > Virtio has been fixed to work with Xen.  That also means you need QEMU
> > emulation, which we don't really need (or want) when running in PV or
> > PVH mode.
> > 
> 
> Is there not scope for:
> 
> a) Fixing VirtIO so it does work with Xen?

Presumably you mean fixing VirtIO to work with Xen HVM guest.  Yes.
Stefano sent patches for fixing that. That involves changing some
assumptions in Virtio design. Not sure how it goes at the moment. As far
as I can tell those patches are not yet upstreamed or have been
superseded by some other patches promised to be written by someone else.

> b) Resurrecting the idea of emulator disaggregation so that we could
> spawn a QEMU that only serves as a VirtIO backend so that this can be
> used for PV/PHV guests?
> 

I think disaggregation of emulators is a different and orthogonal issue.
(There is on-going work to spawn two QEMU for HVM guests, one for PV
backends, one for emulation.)

PV can't use existing Virtio transports because there is no emulation
for PV guest, unless we write Xen transport for Virtio. After
investigation I found it very hard to finish in a finite time frame  and
unsustainable in the long run.

PVH can possibly use VirtIO, but how it is going to be implemented is
unclear.  There are a few things to get hashed out before we can think
of VirtIO with PVH guests.  There is nothing that prevents we make
VirtIO work with PVH in the future though, once everything is in place.

Wei.

> Seems like a better solution that implementing our own 9p transport and backend.
> 
>   Paul
> 
> > 
> > Wei.
> > 
> > 
> > > Thanks,
> > > Bob
> > >
> > > > http://xendevsummit2015.sched.org/event/3WDg/xen-containers-
> > better-way-to-run-docker-containers-sainath-grandhi-
> > intel?iframe=no&w=&sidebar=yes&bg=no
> > > > http://xendevsummit2015.sched.org/event/3X1L/hyper-make-vm-run-
> > like-containers-xu-wang-hyper?iframe=no&w=&sidebar=yes&bg=no
> > > >
> > > > Wei.
> > > >
> > 
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel

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

* Re: [RFC] VirtFS support on Xen
  2016-01-22 10:50       ` Wei Liu
  2016-01-22 11:12         ` Paul Durrant
@ 2016-01-23  5:33         ` Bob Liu
  2016-01-23 14:50           ` Wei Liu
  1 sibling, 1 reply; 13+ messages in thread
From: Bob Liu @ 2016-01-23  5:33 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, David Vrabel


On 01/22/2016 06:50 PM, Wei Liu wrote:
> On Fri, Jan 22, 2016 at 06:45:30PM +0800, Bob Liu wrote:
>> Hi Wei,
>>
>> On 01/21/2016 06:59 PM, Wei Liu wrote:
>>> On Thu, Jan 21, 2016 at 10:50:08AM +0000, David Vrabel wrote:
>>>> On 21/01/16 10:28, Wei Liu wrote:
>>>>> [RFC] VirtFS support on Xen
>>>>>
>>>>> # Introduction
>>>>>
>>>>> QEMU/KVM supports file system passthrough via an interface called
>>>>> VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol [1] and
>>>>> VirtIO transport.
>>>>>
>>>>> Xen used to have its own implementation of file system passthrough
>>>>> called XenFS, but that has been inactive for a few years. The latest
>>>>> update was in 2009 [2].
>>>>>
>>>>> This project aims to add VirtFS support on Xen. This is more
>>>>> sustainable than inventing our own wheel.#
>>>>
>>>> What's the use case for this?  Who wants this feature?
>>>>
>>>
>>> Anyone who wants file system passthrough.  More specifically, VM-based
>>> container solutions can share files from host file system.
>>>
>>
>> I'm a bit confused, can't we just use the VirtFS of Qemu?
>> E.g
>> ./configure --with-extra-qemuu-configure-args="--enable-virtfs"
>>
> 
> Yes, in theory you can -- with VirtIO transport. But I'm not sure if
> Virtio has been fixed to work with Xen.  That also means you need QEMU
> emulation, which we don't really need (or want) when running in PV or
> PVH mode.
> 

Just make sure if I get it right, in the KVM case:
Linux guest(v9fs-client) -> VirtIO transport -> Qemu(v9fs-server) -> Local file system in Host

And your plan is:
DomU(v9fs-client) -> XEN transport:grant map based -> Qemu(v9fs-server) -> Local file system in Dom0

Which means we need to implement a XEN-transport in linux/net/9p/, and also make Qemu can recognize this transport because we need Qemu to run as the v9fs-server anyway?

Bob

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

* Re: [RFC] VirtFS support on Xen
  2016-01-23  5:33         ` Bob Liu
@ 2016-01-23 14:50           ` Wei Liu
  2016-01-23 15:35             ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2016-01-23 14:50 UTC (permalink / raw)
  To: Bob Liu; +Cc: Xen-devel, Wei Liu, David Vrabel

On Sat, Jan 23, 2016 at 01:33:40PM +0800, Bob Liu wrote:
> 
> On 01/22/2016 06:50 PM, Wei Liu wrote:
> > On Fri, Jan 22, 2016 at 06:45:30PM +0800, Bob Liu wrote:
> >> Hi Wei,
> >>
> >> On 01/21/2016 06:59 PM, Wei Liu wrote:
> >>> On Thu, Jan 21, 2016 at 10:50:08AM +0000, David Vrabel wrote:
> >>>> On 21/01/16 10:28, Wei Liu wrote:
> >>>>> [RFC] VirtFS support on Xen
> >>>>>
> >>>>> # Introduction
> >>>>>
> >>>>> QEMU/KVM supports file system passthrough via an interface called
> >>>>> VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol [1] and
> >>>>> VirtIO transport.
> >>>>>
> >>>>> Xen used to have its own implementation of file system passthrough
> >>>>> called XenFS, but that has been inactive for a few years. The latest
> >>>>> update was in 2009 [2].
> >>>>>
> >>>>> This project aims to add VirtFS support on Xen. This is more
> >>>>> sustainable than inventing our own wheel.#
> >>>>
> >>>> What's the use case for this?  Who wants this feature?
> >>>>
> >>>
> >>> Anyone who wants file system passthrough.  More specifically, VM-based
> >>> container solutions can share files from host file system.
> >>>
> >>
> >> I'm a bit confused, can't we just use the VirtFS of Qemu?
> >> E.g
> >> ./configure --with-extra-qemuu-configure-args="--enable-virtfs"
> >>
> > 
> > Yes, in theory you can -- with VirtIO transport. But I'm not sure if
> > Virtio has been fixed to work with Xen.  That also means you need QEMU
> > emulation, which we don't really need (or want) when running in PV or
> > PVH mode.
> > 
> 
> Just make sure if I get it right, in the KVM case:
> Linux guest(v9fs-client) -> VirtIO transport -> Qemu(v9fs-server) -> Local file system in Host
> 
> And your plan is:
> DomU(v9fs-client) -> XEN transport:grant map based -> Qemu(v9fs-server) -> Local file system in Dom0
> 

Yes. Your understanding is correct.

> Which means we need to implement a XEN-transport in linux/net/9p/, and also make Qemu can recognize this transport because we need Qemu to run as the v9fs-server anyway?
> 

Yes. There will be code in both QEMU and Linux kernel.

Wei.

> Bob

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

* Re: [RFC] VirtFS support on Xen
  2016-01-23 14:50           ` Wei Liu
@ 2016-01-23 15:35             ` Konrad Rzeszutek Wilk
  2016-01-25 11:29               ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-01-23 15:35 UTC (permalink / raw)
  To: Wei Liu, Bob Liu; +Cc: Xen-devel, David Vrabel

On January 23, 2016 9:50:30 AM EST, Wei Liu <wei.liu2@citrix.com> wrote:
>On Sat, Jan 23, 2016 at 01:33:40PM +0800, Bob Liu wrote:
>> 
>> On 01/22/2016 06:50 PM, Wei Liu wrote:
>> > On Fri, Jan 22, 2016 at 06:45:30PM +0800, Bob Liu wrote:
>> >> Hi Wei,
>> >>
>> >> On 01/21/2016 06:59 PM, Wei Liu wrote:
>> >>> On Thu, Jan 21, 2016 at 10:50:08AM +0000, David Vrabel wrote:
>> >>>> On 21/01/16 10:28, Wei Liu wrote:
>> >>>>> [RFC] VirtFS support on Xen
>> >>>>>
>> >>>>> # Introduction
>> >>>>>
>> >>>>> QEMU/KVM supports file system passthrough via an interface
>called
>> >>>>> VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol
>[1] and
>> >>>>> VirtIO transport.
>> >>>>>
>> >>>>> Xen used to have its own implementation of file system
>passthrough
>> >>>>> called XenFS, but that has been inactive for a few years. The
>latest
>> >>>>> update was in 2009 [2].
>> >>>>>
>> >>>>> This project aims to add VirtFS support on Xen. This is more
>> >>>>> sustainable than inventing our own wheel.#
>> >>>>
>> >>>> What's the use case for this?  Who wants this feature?
>> >>>>
>> >>>
>> >>> Anyone who wants file system passthrough.  More specifically,
>VM-based
>> >>> container solutions can share files from host file system.
>> >>>
>> >>
>> >> I'm a bit confused, can't we just use the VirtFS of Qemu?
>> >> E.g
>> >> ./configure --with-extra-qemuu-configure-args="--enable-virtfs"
>> >>
>> > 
>> > Yes, in theory you can -- with VirtIO transport. But I'm not sure
>if
>> > Virtio has been fixed to work with Xen.  That also means you need
>QEMU
>> > emulation, which we don't really need (or want) when running in PV
>or
>> > PVH mode.
>> > 
>> 
>> Just make sure if I get it right, in the KVM case:
>> Linux guest(v9fs-client) -> VirtIO transport -> Qemu(v9fs-server) ->
>Local file system in Host
>> 
>> And your plan is:
>> DomU(v9fs-client) -> XEN transport:grant map based ->
>Qemu(v9fs-server) -> Local file system in Dom0
>> 
>
>Yes. Your understanding is correct.
>
>> Which means we need to implement a XEN-transport in linux/net/9p/,
>and also make Qemu can recognize this transport because we need Qemu to
>run as the v9fs-server anyway?
>> 
>
>Yes. There will be code in both QEMU and Linux kernel.
>

Why not just make the VirtIO MMIO implementation work with Xen? That would give you what you need right?

>Wei.
>
>> Bob
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xen.org
>http://lists.xen.org/xen-devel

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

* Re: [RFC] VirtFS support on Xen
  2016-01-23 15:35             ` Konrad Rzeszutek Wilk
@ 2016-01-25 11:29               ` Wei Liu
  2016-01-25 11:35                 ` David Vrabel
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2016-01-25 11:29 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: Xen-devel, Wei Liu, David Vrabel

On Sat, Jan 23, 2016 at 10:35:44AM -0500, Konrad Rzeszutek Wilk wrote:
> On January 23, 2016 9:50:30 AM EST, Wei Liu <wei.liu2@citrix.com> wrote:
> >On Sat, Jan 23, 2016 at 01:33:40PM +0800, Bob Liu wrote:
> >> 
> >> On 01/22/2016 06:50 PM, Wei Liu wrote:
> >> > On Fri, Jan 22, 2016 at 06:45:30PM +0800, Bob Liu wrote:
> >> >> Hi Wei,
> >> >>
> >> >> On 01/21/2016 06:59 PM, Wei Liu wrote:
> >> >>> On Thu, Jan 21, 2016 at 10:50:08AM +0000, David Vrabel wrote:
> >> >>>> On 21/01/16 10:28, Wei Liu wrote:
> >> >>>>> [RFC] VirtFS support on Xen
> >> >>>>>
> >> >>>>> # Introduction
> >> >>>>>
> >> >>>>> QEMU/KVM supports file system passthrough via an interface
> >called
> >> >>>>> VirtFS [0]. VirtFS is in turn implemented with 9pfs protocol
> >[1] and
> >> >>>>> VirtIO transport.
> >> >>>>>
> >> >>>>> Xen used to have its own implementation of file system
> >passthrough
> >> >>>>> called XenFS, but that has been inactive for a few years. The
> >latest
> >> >>>>> update was in 2009 [2].
> >> >>>>>
> >> >>>>> This project aims to add VirtFS support on Xen. This is more
> >> >>>>> sustainable than inventing our own wheel.#
> >> >>>>
> >> >>>> What's the use case for this?  Who wants this feature?
> >> >>>>
> >> >>>
> >> >>> Anyone who wants file system passthrough.  More specifically,
> >VM-based
> >> >>> container solutions can share files from host file system.
> >> >>>
> >> >>
> >> >> I'm a bit confused, can't we just use the VirtFS of Qemu?
> >> >> E.g
> >> >> ./configure --with-extra-qemuu-configure-args="--enable-virtfs"
> >> >>
> >> > 
> >> > Yes, in theory you can -- with VirtIO transport. But I'm not sure
> >if
> >> > Virtio has been fixed to work with Xen.  That also means you need
> >QEMU
> >> > emulation, which we don't really need (or want) when running in PV
> >or
> >> > PVH mode.
> >> > 
> >> 
> >> Just make sure if I get it right, in the KVM case:
> >> Linux guest(v9fs-client) -> VirtIO transport -> Qemu(v9fs-server) ->
> >Local file system in Host
> >> 
> >> And your plan is:
> >> DomU(v9fs-client) -> XEN transport:grant map based ->
> >Qemu(v9fs-server) -> Local file system in Dom0
> >> 
> >
> >Yes. Your understanding is correct.
> >
> >> Which means we need to implement a XEN-transport in linux/net/9p/,
> >and also make Qemu can recognize this transport because we need Qemu to
> >run as the v9fs-server anyway?
> >> 
> >
> >Yes. There will be code in both QEMU and Linux kernel.
> >
> 
> Why not just make the VirtIO MMIO implementation work with Xen? That would give you what you need right?
> 

That goes back to the old topic of how to make VirtIO work on Xen (PV in
particular). It's not easy task by any means.

Wei.

> >Wei.
> >
> >> Bob
> >
> >_______________________________________________
> >Xen-devel mailing list
> >Xen-devel@lists.xen.org
> >http://lists.xen.org/xen-devel
> 
> 

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

* Re: [RFC] VirtFS support on Xen
  2016-01-25 11:29               ` Wei Liu
@ 2016-01-25 11:35                 ` David Vrabel
  2016-01-25 15:13                   ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: David Vrabel @ 2016-01-25 11:35 UTC (permalink / raw)
  To: Wei Liu, Konrad Rzeszutek Wilk; +Cc: Xen-devel, David Vrabel

On 25/01/16 11:29, Wei Liu wrote:
> 
> That goes back to the old topic of how to make VirtIO work on Xen (PV in
> particular). It's not easy task by any means.

This is a (very) useful thing to solve anyway so why not go down this
route?  Particularly, since the latest discussion had reached a
conclusion about how to do this (white-listing virtio devices that need
to use the DMA API, if I remember correctly).

David

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

* Re: [RFC] VirtFS support on Xen
  2016-01-25 11:35                 ` David Vrabel
@ 2016-01-25 15:13                   ` Wei Liu
  0 siblings, 0 replies; 13+ messages in thread
From: Wei Liu @ 2016-01-25 15:13 UTC (permalink / raw)
  To: David Vrabel; +Cc: Xen-devel, Wei Liu

On Mon, Jan 25, 2016 at 11:35:42AM +0000, David Vrabel wrote:
> On 25/01/16 11:29, Wei Liu wrote:
> > 
> > That goes back to the old topic of how to make VirtIO work on Xen (PV in
> > particular). It's not easy task by any means.
> 
> This is a (very) useful thing to solve anyway so why not go down this
> route?  Particularly, since the latest discussion had reached a
> conclusion about how to do this (white-listing virtio devices that need
> to use the DMA API, if I remember correctly).
> 

I thought about that before.

The changes made by Andy  doesn't make VirtIO work for PV guest
automatically.  To make it work for PV guest, we either need to make
virtio-mmio / virtio-pci work for PV guests (is there a way to register
QEMU as emulator for PV guests?) or develop virtio-xen transport for
VirtIO. (I think virtio-xen makes more sense fwiw)

Then inevitably we will get hit by questions with performance issues like
[0]  once we open the flood gate to allow all virtio devices to be used
on Xen and claim it is "supported".

If there is no clear plan to make VirtIO on Xen functional and
performant by default I'm afraid it's not a good way forward at the
moment.

Wei.

[0] <56701113.1080107@sinte.net>

> David

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

end of thread, other threads:[~2016-01-25 15:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-21 10:28 [RFC] VirtFS support on Xen Wei Liu
2016-01-21 10:50 ` David Vrabel
2016-01-21 10:59   ` Wei Liu
2016-01-22 10:45     ` Bob Liu
2016-01-22 10:50       ` Wei Liu
2016-01-22 11:12         ` Paul Durrant
2016-01-22 11:31           ` Wei Liu
2016-01-23  5:33         ` Bob Liu
2016-01-23 14:50           ` Wei Liu
2016-01-23 15:35             ` Konrad Rzeszutek Wilk
2016-01-25 11:29               ` Wei Liu
2016-01-25 11:35                 ` David Vrabel
2016-01-25 15:13                   ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.