Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp786684iob; Wed, 18 May 2022 12:59:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQ+e4u1wxf4T37ocPVZC4rVp06bmHFu2AK9vOmeGz/ABZDrupQ6dFbQIIlNVet53dOR5PK X-Received: by 2002:a17:902:bf0a:b0:15c:df1b:f37d with SMTP id bi10-20020a170902bf0a00b0015cdf1bf37dmr1285489plb.90.1652903991868; Wed, 18 May 2022 12:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652903991; cv=none; d=google.com; s=arc-20160816; b=RV2Ngs926EH0nPmjqkdb0Xmst2ZKLnn/oopCIrc0a7av5ztP2lD7ufwjY2ottZ5wkY zPothJZNSbAXK20NJh964cnX2q7qy3aPilv8r1s03zUtZ4FgsHZ3YsUL4EAJlt156d+A +Nm+iPx+Wi01C7OFTc9R0bdBt7+4E0OHxpxaQrgbGeTPvYTQYtUDQQPY13M/iLsyyhTH 7Z4NQP0LUp1JOrEbvslokbUjIe0xlN6AvIkSLfnkjIQuFYNTBf3l5/7tApdtZtBrtuxf /qa9OkCcbM+WV4TR7oB6H1S2v7JkoLKs0jOEICEmOCCWeXWqmNmIUGL7yF4sEHPysb8K s8QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NMq5uB0MTUMudjGBVLDD0OXDum4Fof15hbz7EILKipA=; b=wPPREPEL9oPLtG5mhfPwKZ3N/jpgYee6q3aMnF6onCI5FefWpAUeNYSLC0CqTQCzcB jZRh18hb7GFbm5DD83VfWRuzOarnYPeWngZafcf+dMprH5yoFDmam3JGjTWqD9cU1LFS 3eyyPIoHLWeXRComDqXCck3NycVC27eZGS/8wl4QE1ldcW7OEeR1HR4MOhnNqtjT+mNs s75De5vUqb3CamcENHoI+8LEdmzuhwHH/3zxX9B1k+lN03oyYUwArIC3XevrrqBTv/Hr vX28E/USUluikZWMqR/uJRx6ntS3rLUgxs/vW8GNDXecnmOf4wX5GhJfJpjc72vuYy41 syIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b="S9/BQaeS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p2-20020a170902f08200b00161a896003esi3140410pla.264.2022.05.18.12.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 12:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b="S9/BQaeS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 42100227817; Wed, 18 May 2022 12:59:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242269AbiERT7o (ORCPT + 99 others); Wed, 18 May 2022 15:59:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242217AbiERT7n (ORCPT ); Wed, 18 May 2022 15:59:43 -0400 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2996E2B for ; Wed, 18 May 2022 12:59:42 -0700 (PDT) Received: from pps.filterd (m0148663.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24IJ20Eh031668; Wed, 18 May 2022 19:58:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pps0720; bh=NMq5uB0MTUMudjGBVLDD0OXDum4Fof15hbz7EILKipA=; b=S9/BQaeS5Y7O2ldOLm8s2/g8bgN51M5WxJf4bH5UKRkYtHACbJaQPeulatNDG+qI1LUD Tv48Hy3xuNThQ4WluRIbdLewM0Bo6/rug1nBQcYtfi/L/RbZCaHt5MhrKxjmZmCgrpjf y9dv5iucW18UJvXcREecqf2TthV14woPYN/u+AkwgN/WbQxDn2CnbPREN7HLGNftd4cF 0OiA5K+9BnCnf6ClLgsB2rXXMWdC/ml3Qre2mTUhr3Rdnt79l+r6d2Ga1lTqAczvTxPN ygvzfQi08JEwpF3IupvGZmLglUBO5DGif02YBuNU8+uhb2cmiYJeXpEHBzVSiy558fhG rQ== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 3g4rvbuju6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 May 2022 19:58:27 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3425.houston.hpe.com (Postfix) with ESMTP id 2C7A7A8; Wed, 18 May 2022 19:58:26 +0000 (UTC) Received: from swahl-home.5wahls.com (unknown [10.207.216.251]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id E645C4E; Wed, 18 May 2022 19:58:23 +0000 (UTC) Date: Wed, 18 May 2022 14:58:23 -0500 From: Steve Wahl To: Baolu Lu Cc: Steve Wahl , Joerg Roedel , David Woodhouse , Will Deacon , iommu@lists.linux-foundation.org, Mike Travis , Dimitri Sivanich , Russ Anderson , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] iommu/vt-d: Make DMAR_UNITS_SUPPORTED a config setting Message-ID: References: <20220505194658.246121-1-steve.wahl@hpe.com> <20220512151309.330068-1-steve.wahl@hpe.com> <2c65b8cf-3813-3ddf-3f5b-c374cc842678@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2c65b8cf-3813-3ddf-3f5b-c374cc842678@linux.intel.com> X-Proofpoint-ORIG-GUID: bAtMyue4fwEGQiU_GnCx-nmpbuHsVI6G X-Proofpoint-GUID: bAtMyue4fwEGQiU_GnCx-nmpbuHsVI6G X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-18_06,2022-05-17_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxscore=0 phishscore=0 mlxlogscore=701 clxscore=1015 adultscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205180117 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, May 13, 2022 at 10:09:46AM +0800, Baolu Lu wrote: > On 2022/5/13 07:12, Steve Wahl wrote: > > On Thu, May 12, 2022 at 10:13:09AM -0500, Steve Wahl wrote: > > > To support up to 64 sockets with 10 DMAR units each (640), make the > > > value of DMAR_UNITS_SUPPORTED adjustable by a config variable, > > > CONFIG_DMAR_UNITS_SUPPORTED, and make it's default 1024 when MAXSMP is > > > set. > > > > > > If the available hardware exceeds DMAR_UNITS_SUPPORTED (previously set > > > to MAX_IO_APICS, or 128), it causes these messages: "DMAR: Failed to > > > allocate seq_id", "DMAR: Parse DMAR table failure.", and "x2apic: IRQ > > > remapping doesn't support X2APIC mode x2apic disabled"; and the system > > > fails to boot properly. > > > > > > Signed-off-by: Steve Wahl > > > > I've received a report from the kernel test robot , > > that this patch causes an error (shown below) when > > CONFIG_IOMMU_SUPPORT is not set. > > > > In my opinion, this is because include/linux/dmar.h and > > include/linux/intel-iommu are being #included when they are not really > > being used. > > > > I've tried placing the contents of intel-iommu.h within an #ifdef > > CONFIG_INTEL_IOMMU, and that fixes the problem. > > > > Two questions: > > > > A) Is this the desired approach to to the fix? > > Most part of include/linux/intel-iommu.h is private to Intel IOMMU > driver. They should be put in a header like drivers/iommu/intel > /iommu.h. Eventually, we should remove include/linux/intel-iommu.h > and device drivers interact with iommu subsystem through the IOMMU > kAPIs. > > Best regards, > baolu Baolu's recent patch to move intel-iommu.h private still allows my [PATCH v2] to apply with no changes, and gets rid of the compile errors when CONFIG_IOMMU_SUPPORT is not set, so the kernel test robot should be happy now. Is there another step I should do to bring this patch back into focus? Thanks. --> Steve -- Steve Wahl, Hewlett Packard Enterprise