xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/8] libxl, xl, public/io: PV backends feature control
@ 2017-11-02 18:06 Joao Martins
  2017-11-02 18:06 ` [PATCH RFC 1/8] public/io/blkif: add directory for backend parameters Joao Martins
                   ` (8 more replies)
  0 siblings, 9 replies; 28+ messages in thread
From: Joao Martins @ 2017-11-02 18:06 UTC (permalink / raw)
  To: Xen Development List
  Cc: Juergen Gross, Wei Liu, Konrad Rzeszutek Wilk, Ian Jackson,
	Paul Durrant, Joao Martins, Roger Pau Monne

Hey folks,

Presented herewith is an attempt to implement PV backends feature control
as discussed in the list (https://lists.xen.org/archives/html/xen-devel/2017-09/msg00766.html)

Given that this a simple proposal hence I thought to include all changes
involved in the same patchset such that everyone see all the changes and has a
better estimate (but restricted to xen-devel just for the RFC purposes).

The motivation here is to allow system administrators more fine grained
control of the device features being used by guest.

The only change I made compared to the proposed discussed above was to use
"require" instead of "request" as the prefix because there is a feature which
has "request" in it. But if "request" is still preferred as a prefix I can change
it up.

The scheme proposed is quite simple:

* The directory "require" is created (inside the backend path) and within that
directory the features/capabilities names and values are written.

* Toolstack constructs a key value store of features, and user specifies those
through special entry names prefixed also as "require". Toolstack is stateless thus sys
admin has full control over what to pass to the backend. In other words it
doesn't look at particular feature names/values.

* The backend will then use that for seeding its maximum feature set to the
frontend.

An example would be a domain config to look like this:

vif = ["bridge=br0,require-multi-queue-max-queues=2"]
disk = [ "phy:/path/to/disk,hda,w,require-feature-persistent=0" ]

And if backend supports it, it would create a vif with a maximum of 2 queues,
and a vbd with persistent grants disabled.

I only implemented for blkback and netback but there is nothing really specific
to how it's done and could possibly be implemented in other PV interfaces. But
there wasn't a protocol agnostic file to put all this, so I went ahead and did
for the two individual io types (block and netif) I am most interested in.

Any comments appreciated :)

Thanks!
Joao

For Linux the diffstat/changeset is: (the last two patches)

Joao Martins (2):
  xen-blkback: frontend feature control
  xen-netback: frontend feature control

 drivers/block/xen-blkback/blkback.c |   2 +-
 drivers/block/xen-blkback/common.h  |   1 +
 drivers/block/xen-blkback/xenbus.c  |  66 ++++++++++++++++---
 drivers/net/xen-netback/xenbus.c    | 122 +++++++++++++++++++++++++++++-------
 4 files changed, 159 insertions(+), 32 deletions(-)

And for Xen the diffstat/changeset is:

Joao Martins (6):
  public/io/blkif: add directory for backend parameters
  public/io/netif: add directory for backend parameters
  libxl: add backend_features to libxl_device_disk
  libxl: add backend_features to libxl_device_nic
  libxlu: parse disk backend features parameters
  xl: parse vif backend features parameters

 tools/libxl/libxl.h           | 16 +++++++++++++++
 tools/libxl/libxl_9pfs.c      |  2 +-
 tools/libxl/libxl_console.c   |  7 ++++---
 tools/libxl/libxl_device.c    | 47 +++++++++++++++++++++++++++++++++++--------
 tools/libxl/libxl_disk.c      | 17 ++++++++++++++--
 tools/libxl/libxl_internal.h  |  6 ++++--
 tools/libxl/libxl_nic.c       | 13 +++++++++++-
 tools/libxl/libxl_pci.c       |  2 +-
 tools/libxl/libxl_types.idl   |  2 ++
 tools/libxl/libxl_usb.c       |  2 +-
 tools/libxl/libxl_vdispl.c    |  3 ++-
 tools/libxl/libxl_vtpm.c      |  2 +-
 tools/libxl/libxlu_disk_l.l   | 42 ++++++++++++++++++++++++++++++++++++++
 tools/xl/xl_parse.c           | 37 ++++++++++++++++++++++++++++++++++
 tools/xl/xl_parse.h           |  2 ++
 xen/include/public/io/blkif.h | 14 +++++++++++++
 xen/include/public/io/netif.h | 16 +++++++++++++++
 17 files changed, 209 insertions(+), 21 deletions(-)

-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2018-02-13 11:33 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-02 18:06 [PATCH RFC 0/8] libxl, xl, public/io: PV backends feature control Joao Martins
2017-11-02 18:06 ` [PATCH RFC 1/8] public/io/blkif: add directory for backend parameters Joao Martins
2018-02-07 11:36   ` Roger Pau Monné
2017-11-02 18:06 ` [PATCH RFC 2/8] public/io/netif: " Joao Martins
2017-11-06 10:33   ` Paul Durrant
2017-11-06 12:33     ` Joao Martins
2018-02-06 17:12       ` Wei Liu
2018-02-07 12:10         ` Joao Martins
2018-02-08 11:13           ` Wei Liu
2018-02-08 13:51             ` Joao Martins
2018-02-13 11:33               ` Wei Liu
2017-11-02 18:06 ` [PATCH RFC 3/8] libxl: add backend_features to libxl_device_disk Joao Martins
2017-11-07 11:28   ` Oleksandr Grytsov
2017-11-07 11:48     ` Joao Martins
2017-11-02 18:06 ` [PATCH RFC 4/8] libxl: add backend_features to libxl_device_nic Joao Martins
2017-11-02 18:06 ` [PATCH RFC 5/8] libxlu: parse disk backend features parameters Joao Martins
2017-11-02 18:06 ` [PATCH RFC 6/8] xl: parse vif " Joao Martins
2017-11-02 18:06 ` [PATCH RFC 7/8] xen-blkback: frontend feature control Joao Martins
2018-02-07 12:08   ` Roger Pau Monné
2018-02-07 14:16     ` Joao Martins
2018-02-07 14:24       ` Roger Pau Monné
2017-11-02 18:06 ` [PATCH RFC 8/8] xen-netback: " Joao Martins
2018-02-07 11:16 ` [PATCH RFC 0/8] libxl, xl, public/io: PV backends " Roger Pau Monné
2018-02-07 11:20   ` Juergen Gross
2018-02-07 11:30     ` Roger Pau Monné
2018-02-07 11:36       ` Joao Martins
2018-02-07 11:44       ` Joao Martins
2018-02-07 12:03   ` Joao Martins

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