From patchwork Fri Jun 2 02:05:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yanfei Xu X-Patchwork-Id: 10200 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp749122vqr; Thu, 1 Jun 2023 19:31:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74SRhdrQc/hGCRgdBsrmfC+bDCAAWoLF1orwZvqWXWsIa2Q1RRpBqm9IONkCTwKFOwJfSD X-Received: by 2002:a17:90b:110:b0:24e:2e86:5465 with SMTP id p16-20020a17090b011000b0024e2e865465mr824653pjz.31.1685673090505; Thu, 01 Jun 2023 19:31:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685673090; cv=none; d=google.com; s=arc-20160816; b=HpbqOTAoRYjDB01qZi8aSa5mjI9kpRyu+FvRNN7YtINM4p4EGOcI71kvJRTdomlhjj IF84OiMmqrxjpCs13F5CsAaepda9YOSzpUxIIAhtXku40C/DHzgn+/ktebGZg2pry7tQ P4S9s2jKdXD8Yn31zoOGdnAu+dvpYhO5ApAJGFM+zOjjgujCsE55Opc/ZjXBBr+txin9 E0nTMOgrPbOdCzoj2I2DawI6ZDqF0qroNZkMqk5Kfn+a+eudsREk/MOPa/K0ksVal5wj HH8C7Vc76XxQ/H4Zf8kCYt0yg1WpiEPi0NvZN55B4MmlcTjO2fNs5ZdiKOMw3kYBijlk /1aA== 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=YSOIgS+Xctuox8ErEh7TQ6fqfu9AyLrCMrlYAtQWp3w=; b=tvI2RPMuz8NxGkFm5EQwUyxAEwv5BRJNXbt7TVmTOjdlhnxZh5ynFInjpaxTid/ihU vKDrgEeY8S3pFY42sDLx76WVs3cPyipsb/pmI0wpOSS3uD2ycUo9WidhMTStjMQK0OxI ZecrPuozsFdCaOjB08xq9LjPgG8ts57SjOzTPLV5c2S/aPASYJ4lck0S42akBSvkvJvg zzYee/q0nLdy4Assgtb46m/sRB35HqHMi8G5JTP1xtzqX8Z4txCMn8OVlJdJCQHW+4W7 IVoFu0oKeVdZjp+IRGEqs/foSd/yQ5nIDFvWG2gToEq8X5R7VfUNu5Gi9c4iiLUSfWLW q0PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=C126j8jt; 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 x69-20020a638648000000b0054033bf35ebsi170802pgd.771.2023.06.01.19.31.16; Thu, 01 Jun 2023 19:31:30 -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=C126j8jt; 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 S233429AbjFBCId (ORCPT + 99 others); Thu, 1 Jun 2023 22:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbjFBCIc (ORCPT ); Thu, 1 Jun 2023 22:08:32 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EF1B13E for ; Thu, 1 Jun 2023 19:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685671711; x=1717207711; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=CGlNXT/q4/l3CvQLFTPbchlcffVRsXT/d11BWSw/2/o=; b=C126j8jtzPiDZ0DvZDd9tSkbCSIgGyUGt9giWRel4p2RIYx8sWdoPXN4 bMZvVGl8im8UoaqmkxZBpt33Y/q4SxmR3cFJfW8OcfZ7WR/LTPTaeBMSS HiPb5wJuMO5TKc8mR0lhitr96dJlPg14fGCHFw16GYEdJDxsNyxzAIOek PzbNe7umcqG7fDT88aUeIgkBotbXBjPQfbcpcrMCP2YC89iHVFQE3svZI r+0xaX/i1kuRfiz/KNU8EsRoYMyJXNwoHcBi2BZwZAlh/3aoDhgU53UJt x/4ULK0k16V31Q8YlXfKEJEw4M068oqdd5hYGkBc8p8oMhiiWoJDkyLmn Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10728"; a="359039371" X-IronPort-AV: E=Sophos;i="6.00,211,1681196400"; d="scan'208";a="359039371" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2023 19:08:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10728"; a="777457798" X-IronPort-AV: E=Sophos;i="6.00,211,1681196400"; d="scan'208";a="777457798" Received: from tower.bj.intel.com ([10.238.157.62]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2023 19:08:19 -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 v2 0/2] Misc cleanup for iommu/vt-d Date: Fri, 2 Jun 2023 10:05:18 +0800 Message-Id: <20230602020520.224465-1-yanfei.xu@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 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,URIBL_BLOCKED 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?1767556346282891765?= X-GMAIL-MSGID: =?utf-8?q?1767556346282891765?= No functional changes expected. 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 Thanks for Baolu's suggestion! 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)