Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp84722rwr; Thu, 4 May 2023 15:16:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4FrHusJejlqjUyB/FkN/z24lGqF3yTG1VWsuZgwKfwozaoRuTsaaepZwU5CyMFUMkahbr5 X-Received: by 2002:a17:902:e5cf:b0:1a9:8ba4:d0e3 with SMTP id u15-20020a170902e5cf00b001a98ba4d0e3mr5423011plf.59.1683238586123; Thu, 04 May 2023 15:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683238586; cv=none; d=google.com; s=arc-20160816; b=HjgHsTMRtlFaw1DMEwWD6Bj+Wxdo9yF9q1QKckDqG3odDMLebScpTvXoq41kE2RPLt cdb5j0agF4MSafzU2Wleptg/GblfEzqhDm0UifZbVUS3EpaTsmr80pM0gWswNCOS8oqL pFGLKRIStVrxpsmEyg+6v0jWc02VyYfGobnoFgSp03xeBlvsb2nE2GRr4mG6ht1ZVWL/ GIQ5HlHs9oJlcEL9+NtuHe7ptMAmi02uKBnTJgcDvr+gtnkNJoU8Y7quitmfGzzCxPvr jl+hgQSn+GDWeCHvW8N5a7s19UctDG0n0kwP4Hdo+Zv2/X4Pyn+oGnRKikl1VBrB6XVX EHrQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=RA6vDOTWUM7gawZGNVf5W0M0tObBqe6khECBhlBz8FQ=; b=SSFJPqa7ni86E68gTX/udZrJ/eoJLH8AyDkNUFRXvKU7/rSlELkbTESVJXlAHFlabz 6wlXblT5Uo6DgwYeROaXc1qmW98pOxq3zq6z0+vSqCHsfg/oSDQDZw6ZlX2qs5H6k02k zj9dVH7702vxmJLnHtMkf07WTGPJxIrJgY4p7BHl10ubXbXwsaM6Frst5EOqHKuzpcSC XuOpiyfZHIi0vDLlwLEUCEwMjNFspFWx/8Q92Kb50pD3m7I3/vKkqzfu2rNYdcT1d9Ar Kv/YODNNxR0QL0F0wJFT1ByDXzLMOwqu0gn49kJQiDJ+rJH6txt8Y8Jtsk+8gfegumko 9HLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VvKG1F4c; 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 y16-20020a170902b49000b0019f359c651esi40784plr.556.2023.05.04.15.16.11; Thu, 04 May 2023 15:16:26 -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=VvKG1F4c; 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 S229642AbjEDV51 (ORCPT + 99 others); Thu, 4 May 2023 17:57:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbjEDV5Y (ORCPT ); Thu, 4 May 2023 17:57:24 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C94DA13289; Thu, 4 May 2023 14:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683237443; x=1714773443; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4Q0HgYS8fBg0x+XSACWujM6Ax818ZMRS1g2rWv1t5c0=; b=VvKG1F4c+OE3S6VlePVAYkPf8Kpk/l0WVwWcbYi9md4XE2JqIF/sIe6E kaLV+l/4bwQv0N5P/owYKUq8TKRxRQdt8YwNO2RwlO0hfi7jl17+M+O5o C4sLojKmoVpRF0LsszLMBzorflH+y0uw23QwCg+ksFD1m6PHZyRLhLRdA /JaLTw1xKaiTWKRG97+70+zB+RVdYX7EGL5ihjp82Q37N2tAsZdjAcAmv 5zzXDAK72Mc6TCLoi/x+Rci+eKv5r038p+0XlbSjKg3bsrZo2PL6e/pgl bc/1AKkmfgPnIfiZ2VTSrJzrg0iudC0exz1wkPCHK0yWFCgcEcMNjqZZy w==; X-IronPort-AV: E=McAfee;i="6600,9927,10700"; a="351187040" X-IronPort-AV: E=Sophos;i="5.99,250,1677571200"; d="scan'208";a="351187040" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2023 14:23:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10700"; a="697233794" X-IronPort-AV: E=Sophos;i="5.99,250,1677571200"; d="scan'208";a="697233794" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.24.100.114]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2023 14:23:05 -0700 Date: Thu, 4 May 2023 14:27:27 -0700 From: Jacob Pan To: "Tian, Kevin" Cc: LKML , "iommu@lists.linux.dev" , Robin Murphy , Jason Gunthorpe , Lu Baolu , Joerg Roedel , "dmaengine@vger.kernel.org" , "vkoul@kernel.org" , Will Deacon , David Woodhouse , "Raj, Ashok" , "Liu, Yi L" , "Yu, Fenghua" , "Jiang, Dave" , "Luck, Tony" , "Zanussi, Tom" , "Ranganathan, Narayan" , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v5 4/7] iommu/vt-d: Factoring out PASID set up helper function Message-ID: <20230504142727.4bd2206a@jacob-builder> In-Reply-To: References: <20230427174937.471668-1-jacob.jun.pan@linux.intel.com> <20230427174937.471668-5-jacob.jun.pan@linux.intel.com> Organization: OTC X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 Hi Kevin, On Fri, 28 Apr 2023 09:47:45 +0000, "Tian, Kevin" wrote: > > From: Jacob Pan > > Sent: Friday, April 28, 2023 1:50 AM > > > > > > +static int dmar_domain_attach_device_pasid(struct dmar_domain *domain, > > + struct intel_iommu *iommu, > > + struct device *dev, > > ioasid_t pasid) +{ > > + int ret; > > + > > + /* PASID table is mandatory for a PCI device in scalable mode. > > */ > > + if (!sm_supported(iommu) && dev_is_real_dma_subdevice(dev)) > > + return -EOPNOTSUPP; > > "&&" should be "||" > good catch, Thanks, Jacob