All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: xen-devel@lists.xenproject.org
Cc: sstabellini@kernel.org, jgross@suse.com,
	Bertrand.Marquis@arm.com, julien@xen.org,
	Volodymyr_Babchuk@epam.com,
	Stefano Stabellini <stefano.stabellini@xilinx.com>,
	Luca Fancellu <luca.fancellu@arm.com>
Subject: [PATCH v6 7/7] docs: document dom0less + PV drivers
Date: Wed,  4 May 2022 17:16:56 -0700	[thread overview]
Message-ID: <20220505001656.395419-7-sstabellini@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2205041715320.43560@ubuntu-linux-20-04-desktop>

From: Stefano Stabellini <stefano.stabellini@xilinx.com>

Document how to use the feature and how the implementation works.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
---
 docs/features/dom0less.pandoc | 43 ++++++++++++++++++++++++++++++++---
 1 file changed, 40 insertions(+), 3 deletions(-)

diff --git a/docs/features/dom0less.pandoc b/docs/features/dom0less.pandoc
index c9edb529e1..725afa0558 100644
--- a/docs/features/dom0less.pandoc
+++ b/docs/features/dom0less.pandoc
@@ -90,6 +90,46 @@ Otherwise, they may be unusable in Xen (for instance if they are compressed).
 
 See docs/misc/arm/device-tree/booting.txt for more information.
 
+PV Drivers
+----------
+
+It is possible to use PV drivers with dom0less guests with some
+restrictions:
+
+- dom0less domUs that want to use PV drivers support should have the
+  "xen,enhanced" property set under their device tree nodes (see
+  docs/misc/arm/device-tree/booting.txt)
+- a dom0 must be present (or another domain with enough privileges to
+  run the toolstack)
+- after dom0 is booted, the utility "init-dom0less" must be run
+- do not run "init-dom0less" while creating other guests with xl
+
+After the execution of init-dom0less, it is possible to use "xl" to
+hotplug PV drivers to dom0less guests. E.g. xl network-attach domU.
+
+The implementation works as follows:
+- Xen allocates the xenstore event channel for each dom0less domU that
+  has the "xen,enhanced" property, and sets HVM_PARAM_STORE_EVTCHN
+- Xen does *not* allocate the xenstore page and sets HVM_PARAM_STORE_PFN
+  to ~0ULL (invalid)
+- Dom0less domU kernels check that HVM_PARAM_STORE_PFN is set to invalid
+    - Old kernels will continue without xenstore support (Note: some old
+      buggy kernels might crash because they don't check the validity of
+      HVM_PARAM_STORE_PFN before using it! Disable "xen,enhanced" in
+      those cases)
+    - New kernels will wait for a notification on the xenstore event
+      channel (HVM_PARAM_STORE_EVTCHN) before continuing with the
+      initialization
+- Once dom0 is booted, init-dom0less is executed:
+    - it allocates the xenstore shared page and sets HVM_PARAM_STORE_PFN
+    - it calls xs_introduce_domain
+- Xenstored notices the new domain, initializes interfaces as usual, and
+  sends an event channel notification to the domain using the xenstore
+  event channel (HVM_PARAM_STORE_EVTCHN)
+- The Linux domU kernel receives the event channel notification, checks
+  HVM_PARAM_STORE_PFN again and continue with the initialization
+
+
 Limitations
 -----------
 
@@ -107,9 +147,6 @@ limitations:
   information, the GIC version exposed to the domains started by Xen at
   boot is the same as the native GIC version.
 
-- No PV drivers. There is no support for PV devices at the moment. All
-  devices need to be statically assigned to guests.
-
 - Pinning vCPUs of domains started by Xen at boot can be
   done from the control domain, using `xl vcpu-pin` as usual. It is not
   currently possible to configure vCPU pinning without a control domain.
-- 
2.25.1



  parent reply	other threads:[~2022-05-05  0:17 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05  0:16 [PATCH v6 0/7] dom0less PV drivers Stefano Stabellini
2022-05-05  0:16 ` [PATCH v6 1/7] xen/dt: of_property_read_string return -ENODATA when !length Stefano Stabellini
2022-05-05  0:16 ` [PATCH v6 2/7] xen/arm: implement domU extended regions Stefano Stabellini
2022-05-05  9:48   ` Oleksandr
2022-05-11 18:42   ` Julien Grall
2022-05-05  0:16 ` [PATCH v6 3/7] xen: introduce xen,enhanced dom0less property Stefano Stabellini
2022-05-05  0:16 ` [PATCH v6 4/7] xen/arm: configure dom0less domain for enabling xenstore after boot Stefano Stabellini
2022-05-05  7:26   ` Jan Beulich
2022-05-05 20:24     ` Stefano Stabellini
2022-05-10 16:30   ` Rahul Singh
2022-05-10 16:35     ` Julien Grall
2022-05-11  7:46       ` Bertrand Marquis
2022-05-11  8:38         ` Julien Grall
2022-05-11  8:46           ` Bertrand Marquis
2022-05-11  9:10             ` Julien Grall
2022-05-11  9:18               ` Bertrand Marquis
2022-05-11 10:53                 ` Rahul Singh
2022-05-11 13:11                   ` Julien Grall
2022-05-11 14:57                     ` Rahul Singh
2022-05-11 15:05                       ` Rahul Singh
2022-05-11 15:25                         ` Julien Grall
2022-05-13  1:23               ` Stefano Stabellini
2022-05-13  9:24                 ` Julien Grall
2022-05-13 20:52                   ` Stefano Stabellini
2022-05-14 13:06                     ` Julien Grall
2022-05-11 18:52   ` Julien Grall
2022-05-05  0:16 ` [PATCH v6 5/7] xenstored: send an evtchn notification on introduce_domain Stefano Stabellini
2022-05-05  7:30   ` Juergen Gross
2022-05-11 19:00   ` Julien Grall
2022-05-13  1:16     ` Stefano Stabellini
2022-05-13  6:23       ` Juergen Gross
2022-05-13 20:42         ` Stefano Stabellini
2022-05-05  0:16 ` [PATCH v6 6/7] tools: add example application to initialize dom0less PV drivers Stefano Stabellini
2022-05-05  7:47   ` Juergen Gross
2022-05-05 20:24     ` Stefano Stabellini
2022-05-11 19:11   ` Julien Grall
2022-05-13  1:09     ` Stefano Stabellini
2022-05-13  9:34       ` Julien Grall
2022-05-13 20:36         ` Stefano Stabellini
2022-05-05  0:16 ` Stefano Stabellini [this message]
2022-05-11 19:13   ` [PATCH v6 7/7] docs: document dom0less + " Julien Grall

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=20220505001656.395419-7-sstabellini@kernel.org \
    --to=sstabellini@kernel.org \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=luca.fancellu@arm.com \
    --cc=stefano.stabellini@xilinx.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.