Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5477057iog; Wed, 22 Jun 2022 21:45:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u5tWS4aWggZ5SJVGVQJTKzzpzKdxch1lpa3NJuv6MjXTWo41F34czMRIWsS88dcFXMCQBb X-Received: by 2002:a17:906:2da:b0:712:14b:62da with SMTP id 26-20020a17090602da00b00712014b62damr6438390ejk.351.1655959514351; Wed, 22 Jun 2022 21:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655959514; cv=none; d=google.com; s=arc-20160816; b=KMbHnIYp/jza90uaftnTM8y16X08EfiF5jzUim0lnN2XaxLawA0lGhmqA27C/ZlLrQ QjjXM6o/evAkZswjSgkpoev8iGDLNShiOUNocwa3fqo55luNwGFhTg6/BFYTstam2r2R FwtUkI8vjDzeDphlx9JIhiUdNavCmP69bPIdGiAwUrd7pEtHafYkL32bSAkm1oQU5dc6 QutfSuteU2DDUkNWagCF5DlJ4D1XT/7vKcg/iMB3jkay73wyh0i+WCayOfRO2DD1TSFp BQMADmL3CZeidEufWHXENrOKq4/u2LfTVC+MaknMRW0zquEeKd7yVE5D1073oRE55HJd zWSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=U5JwulRGEY1I1BJUk8tkPc0NZfI5FzapZ/tvQYnIU7A=; b=VcIfMMZQ801sVYVZRPl0f1nHJt6KlLHiAFBGXvHhwUshfwLV+Z7OOPb6SCRQerF8Lx fUvyTvax8tVCQDtTPitYCoy9r+iTManUNNVqivpFKzTye5yBV5dFpeTuZeQzM47+oU4F jJfxnvXK+ZgZuQMG8SU5DLCMw7Weayp5Bwc+38YdGQJ3srB58iYbOxyrWjKHHLF+/a62 YEJq3hSIW+EfNpwHMOZqOdOjVFTDiWcCjnYgcIWkn+dNUIOgOarkmWfrOnM7LfeDeaaR UqX4prbMJsDdBWiO1Qqzd6ZIlHg8JZ+YGngup7vBzArmHHkuD8vCteP1abVTEH1ycRhb UH7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=L6TQ795F; 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 go33-20020a1709070da100b00711f8fa7fffsi6990985ejc.467.2022.06.22.21.44.46; Wed, 22 Jun 2022 21:45:14 -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=L6TQ795F; 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 S231951AbiFWEn1 (ORCPT + 99 others); Thu, 23 Jun 2022 00:43:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241110AbiFWDik (ORCPT ); Wed, 22 Jun 2022 23:38:40 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE10435271 for ; Wed, 22 Jun 2022 20:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655955519; x=1687491519; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=U5JwulRGEY1I1BJUk8tkPc0NZfI5FzapZ/tvQYnIU7A=; b=L6TQ795FlAUEmi45WH7cVPx001dKc11mPcKdjeFpStuMaqF1RrkgG4yy DP2S+MKNaniSQwufKomiW8xtYScyLBGZFIz+YBqTImOqOvq8mQq3jXMzo v2fpSUi3eyzI9f9QGrq2LYds37+r5M0pfnoryQHxDg9qfzGcRwrpjBD5h AO3OlbV9wYrxQW/DNNN6n0rsEpFSBpH/j3ytsOPlYGPOQQeWghO6gKdHc T9s7Ay4IDTyTSUTB6hfNzKbux07M+sYQFd9ibcJ7LkL+wgHBZw6rV4bcf hNzp/lxQuQcqVTyLnLl5mIRZnJEBy+i82reS5WtBtg8vpqooli8EcBt9Y g==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="281342007" X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="281342007" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 20:38:39 -0700 X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="644525123" Received: from yutaoxu-mobl.ccr.corp.intel.com (HELO [10.249.172.190]) ([10.249.172.190]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 20:38:36 -0700 Message-ID: Date: Thu, 23 Jun 2022 11:38:34 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: baolu.lu@linux.intel.com, Steve Wahl , Joerg Roedel , Kyung Min Park , David Woodhouse , Will Deacon , iommu , Kevin Tian , Mike Travis , Dimitri Sivanich , Russ Anderson , Linux List Kernel Mailing Subject: Re: [PATCH v3] iommu/vt-d: Make DMAR_UNITS_SUPPORTED a config setting Content-Language: en-US To: Jerry Snitselaar References: <9d6177ac-802f-eb11-4307-b0e49d8126b5@linux.intel.com> <20220615183650.32075-1-steve.wahl@hpe.com> <96984350-3a04-812a-60f1-a09138014fac@linux.intel.com> <20220623025126.ld45k72c2okodvvk@cantor> From: Baolu Lu In-Reply-To: <20220623025126.ld45k72c2okodvvk@cantor> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 On 2022/6/23 10:51, Jerry Snitselaar wrote: >> The real problem here is that the iommu sequence ID overflows if >> DMAR_UNITS_SUPPORTED is not big enough. This is purely a software >> implementation issue, I am not sure whether user opt-in when building a >> kernel package could help a lot here. >> > Is this something that could be figured out when parsing the dmar > table? It looks like currently iommu_refcnt[], iommu_did[], and > dmar_seq_ids[] depend on it. That's definitely a better solution. Best regards, baolu