From nobody Sun Feb 8 15:46:50 2026 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1633672582; cv=none; d=zohomail.com; s=zohoarc; b=fI9+QHrLoUJ4nAVbuWC3aflIjlD84F6327x+ThjtAHDlRaBHvXf16381w8L4tSwm9Pg3O9GU2h4VyvAeXkgFP06U9u8Tk3oL+TuPPLl6iEsGAiLfMyF1wVVxHHDYcLVrs4gunYIFvsv1QZtBkIjwPtL5F4rhsVIjO60nL4KMYqM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633672582; 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=ZCJvktk62euiFf93z8Os38uZoCLuGeAveKltg5+4Wtc=; b=GotD0/hZpUsCqK8mfbrMIZdOAZMvXb+OYrifKDrAmAHUiZamOqGDTjCP58OQNuEhfOesBwCGnAGkW0mQO2+QS4AjNWGS91/8/cwkezKVM0AUtZCeVoaqpU5Vkb+205tkccw4dUv2/Cq5H2G3f5g7Sy+Fe53bUI5whK5Lc4u7suA= 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 163367258202977.28272371532535; Thu, 7 Oct 2021 22:56:22 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.204337.359515 (Exim 4.92) (envelope-from ) id 1mYirX-0001Gi-LP; Fri, 08 Oct 2021 05:56:07 +0000 Received: by outflank-mailman (output) from mailman id 204337.359515; Fri, 08 Oct 2021 05:56:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mYirX-0001GV-Fp; Fri, 08 Oct 2021 05:56:07 +0000 Received: by outflank-mailman (input) for mailman id 204337; Fri, 08 Oct 2021 05:56:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mYirV-0007cA-KS for xen-devel@lists.xenproject.org; Fri, 08 Oct 2021 05:56:05 +0000 Received: from mail-lf1-x130.google.com (unknown [2a00:1450:4864:20::130]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c27177f6-bd7e-4306-9d47-72ef149989c9; Fri, 08 Oct 2021 05:55:45 +0000 (UTC) Received: by mail-lf1-x130.google.com with SMTP id b20so35071654lfv.3 for ; Thu, 07 Oct 2021 22:55:45 -0700 (PDT) Received: from localhost.localdomain (host-176-36-245-220.b024.la.net.ua. [176.36.245.220]) by smtp.gmail.com with ESMTPSA id f8sm151147lfq.168.2021.10.07.22.55.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 22:55:43 -0700 (PDT) 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: c27177f6-bd7e-4306-9d47-72ef149989c9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZCJvktk62euiFf93z8Os38uZoCLuGeAveKltg5+4Wtc=; b=egTWtj0yY2eScJ0OlKXABb4G+bmYSWosMoQG8sskJ0bDLAxynVAbBUO8ze901KLgN0 4gqvEwhbUTVm208gisrRZccw+DN3KtwxHFLyd8flxas7Ycqm/3zEiyS8Dx9szsY1EcGi ZWHuONWzcP7cVazxts2zgCR9c7Q1iNo66m4ToAgHhR2czvdLDM10zJhvEN27t/GNccFB 2DlhzvXQQ7SW8x4QxwVeSKdnvDGhOG4QWoiXidYssrdLd3vP5rzZFZvDKeCckMDcvjrN dSziPh6BixoMhXDrhzHEUAKwoIPF+4fIEt77zMy+CwhChFtedX4g3nMk7dRAfpC/ij5w DWkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZCJvktk62euiFf93z8Os38uZoCLuGeAveKltg5+4Wtc=; b=2FXGFiXo91/qts9DiPO7VRuwE8PH/7EsoGP7xdCJTlV+Y2CwZrmt7GI8FOw1jQsWzX +hti109Weu5TDnTsGPaR2eqgHPl4lJda/SGRHTb+FTabDh68WldbxDWBB0JWC5EN5E+u bo/mmYToWWAXOditBmzlLG/Dm+7jnuPvB6vqdaoPU9jA/P7igYttLZHNgB95KTCrp1/O iI0vvFyxClCaITjJfOuZwYx9sBbA9SJEnf0ZpxQhq8d1k2l8l98RZMarGtMR/JBNMGqq q4a10wLJdVTbUN4yvq/XR7KRkdywgyuYkLweIrfMw1Iz5TTOTeXTeCinhznK+fPt3WVS C/Ag== X-Gm-Message-State: AOAM53221HWOBaM5sQzSvERpE9qcN6f9Lsz3gdl5Mj9WF+hk407zJzjb geRqmg3JYpmsxq9RC2WxUtTMsp4tgwA= X-Google-Smtp-Source: ABdhPJw3iseSMLF5rjaGBAlP//RiQcLo4485Bz93gG+h/Km/Hsavi6PicqSrSmsmdebz/ACX9Ate4g== X-Received: by 2002:a05:6512:3b94:: with SMTP id g20mr8678129lfv.119.1633672543928; Thu, 07 Oct 2021 22:55:43 -0700 (PDT) From: Oleksandr Andrushchenko To: xen-devel@lists.xenproject.org Cc: julien@xen.org, sstabellini@kernel.org, oleksandr_tyshchenko@epam.com, volodymyr_babchuk@epam.com, Artem_Mygaiev@epam.com, roger.pau@citrix.com, jbeulich@suse.com, andrew.cooper3@citrix.com, george.dunlap@citrix.com, paul@xen.org, bertrand.marquis@arm.com, rahul.singh@arm.com, Oleksandr Andrushchenko Subject: [PATCH v5 05/10] xen/domain: Call pci_release_devices() when releasing domain resources Date: Fri, 8 Oct 2021 08:55:30 +0300 Message-Id: <20211008055535.337436-6-andr2000@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211008055535.337436-1-andr2000@gmail.com> References: <20211008055535.337436-1-andr2000@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1633672582663100001 Content-Type: text/plain; charset="utf-8" From: Oleksandr Tyshchenko This is the very same that we already do for DT devices. Moreover, x86 already calls pci_release_devices(). Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Oleksandr Andrushchenko Reviewed-by: Stefano Stabellini Reviewed-by: Rahul Singh Tested-by: Rahul Singh --- Since v1: - re-wording in the commit message --- xen/arch/arm/domain.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index fbb52f78f1a6..79012bf77757 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -985,7 +985,8 @@ static int relinquish_memory(struct domain *d, struct p= age_list_head *list) * function which may return -ERESTART. */ enum { - PROG_tee =3D 1, + PROG_pci =3D 1, + PROG_tee, PROG_xen, PROG_page, PROG_mapping, @@ -1022,6 +1023,12 @@ int domain_relinquish_resources(struct domain *d) #ifdef CONFIG_IOREQ_SERVER ioreq_server_destroy_all(d); #endif +#ifdef CONFIG_HAS_PCI + PROGRESS(pci): + ret =3D pci_release_devices(d); + if ( ret ) + return ret; +#endif =20 PROGRESS(tee): ret =3D tee_relinquish_resources(d); --=20 2.25.1