From nobody Fri Nov 29 03:42:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1652476081; cv=none; d=zohomail.com; s=zohoarc; b=RcxgBtaXpCol2FIcKJypCwaTFKjU6WLJS9K1zH934+TGerEQKRbrd5j9EDs+qzmzlOloIyaIl8UzL60SWd1KaniX4XtdunFKjvHvHHm/+CqOdp8toTLnQCuhHvn34FfE7Nq+MLaZwMYDW/CYQbsuCY3ZoRR+RA4LRfF6wmEQGGM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652476081; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/MwLsrlDiagGh7PF1fn06Ad0/6QHWavz/cA28kQNXZ8=; b=H7siI+9oXRNV0SSCQEANlghg1dEFtaldWLXTJzEsqpcAOpknjlQ09PKAFs9LocaYIaD64dhGBe0MVs1ev0u37c4W2K2ru7e6ri7zGdgBb9JCMS59Lb41YHHZc7p9SiUVR21DjlbgJEW7/d6to4aAnLgAXJlUgR3MXDyU+q/Ud2o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1652476081775231.79332200184342; Fri, 13 May 2022 14:08:01 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.328785.551975 (Exim 4.92) (envelope-from ) id 1npcVj-0006GN-Du; Fri, 13 May 2022 21:07:43 +0000 Received: by outflank-mailman (output) from mailman id 328785.551975; Fri, 13 May 2022 21:07:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1npcVj-0006Ey-4A; Fri, 13 May 2022 21:07:43 +0000 Received: by outflank-mailman (input) for mailman id 328785; Fri, 13 May 2022 21:07:41 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1npcVh-0004iU-6e for xen-devel@lists.xenproject.org; Fri, 13 May 2022 21:07:41 +0000 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b7a56bbe-d300-11ec-b8b8-f95467ff1ed0; Fri, 13 May 2022 23:07:37 +0200 (CEST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6BE4CB831E3; Fri, 13 May 2022 21:07:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C332BC34114; Fri, 13 May 2022 21:07:35 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b7a56bbe-d300-11ec-b8b8-f95467ff1ed0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652476056; bh=vBoz7dmTWhlc7PPw4Rw0ri1k93jgoLdc1Q6ZpNpIcJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UaoUy68K5A3ytuyZMpEiPm5yV1Q8+4dPhgymDyOtga9Ou6ALz1CPdTkRStQ0rkvBb WkkTLNDrmPbdhO6WC8rYsgvNb9LZTq6A/2X7dHOKksVzPfktSawTJ50ADW0lelRjtG KgEjW8Db+ZvQw45bX+yPaPqbXqd3quWtibbpdeQ3zcFmgHO1OTBFv5qFu83nuINfGv zpfmDO03XvdmpbxM3It5/e4z3PiMwbc8AxlD/PjWaO0qruJrh5O1f87wNIpDsQOzYC 7rXhEwcGib5zYR5RZy64RxQ+kfs99AIwJRjUFtM4jvN/vx+rxPHjUmdn+RUE7kHYKv v5gjNZNkCGB6A== From: Stefano Stabellini 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 , Luca Fancellu , Julien Grall Subject: [PATCH v7 7/7] docs: document dom0less + PV drivers Date: Fri, 13 May 2022 14:07:30 -0700 Message-Id: <20220513210730.679871-7-sstabellini@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1652476083962100006 Content-Type: text/plain; charset="utf-8" From: Stefano Stabellini Document how to use the feature and how the implementation works. Signed-off-by: Stefano Stabellini Reviewed-by: Luca Fancellu Acked-by: Julien Grall --- docs/features/dom0less.pandoc | 43 ++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) --- 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). =20 See docs/misc/arm/device-tree/booting.txt for more information. =20 +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 ----------- =20 @@ -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. =20 -- 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. --=20 2.25.1