[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86/mm: further simplify cleanup_page_mappings()
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 9 Jun 2022 17:39:21 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KqPCUXPxC/LvcetQHGK7A6OTL9d/F0npFli+zI/opfM=; b=mzMjKjj5N/ID2CyeahjFFwm0UAJxecqg24mvEL8wyF2dVVrrvmxfwzCfRZJKz2+fih0d1dKosvdGZl8i7mamqP/SUOZNL3egN+2PN8XPPfzlHlIQq5CXQXTRmq7K2QKn9p1LLidB+PqZMJIUzVS1ub8sBqX3XCgYBq7/ZLssMDF9PxIr8Sk3el3f7FYptWthj5Ha8c2vj5cMT+X980XsyJveIvaIeMUw+g2Y8g+XJnVExBHOZFg9wQvim21ub9+iMXJoxqWrCiJNJbKLljLdcvHafXAqVKVJbjbwYbQAYDbqg+MJLkMcVOZc8N5tM5oUcEEsBF+RxLHff0pqRtx4Vw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RUH5oqs7pFPbC8PJof2LCId/UAdxg3EyF6x1zjPGrrITy7M8ZovqG3u4P8MjraPiP6yGcKN5hhH7A2GyAeuOG8eUBt9OgjOmbTkQ92GA/cyja9c3qNQLkYDvCUBgAQJ76JV5tVEZR8GXEKy793fkTaj9JjfxxXcuN4JgXSJk1hKtBhaidQt6GRya4p883ZgjvEocZXU43O1p3KuLeXyBvuO878bi/8jg3MZyOdzKMx+wO9cmGAoxL+veqRGukV02RsUtxYTpCr1bp5o5Kiuy8ja9fDCsGTSoNO5KO94ylxzf3lPOmXIEfHwoFU+OHuOC+TxJvkOAQuSivS69hx+3LA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Thu, 09 Jun 2022 15:39:37 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
With the removal of update_xen_mappings() there's no need anymore for a
2nd error code variable to transiently hold the IOMMU unmap return
value.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
I have to admit that I was tempted to get rid of PAGE_ORDER_4K at this
occasion, as it feels awkward to me to have such in clearly x86-only
code.
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -2470,12 +2470,7 @@ static int cleanup_page_mappings(struct
struct domain *d = page_get_owner(page);
if ( d && unlikely(need_iommu_pt_sync(d)) && is_pv_domain(d) )
- {
- int rc2 = iommu_legacy_unmap(d, _dfn(mfn), 1u << PAGE_ORDER_4K);
-
- if ( !rc )
- rc = rc2;
- }
+ rc = iommu_legacy_unmap(d, _dfn(mfn), 1u << PAGE_ORDER_4K);
if ( likely(!is_special_page(page)) )
{
|