Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5487493rwd; Mon, 5 Jun 2023 04:34:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5BiIidjp/hVVkQPR4PgzKWrzEtx5QK4c/ObhMkzCx509NOeqXTSGyXa7CLgJGz9m7JBAf0 X-Received: by 2002:a17:903:2449:b0:1b0:2b0e:d3ef with SMTP id l9-20020a170903244900b001b02b0ed3efmr9764430pls.55.1685964856118; Mon, 05 Jun 2023 04:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685964856; cv=none; d=google.com; s=arc-20160816; b=pRVfZFAOdcUYqjvLofHXs1Jeczzq7jo3ejEMmVqz3aaK4fvyHXtm74c+Fqbr54LDn0 +fy69l2R5HkcK2r+J0efuAF+JnOE8igR0tyKe+VyTTrirtoAsxXsCnz1bxistlr+Aaaj uASMuSdAOFpkmHhMkGdW/NyJz2WUwG45bjjUcnPYKmdsUue/7BoD18r7hkdO2IKGrUJT kAQqKJbHOBCPH/n+mgKqwTd3EZLu4unSlBC1LVyqt0C9rM4x5ErIfS+PCri/hSlVBUri 4YW47H5uRlqhBtQzElbPCxjEPwjlX6v7HPgiAoJ3QqQsVqGyd3pp/nmNHQHiVdunmGtk Kgqw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw9-20020a170903044900b001b043fb4096si5158614plb.28.2023.06.05.04.34.03; Mon, 05 Jun 2023 04:34:16 -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 S232203AbjFEL3w (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 Content-Transfer-Encoding: 8bit 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 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(-) -- 2.34.1