From patchwork Sat Jan 8 00:49:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 12707181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2FAE1C43219 for ; Sat, 8 Jan 2022 00:49:44 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.254710.436507 (Exim 4.92) (envelope-from ) id 1n5zv4-0006rC-H9; Sat, 08 Jan 2022 00:49:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 254710.436507; Sat, 08 Jan 2022 00:49:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n5zv4-0006r5-E7; Sat, 08 Jan 2022 00:49:18 +0000 Received: by outflank-mailman (input) for mailman id 254710; Sat, 08 Jan 2022 00:49:17 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n5zv2-0006ZD-Uu for xen-devel@lists.xenproject.org; Sat, 08 Jan 2022 00:49:17 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id cd98067b-701c-11ec-9ce5-af14b9085ebd; Sat, 08 Jan 2022 01:49:16 +0100 (CET) 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 dfw.source.kernel.org (Postfix) with ESMTPS id E47EC62044; Sat, 8 Jan 2022 00:49:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA0A2C36AED; Sat, 8 Jan 2022 00:49:13 +0000 (UTC) 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: cd98067b-701c-11ec-9ce5-af14b9085ebd DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641602954; bh=m/xs8jzbYy0KnjGA4YEq7wqnz5M74arMWbE5OnRY2a8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IqjZ2jB++HvGbybnwDVSteXiREAUHykf8HcStkfcW61SIEzZFfhY+l8iloW2hHbK8 6JlN6lRLPTiY7kjMpXf00cHWAah97cBU7SrZIp9b5ExEwXvlUf5ln4CRQ4XkQ7KEgY Jl0ZnKG5jLUUQAxHMwtv9YGTjeCnhbOJFj73nJ0Fv9y30UlHC7xnZXhBZYFCyX2O5+ jvJl+7dJaVXNKCJwTAVkoMoumCcyJZRTzchP8Fqx0v4e1bwqK7xYRzdBa7gAl+L8To vDNvDydccEbcVXlIv17pelZKuQpkgz3DbN0RisiIx235g1vmIB/HWRcBnfNnrt7rbP d8/KnZceh1+fA== From: Stefano Stabellini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, julien@xen.org, Bertrand.Marquis@arm.com, Luca Miccio , Stefano Stabellini , Volodymyr Babchuk , Bertrand Marquis , Andrew Cooper , Jan Beulich , George Dunlap , Wei Liu Subject: [XEN PATCH 1/7] xen: introduce XENFEAT_xenstore_late_init Date: Fri, 7 Jan 2022 16:49:06 -0800 Message-Id: <20220108004912.3820176-1-sstabellini@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 From: Luca Miccio Introduce a new feature flag to signal that xenstore will not be immediately available at boot time. Instead, xenstore will become available later, and a notification of xenstore readiness will be signalled to the guest using the xenstore event channel. Signed-off-by: Luca Miccio Signed-off-by: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Andrew Cooper CC: Jan Beulich CC: George Dunlap CC: Wei Liu --- xen/arch/arm/include/asm/domain.h | 2 ++ xen/common/kernel.c | 2 ++ xen/include/public/features.h | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/xen/arch/arm/include/asm/domain.h b/xen/arch/arm/include/asm/domain.h index 9b3647587a..e5ae57cd09 100644 --- a/xen/arch/arm/include/asm/domain.h +++ b/xen/arch/arm/include/asm/domain.h @@ -89,6 +89,8 @@ struct arch_domain #ifdef CONFIG_TEE void *tee; #endif + /* Is this guest a dom0less domain? */ + bool is_dom0less; } __cacheline_aligned; struct arch_vcpu diff --git a/xen/common/kernel.c b/xen/common/kernel.c index e119e5401f..c00ea67e5f 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -550,6 +550,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) if ( is_hardware_domain(d) ) fi.submap |= 1U << XENFEAT_dom0; #ifdef CONFIG_ARM + if ( d->arch.is_dom0less ) + fi.submap |= (1U << XENFEAT_xenstore_late_init); fi.submap |= (1U << XENFEAT_ARM_SMCCC_supported); #endif #ifdef CONFIG_X86 diff --git a/xen/include/public/features.h b/xen/include/public/features.h index 9ee2f760ef..18f32b1a98 100644 --- a/xen/include/public/features.h +++ b/xen/include/public/features.h @@ -128,6 +128,12 @@ #define XENFEAT_not_direct_mapped 16 #define XENFEAT_direct_mapped 17 +/* + * The xenstore interface should be initialized only after receiving a + * xenstore event channel notification. + */ +#define XENFEAT_xenstore_late_init 18 + #define XENFEAT_NR_SUBMAPS 1 #endif /* __XEN_PUBLIC_FEATURES_H__ */