All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: xen-devel@lists.xenproject.org
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wei.liu2@citrix.com>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"George Dunlap" <George.Dunlap@eu.citrix.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>,
	"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
	"Tim Deegan" <tim@xen.org>, "Julien Grall" <julien.grall@arm.com>,
	"Jan Beulich" <jbeulich@suse.com>
Subject: [PATCH v3 02/17] Document ioemu Linux stubdomain protocol
Date: Mon, 28 Jan 2019 22:30:19 +0100	[thread overview]
Message-ID: <27fbf2868a07046d4287a35d2b93483ae4a1f6dd.1548710973.git-series.marmarek@invisiblethingslab.com> (raw)
In-Reply-To: <cover.8f900c4839866ee551e8ebf221cfc7b9310cecd6.1548710973.git-series.marmarek@invisiblethingslab.com>
In-Reply-To: <cover.8f900c4839866ee551e8ebf221cfc7b9310cecd6.1548710973.git-series.marmarek@invisiblethingslab.com>

Add documentation for upcoming Linux stubdomain for qemu-upstream.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 docs/misc/stubdom.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 50 insertions(+)

diff --git a/docs/misc/stubdom.txt b/docs/misc/stubdom.txt
index 4c524f2..9c94c6b 100644
--- a/docs/misc/stubdom.txt
+++ b/docs/misc/stubdom.txt
@@ -75,6 +75,56 @@ Defined commands:
    - "running" - success
 
 
+Toolstack to Linux ioemu stubdomain protocol
+--------------------------------------------
+
+This section describe communication protocol between toolstack and
+qemu-upstream running in Linux stubdomain. The protocol include
+expectations of both stubdomain, and qemu.
+
+Setup (done by toolstack, expected by stubdomain):
+ - Block devices for target domain are connected as PV disks to stubdomain,
+   according to configuration order, starting with xvda
+ - Network devices for target domain are connected as PV nics to stubdomain,
+   according to configuration order, starting with 0
+ - [not implemented] if graphics output is expected, VFB and VKB devices are set for stubdomain
+   (its backend is responsible for exposing them using appropriate protocol
+   like VNC or Spice)
+ - other target domain's devices are not connected at this point to stubdomain
+   (may be hot-plugged later)
+ - QEMU command line is stored in
+   /vm/<target-uuid>/image/dmargs xenstore dir, each argument as separate key
+   in form /vm/<target-uuid>/image/dmargs/NNN, where NNN is 0-padded argument
+   number
+ - target domain id is stored in /local/domain/<stubdom-id>/target xenstore path
+?? - bios type is stored in /local/domain/<target-id>/hvmloader/bios
+ - stubdomain's console 0 is connected to qemu log file
+ - stubdomain's console 1 is connected to qemu save file (for saving state)
+ - stubdomain's console 2 is connected to qemu save file (for restoring state)
+ - next consoles are connected according to target guest's serial console configuration
+
+Environment exposed by stubdomain to qemu (needed to construct appropriate qemu command line and later interact with qmp):
+ - target domain's disks are available as /dev/xvd[a-z]
+ - console 2 (incoming domain state) is connected with FD 3
+ - console 1 (saving domain state) is added over QMP to qemu as "fdset-id 1" (done by stubdomain, toolstack doesn't need to care about it)
+ - nics are connected to relevant stubdomain PV vifs when available (qemu -netdev should specify ifname= explicitly)
+
+Startup:
+1. toolstack starts PV stubdomain with stubdom-linux-kernel kernel and stubdom-linux-initrd initrd
+2. stubdomain initialize relevant devices
+3. stubdomain starts qemu with requested command line, plus few stubdomain specific ones - including local qmp access options
+4. stubdomain starts vchan server on /local/domain/<stubdom-id>/device-model/<target-id>/qmp-vchan, exposing qmp socket to the toolstack
+5. qemu signal readiness by writing "running" to /local/domain/<stubdom-id>/device-model/<target-id>/state xenstore path
+6. now device model is considered running
+
+QEMU can be controlled using QMP over vchan at /local/domain/<stubdom-id>/device-model/<target-id>/qmp-vchan. Only one simultaneous connection is supported and toolstack needs to ensure that.
+
+Limitations:
+ - PCI passthrough require permissive mode
+ - only one nic is supported
+ - at most 26 emulated disks are supported (more are still available as PV disks)
+ - graphics output (VNC/SDL/Spice) not supported
+
 
                                    PV-GRUB
                                    =======
-- 
git-series 0.9.1

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

  parent reply	other threads:[~2019-01-28 21:30 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28 21:30 [PATCH v3 00/17] Add support for qemu-xen runnning in a Linux-based stubdomain Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 01/17] Document ioemu MiniOS stubdomain protocol Marek Marczykowski-Górecki
2019-02-12 10:52   ` Wei Liu
2019-01-28 21:30 ` Marek Marczykowski-Górecki [this message]
2019-02-21 15:39   ` [PATCH v3 02/17] Document ioemu Linux " Wei Liu
2019-02-21 17:08     ` Marek Marczykowski-Górecki
2019-02-21 17:31       ` Wei Liu
2019-02-21 18:17         ` Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 03/17] libxl: fix qemu-trad cmdline for no sdl/vnc case Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 04/17] libxl: Allow running qemu-xen in stubdomain Marek Marczykowski-Górecki
2019-02-21 16:01   ` Wei Liu
2019-02-21 17:06     ` Marek Marczykowski-Górecki
2019-02-21 17:58       ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 05/17] libxl: Handle Linux stubdomain specific QEMU options Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 06/17] libxl: write qemu arguments into separate xenstore keys Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 07/17] libxl: create vkb device only for guests with graphics output Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 08/17] xl: add stubdomain related options to xl config parser Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 09/17] tools/libvchan: notify server when client is connected Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 10/17] libxl: typo fix in comment Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 11/17] libxl: move xswait declaration up in libxl_internal.h Marek Marczykowski-Górecki
2019-02-21 16:02   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 12/17] libxl: use vchan for QMP access with Linux stubdomain, libxl__ev_qmp_* version Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 13/17] libxl: use vchan for QMP access with Linux stubdomain, non-async version Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 14/17] libxl: add save/restore support for qemu-xen in stubdomain Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 15/17] tools: add missing libxenvchan cflags Marek Marczykowski-Górecki
2019-02-21 16:05   ` Wei Liu
2019-01-28 21:30 ` [PATCH v3 16/17] libxl: add locking for libvchan QMP connection Marek Marczykowski-Górecki
2019-01-28 21:30 ` [PATCH v3 17/17] libxl: require qemu in dom0 even if stubdomain is in use Marek Marczykowski-Górecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=27fbf2868a07046d4287a35d2b93483ae4a1f6dd.1548710973.git-series.marmarek@invisiblethingslab.com \
    --to=marmarek@invisiblethingslab.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.