From nobody Fri Nov 29 04:39:46 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=1651265879; cv=none; d=zohomail.com; s=zohoarc; b=mXPUt1BO9HifpdR8yn33aPoPPkuxXzuAu6b4mbBFr3+5iPIgzT3YrNwwPxyLCIwHPorW3qieNmKvhrNu9SpnZIxWAD7MCBQMvgylGIYpG3SNRK455kFGhW7Vb6kxT19pKFO1JCQSZphR5Hw77E+v/Lm1qG9GzU81hUiqOd7IlKY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651265879; 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=4F5eQ7wsC1l9OngQ3773yWFIEuChw2l0r19/ZANmJb8=; b=O63QNb/6I+uRr+wxh72u6xY+uqrl3gSrKQ4IxztbueBp3OwqSsFY0ZUC9d9+QPqxEt9OvEAWWCkCcRr9cdgIUUVQuWDFN6CNoSGA2Y6LovBlo5YJCp+CLZkSZWvMVVSEgoiTR+dt/jAUx9MnQgEozTLAgLi/PLHIN1Rhn61JlQg= 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 1651265879648143.6578040518341; Fri, 29 Apr 2022 13:57:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.317707.537203 (Exim 4.92) (envelope-from ) id 1nkXgM-0008AM-EY; Fri, 29 Apr 2022 20:57:42 +0000 Received: by outflank-mailman (output) from mailman id 317707.537203; Fri, 29 Apr 2022 20:57:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nkXgM-00087X-5x; Fri, 29 Apr 2022 20:57:42 +0000 Received: by outflank-mailman (input) for mailman id 317707; Fri, 29 Apr 2022 20:57:40 +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 1nkXgK-0006w0-Ey for xen-devel@lists.xenproject.org; Fri, 29 Apr 2022 20:57:40 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 0046ac0c-c7ff-11ec-8fc4-03012f2f19d4; Fri, 29 Apr 2022 22:57:38 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 30ABC621E0; Fri, 29 Apr 2022 20:57:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46767C385AC; Fri, 29 Apr 2022 20:57:36 +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: 0046ac0c-c7ff-11ec-8fc4-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651265856; bh=6seieTR73PH0f82Y34HYb9MpClaXG8oJYvBYPMoiaDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k5GRPcr8GP3K8y0qny7p1zb6YiGMIlCW9P+OME3kKPshu/LxqKY8B59ApDF+m5mee pNo+Bu5sC2SVSLwgUDi0wnTVvua5iZkt9eHCR416wok+K592gYw0wv2ZWUabyKJIp6 AdjPt2r7iLnNwCHpZnTq/aq+dmryD07R4jgweqsCm/iryHUxxWDV67dp2XIJhEX8P3 t844yfb6M+fyZ7E1zDYZUM2m4mIZNdeJElapXrCxxWY8ivabovwVipl5ewltATtG5E BuXgm+2gstcKjkwEI1SzTluY3VMD018j96/LrrUNXCdkG1D3sPcgaBPPWlsFqbOtAI 6edhDcAgFtn0Q== 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, Luca Miccio , Stefano Stabellini Subject: [PATCH v5 5/7] xenstored: send an evtchn notification on introduce_domain Date: Fri, 29 Apr 2022 13:57:30 -0700 Message-Id: <20220429205732.2030094-5-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: 1651265880885100007 Content-Type: text/plain; charset="utf-8" From: Luca Miccio When xs_introduce_domain is called, send out a notification on the xenstore event channel so that any (dom0less) domain waiting for the xenstore interface to be ready can continue with the initialization. Before sending the notification, clear XS_CONNECTION_STATE_RECONNECTING. The extra notification is harmless for domains that don't require it. Signed-off-by: Luca Miccio Signed-off-by: Stefano Stabellini CC: Juergen Gross CC: Julien Grall --- I dropped the Reviewed-by tags due to the connect =3D 0 change. Julien also suggested it would be a good idea to add a clarification statement about the usage of XS_CONNECTION_STATE_RECONNECTING in the header files but I wasn't sure what to write. Please advise and I am happy to include a statement in the next version. Changes in v5: - reset XS_CONNECTION_STATE_RECONNECTING before notifying the domU Changes in v2: - drop the new late_init parameter --- tools/xenstore/xenstored_domain.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_d= omain.c index ae065fcbee..7bb8c64d33 100644 --- a/tools/xenstore/xenstored_domain.c +++ b/tools/xenstore/xenstored_domain.c @@ -493,6 +493,10 @@ static struct domain *introduce_domain(const void *ctx, /* Now domain belongs to its connection. */ talloc_steal(domain->conn, domain); =20 + /* Notify the domain that xenstore is available */ + interface->connection =3D 0x0; + xenevtchn_notify(xce_handle, domain->port); + if (!is_master_domain && !restore) fire_watches(NULL, ctx, "@introduceDomain", NULL, false, NULL); --=20 2.25.1