Skip to content

RFC QEMU disaggregation in Xen environment

Julien Grall qemu-devel xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest17 patches 49 repliesIn review
  2. v1 RFC15 patches 29 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17hvm: Modify interface to support multiple ioreq serverxen/include/asm-x86/hvm/domain.h xen/include/asm-x86/hvm/vcpu.h xen/include/public/hvm/hvm_op.h +4 more+114 -35 replies
2/17hvm: Add functions to handle ioreq serversxen/arch/x86/hvm/hvm.c+356 -00 replies
3/17hvm-pci: Handle PCI config space in Xenxen/arch/x86/hvm/Makefile xen/arch/x86/hvm/pci_emul.c+169 -02 replies
4/17hvm: Change initialization/destruction of an hvmxen/arch/x86/hvm/hvm.c+10 -230 replies
5/17hvm: Modify hvm_opxen/arch/x86/hvm/hvm.c xen/include/public/hvm/params.h+81 -740 replies
5/17hvm: Modify hvm_opxen/arch/x86/hvm/hvm.c xen/include/public/hvm/params.h+81 -748 replies
6/17hvm-io: IO refactoring with ioreq serverxen/arch/x86/hvm/emulate.c xen/arch/x86/hvm/hvm.c xen/include/asm-x86/hvm/support.h+81 -60 replies
7/17hvm-io: send invalidate map cache to each registered serversxen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/io.c+45 -110 replies
8/17hvm-io: Handle server in buffered IOxen/arch/x86/hvm/io.c+58 -170 replies
9/17xc: Add the hypercall for multiple serverstools/libxc/xc_domain.c tools/libxc/xenctrl.h+176 -02 replies
10/17xc: Add argument to allocate more special pagestools/libxc/xc_hvm_build_x86.c tools/libxc/xenguest.h tools/python/xen/lowlevel/xc/xc.c+36 -300 replies
11/17xc: modify save/restore to support multiple device modelstools/libxc/xc_domain_restore.c tools/libxc/xc_domain_save.c+116 -4010 replies
12/17xl: Add interface to handle qemu disaggregationtools/libxl/libxl.h tools/libxl/libxl_types.idl+18 -08 replies
13/17xl: add device model id to qmp functionstools/libxl/libxl_internal.h tools/libxl/libxl_qmp.c+43 -300 replies
14/17xl-parsing: Parse new device_models optiontools/libxl/Makefile tools/libxl/libxlu_dm.c tools/libxl/libxlutil.h +1 more+130 -24 replies
15/17xl: support spawn/destroy on multiple device modeltools/libxl/libxl.c tools/libxl/libxl_create.c tools/libxl/libxl_device.c +3 more+421 -16110 replies
16/17xl: Fix PCI librarytools/libxl/libxl_pci.c+11 -80 replies
17/17xl: implement save/restore for multiple device modelstools/libxl/libxl.c tools/libxl/libxl_dom.c tools/libxl/libxl_internal.h+130 -340 replies

Reviews trailers per patch

1 of 18 patches has a Reviewed-by or Acked-by.

PatchIan Campbell
1/17
2/17
3/17
4/17
5/17
5/17
6/17
7/17
8/17
9/17A-b A-b
10/17
11/17
12/17
13/17
14/17
15/17
16/17
17/17

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [XEN][RFC PATCH V2 00/17] QEMU disaggregation in Xen environment

Hello,

This patch series only concerns Xen. Another serie will come for QEMU.

