From patchwork Mon Jun 5 11:26:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yanfei Xu X-Patchwork-Id: 10293 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2615084vqr; Mon, 5 Jun 2023 04:34:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5WK28tWKJ5D5ZUtlpjzCw4o5PKhTVVIw0hDVJEjPR/Oqoc62+C/VvcTxfqacCXA2c+abOb X-Received: by 2002:a05:6a21:792:b0:10b:91c5:45b5 with SMTP id mg18-20020a056a21079200b0010b91c545b5mr6229810pzb.31.1685964875197; Mon, 05 Jun 2023 04:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685964875; cv=none; d=google.com; s=arc-20160816; b=GbJVDKLOjhSdHYwC42OwK09StWh2h6snrKSgg22wDwKZEkR+uInIT6i6PEmo6GkJhv 8K4egSMTcU2vOpMHz1gcr2v51RzfLb9h7+N4L9XULfJUvOPfeks1g80Y1wYeX5lrv6gc XC+6+xYlIEh4/L3BFzg1mkQvgrbLfX8UYmO+hSV1wdi1qYjM+s+m7Jq94tzFIhVEWjnz BpNyok/KjoS4k/9zaVewLnzKpRNhk3yn76sumJWJcUt1njZC0EA1glsgpTWj8/OEdlpz lAacNvMEanF6MUC+2c0PeHjFRiT8DqBkkAdyjwqbq0vAG8bsaBY4iyaMtFjOtS3aftJ8 z+jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fGdkF/aOM66npDJbG7nEPWhEv8REvp23f+/YGUPYxxU=; b=NSXyjQHXlG07BbyEOc03qeYlNJeWM6s8qfkfLpVgKIT+5JSuYAQdWpA56YmRVyz80S m4mhP3tlQL8NY5HSNkzGKEWuOZ19DdDw1VbtJO+arrV1Vx8SvbVwUcAKXApOk3/f76YA MNfPesYV8REQh8M8h+1tDVPSydFivkf6dBsUS+9d9O/5vQ0Nc9DE5MTItla1RT62dLoL C/nIGIVj+l4a9UP8UQ41YM7Twb2WxFnPOQCxCzvCRakJMOY9emtlMIu5OrEnQsjIgxUO 2TRsdJ2BCI/uHRwsKd7vLiWrPG1QApyfPrXTCvYedg4gaAmO/UZEPsXEcr0ZDDMebTTm 4lKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MXHWig3D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g193-20020a636bca000000b00543bfe3eaffsi978822pgc.762.2023.06.05.04.34.22; Mon, 05 Jun 2023 04:34:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MXHWig3D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230326AbjFEL3w (ORCPT + 99 others); Mon, 5 Jun 2023 07:29:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231290AbjFEL3p (ORCPT ); Mon, 5 Jun 2023 07:29:45 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61323E6 for ; Mon, 5 Jun 2023 04:29:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685964584; x=1717500584; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=gx4+lmIMuKPgij1u1iO7wrD0iCQa441hN4golMffdVk=; b=MXHWig3DRlD2Wcnj62S84pj78AMl4zwAmzoMsr3dBn225d6AfSIH4kEm Q4NUJEx2OeqzZqLj0b48QCbr+SJqD+oHsegUMHgU9jkLTiN5AeLK8UP2K CHR9HXCWCPuYgsA/wYQBURBPJDbx9yWCQf7hbWIbhknQXGTcTPpBLfbc5 Bh4fHMBFU0sA6L8w9IAdKbQltkzEpIYGBcchHhATE6FxnOrUdlcbP2hg9 Khoo3oLu5avkjuKG0KP/EvstDIAHXVHpqo2TGQJCZATU5guY/EIqqcRCo 4Z9EjM1Xv0JCtBI+ycFulxTc4dibmfDqhf3SVBqD3OnpjHB7c3AIjeIRg w==; X-IronPort-AV: E=McAfee;i="6600,9927,10731"; a="336699343" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="336699343" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 04:29:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10731"; a="708626657" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="708626657" Received: from tower.bj.intel.com ([10.238.157.62]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 04:29:40 -0700 From: Yanfei Xu To: dwmw2@infradead.org, baolu.lu@linux.intel.com, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org, yanfei.xu@intel.com Subject: [PATCH v3 0/2] Misc cleanup for iommu/vt-d Date: Mon, 5 Jun 2023 19:26:57 +0800 Message-Id: <20230605112659.308981-1-yanfei.xu@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767862304909472577?= X-GMAIL-MSGID: =?utf-8?q?1767862304909472577?= No functional changes intended v1->v2: 1.Change to use check and return for dmar_reenable_qi() 2.Remove WARN_ON of 'table' instead of using BUG_ON 3.Also remove useless WARN_ON of domain id v2->v3: Move check for 'ret' value to correct conditional statement. (For patch2. Pointed out by Robin) Yanfei Xu (2): iommu/vt-d: Handle the failure case of dmar_reenable_qi() iommu/vt-d: Remove two WARN_ON in domain_context_mapping_one() drivers/iommu/intel/iommu.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)