From nobody Tue May 7 01:27:42 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 ARC-Seal: i=1; a=rsa-sha256; t=1612977538; cv=none; d=zohomail.com; s=zohoarc; b=NLr+0wrM3Ns+nXSOzNaF/3Jt0XDr8TuRuz2MEw42ay8Gtn9NM3jgtZBA1s1HKylkijE/EH2KL8Cri0e+cAsE4eV/q6FE5ACx95lNtHe4OYEVS40TOrZD9C1DZ7W6wj9OvxiSzDaCGUkOZsSpcBUg5CsSeAE9xbBt4elTYIcNskE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612977538; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=27tFXUPh2xwWKtj+Y8n/9TGsuBnMFwQ1a1Ih2Y26U+I=; b=cUY7C2qQ60RDAcAlefdAKUTACKAoPcE/iVDDWsWJ+Ih7pPn4iuiPpJPm1kG7AShILg4fn+DcECZ0byXqIV3mktDvoZgYFJMahBELvD57rS+G5gUj6gf6cT3mQpyqyIj7oOdP217mY5lmUkYhciLEntGCorUpzKS5hNV+EpIY4ng= 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1612977538116899.7007743429724; Wed, 10 Feb 2021 09:18:58 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.83673.156328 (Exim 4.92) (envelope-from ) id 1l9sxJ-0003Ii-OA; Wed, 10 Feb 2021 17:07:09 +0000 Received: by outflank-mailman (output) from mailman id 83673.156328; Wed, 10 Feb 2021 17:07:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9sxJ-0003Ib-Kw; Wed, 10 Feb 2021 17:07:09 +0000 Received: by outflank-mailman (input) for mailman id 83673; Wed, 10 Feb 2021 17:07:08 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9sxI-0003IW-Dw for xen-devel@lists.xenproject.org; Wed, 10 Feb 2021 17:07:08 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9sxG-0005zz-7g; Wed, 10 Feb 2021 17:07:06 +0000 Received: from 54-240-197-235.amazon.com ([54.240.197.235] helo=ufe34d9ed68d054.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l9sxF-0005yO-TC; Wed, 10 Feb 2021 17:07:06 +0000 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Message-Id:Date:Subject:Cc:To:From; bh=27tFXUPh2xwWKtj+Y8n/9TGsuBnMFwQ1a1Ih2Y26U+I=; b=fxliF5bvuBMImMNM6eZaNooTt8 2vwxq2gJbxz/Pc/zCihJ1UZK7T2Shlu8Whq/Pes7HFXf08uwo8Et8gwOW7oBNvFS+GiGyQ3cI6k7t 1AaYoc+L/QvJW56s1mgNL2/TzAXAgQSIpHAdO6xSm7X+0om72KBQH4/32drUmKpHScR4=; From: Julien Grall To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, boris.ostrovsky@oracle.com, jgross@suse.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Julien Grall , Ian Jackson , dwmw@amazon.co.uk Subject: [PATCH] arm/xen: Don't probe xenbus as part of an early initcall Date: Wed, 10 Feb 2021 17:06:54 +0000 Message-Id: <20210210170654.5377-1-julien@xen.org> X-Mailer: git-send-email 2.17.1 X-ZohoMail-DKIM: pass (identity @xen.org) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Julien Grall After Commit 3499ba8198cad ("xen: Fix event channel callback via INTX/GSI"), xenbus_probe() will be called too early on Arm. This will recent to a guest hang during boot. If there hang wasn't there, we would have ended up to call xenbus_probe() twice (the second time is in xenbus_probe_initcall()). We don't need to initialize xenbus_probe() early for Arm guest. Therefore, the call in xen_guest_init() is now removed. After this change, there is no more external caller for xenbus_probe(). So the function is turned to a static one. Interestingly there were two prototypes for it. Fixes: 3499ba8198cad ("xen: Fix event channel callback via INTX/GSI") Reported-by: Ian Jackson Signed-off-by: Julien Grall CC: dwmw@amazon.co.uk Reviewed-by: David Woodhouse Reviewed-by: Stefano Stabellini --- The offending commit unfortunately got backport to stable trees. So this will need to be backported as well. --- arch/arm/xen/enlighten.c | 2 -- drivers/xen/xenbus/xenbus.h | 1 - drivers/xen/xenbus/xenbus_probe.c | 2 +- include/xen/xenbus.h | 2 -- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 5a957a9a0984..8ad576ecd0f1 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -370,8 +370,6 @@ static int __init xen_guest_init(void) return -ENOMEM; } gnttab_init(); - if (!xen_initial_domain()) - xenbus_probe(); =20 /* * Making sure board specific code will not set up ops for diff --git a/drivers/xen/xenbus/xenbus.h b/drivers/xen/xenbus/xenbus.h index dc1537335414..2a93b7c9c159 100644 --- a/drivers/xen/xenbus/xenbus.h +++ b/drivers/xen/xenbus/xenbus.h @@ -115,7 +115,6 @@ int xenbus_probe_node(struct xen_bus_type *bus, const char *type, const char *nodename); int xenbus_probe_devices(struct xen_bus_type *bus); -void xenbus_probe(void); =20 void xenbus_dev_changed(const char *node, struct xen_bus_type *bus); =20 diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_= probe.c index 18ffd0551b54..8a75092bb148 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c @@ -683,7 +683,7 @@ void unregister_xenstore_notifier(struct notifier_block= *nb) } EXPORT_SYMBOL_GPL(unregister_xenstore_notifier); =20 -void xenbus_probe(void) +static void xenbus_probe(void) { xenstored_ready =3D 1; =20 diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index 2c43b0ef1e4d..bf3cfc7c35d0 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h @@ -192,8 +192,6 @@ void xs_suspend_cancel(void); =20 struct work_struct; =20 -void xenbus_probe(void); - #define XENBUS_IS_ERR_READ(str) ({ \ if (!IS_ERR(str) && strlen(str) =3D=3D 0) { \ kfree(str); \ --=20 2.17.1