I'm currently working on QEMU disaggregation in Xen environment. The goal is to be able to running multiple QEMU for a same domain
(http://lists.xen.org/archives/html/xen-devel/2012-03/msg00299.html).

I have already sent a version of patch series few months ago:
- QEMU: https://lists.gnu.org/archive/html/qemu-devel/2012-03/msg04401.html
- Xen: http://lists.xen.org/archives/html/xen-devel/2012-03/msg01947.html
With the different feedbacks, I have improved both QEMU and Xen modifications. As before, I will sent two patch series, one for QEMU the other for Xen.

Full disaggregation is not possible (one device = one QEMU) because lots of device depends on each others. With the help of Stefano, I have defined as possible disaggregation:
- ui: emulate default devices (root bridge, south bridge), VGA, keyboard, mouse and USB
- audio: emulate audio
- ide: emulate disks
- serial: emulate serial port
- net: it possible to have multiple QEMU that emulates one or more network card

Of course, a same QEMU can emulate both ui and audio. Old configuration file with qemu-xen still works.
The patch series adds an option "device_models".

Example:

builder='hvm'
memory = 1024
name = "Debian"
vcpus=1
vif = [ 'type=ioemu, bridge=eth0, mac=00:16:3e:0e:f5:ef, id=nic1' ] disk = [ 'tap:tapdisk:qcow2:/home/xentest/works/vms/debian.img,xvda,w' ] device_model_override = '/home/xentest/works/qemu-devel/qemu-wrapper' device_model_version = 'qemu-xen'
device_models = [ 'name=qnet,vifs=nic1',

                  'name=qall,ui,ide' ]

It possible to override device model path for each device model. It could be useful for debugging. For instance, 'name=qnet,vifs=nic1,path=/my/path/wrapper'. The option "name" is used for logging filename or debugging, if it's not specify, a number is used.

Modifications between V1 and V2:
- rewrite libxl patch according to the new API
- improve user experience with configuration file (avoid to specify bdf)
- improve PCI hypercall: use bus, domain, device, function instead of bdf.
- fix PCI config space handler
- remove unused HVM paramaters
- handle save/restore

Drawbacks:
- PCI hotplug doesn't works
- stubdomain doesn't works because old QEMU is not modify for disaggregation. By the way it's works on XenClient stubdomain
- Which QEMU need to emulate Xen Platform ? It's mainly used to unplug network cards and disks

Possible improvements:
- Like hvm get parameters, introduce an hypercall to retrieve shared pages. For the moment the server id is used
- Specify if we want buffered I/O shared page or not (It was an idea of Christian Limpach)

I don't test all configurations. Comments, bug reports, ... are welcome.

Julien Grall (17):
hvm: Modify interface to support multiple ioreq server
hvm: Add functions to handle ioreq servers
hvm-pci: Handle PCI config space in Xen
hvm: Change initialization/destruction of an hvm
hvm: Modify hvm_op
hvm-io: IO refactoring with ioreq server
hvm-io: send invalidate map cache to each registered servers
hvm-io: Handle server in buffered IO
xc: Add the hypercall for multiple servers
xc: Add argument to allocate more special pages
xc: modify save/restore to support multiple device models
xl: Add interface to handle qemu disaggregation
xl: add device model id to qmp functions
xl-parsing: Parse new device_models option
xl: support spawn/destroy on multiple device model
xl: Fix PCI library
xl: implement save/restore for multiple device models

 tools/libxc/xc_domain.c           |  155 ++++++++++
 tools/libxc/xc_domain_restore.c   |  150 ++++++++---
 tools/libxc/xc_domain_save.c      |    6 +-
 tools/libxc/xc_hvm_build_x86.c    |   59 ++--
 tools/libxc/xenctrl.h             |   21 ++
 tools/libxc/xenguest.h            |    4 +-
 tools/libxl/Makefile              |    2 +-
 tools/libxl/libxl.c               |   21 +-
 tools/libxl/libxl.h               |    3 +
 tools/libxl/libxl_create.c        |  150 ++++++++---
 tools/libxl/libxl_device.c        |    7 +-
 tools/libxl/libxl_dm.c            |  369 +++++++++++++++++-------
 tools/libxl/libxl_dom.c           |  147 ++++++++--
 tools/libxl/libxl_internal.h      |   76 ++++--
 tools/libxl/libxl_pci.c           |   19 +-
 tools/libxl/libxl_qmp.c           |   49 ++--
 tools/libxl/libxl_types.idl       |   15 +
 tools/libxl/libxlu_dm.c           |   96 +++++++
 tools/libxl/libxlutil.h           |    5 +
 tools/libxl/xl_cmdimpl.c          |   29 ++-
 tools/python/xen/lowlevel/xc/xc.c |    3 +-
 xen/arch/x86/hvm/Makefile         |    1 +
 xen/arch/x86/hvm/emulate.c        |   56 ++++
 xen/arch/x86/hvm/hvm.c            |  567 +++++++++++++++++++++++++++++++------
 xen/arch/x86/hvm/io.c             |   90 +++++--
 xen/arch/x86/hvm/pci_emul.c       |  168 +++++++++++
 xen/include/asm-x86/hvm/domain.h  |   25 ++-
 xen/include/asm-x86/hvm/support.h |   26 ++-
 xen/include/asm-x86/hvm/vcpu.h    |    4 +-
 xen/include/public/hvm/hvm_op.h   |   51 ++++
 xen/include/public/hvm/ioreq.h    |    1 +
 xen/include/public/hvm/params.h   |   11 +-
 xen/include/public/xen.h          |    1 +
 xen/include/xen/hvm/pci_emul.h    |   29 ++
 34 files changed, 1986 insertions(+), 430 deletions(-)
 create mode 100644 tools/libxl/libxlu_dm.c
 create mode 100644 xen/arch/x86/hvm/pci_emul.c
 create mode 100644 xen/include/xen/hvm/pci_emul.h
Signature · 1 line
Julien Grall