Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp388335lqg; Thu, 11 Apr 2024 06:18:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWqq2CVPC46qPDUTCTN0ZxDmZHYBXgwJrufz8rBB6LpxbCYLme42yBWkK0AVtu66+XQpevE6Y5BwpKUUqmqWqmBp2qgrHWEokBwrhoZtQ== X-Google-Smtp-Source: AGHT+IFajnUqgJDtuqghUB4Fla7w04ELgqx7+MCJFK4vRfl9ORh7MMXlJ2XWLehr73U7ZX4yEkgL X-Received: by 2002:a05:6a00:2287:b0:6ea:8793:6d64 with SMTP id f7-20020a056a00228700b006ea87936d64mr7137014pfe.23.1712841495638; Thu, 11 Apr 2024 06:18:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712841495; cv=pass; d=google.com; s=arc-20160816; b=xPuXnZiUiRBZsfw1CmeH6bh89AUwqMbyCEh77JYELgkRQJn1iv53+SoTv2GeNXLm9m kiATgKA3ijOlO57US2fkuy2HW0SfGAEkDf7GDZ45Ad6kwnd5qTqXe9jL0aLUtiFRrqd8 ov8zBVgbFraLq2D2G/huMHzsv2unXU4EpZKUaa1cGbrh7IK5LU6szK0kwA54mZxgtQuI T3ZEDiiC2rwfIB0MztDc++U6Rmur3qR+xsrxGyE4+UwMDS4QA9gF+mgn8LaYRVkDkK7x dFizbEb/bH9TeqgSCZ6DvR6Swl7dvl9vg69VCJRM1QopU6prIb7YPI8ZHKIkC1v2iPgA Igyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:cc:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=LSBEVdupjiTDcubmndOqmPJSDU+Bf7AVzGyYEiDseWk=; fh=rf2uJ64RFZZqxw+w2nwuP3ie5qgxaGeaB9iC3HzVQJw=; b=kNSUjI7JXS3kgG2x6aeUthoKoNMDLbwen/9r/N4p2bqVRx0e/5M35GpMzNAU+5AsPN UIUtKjWc4kyh+qy3SWgYfYsivHr49EJoUb5LGBWe1Ykl+g34lbIv/IZ1yRq550GKEdcH kS4JBWQ2nLPkPZRjLFRiShPwhnRW0gm9XdlVwJTTCFvHcmgW3yl0zA9eV7N86aK4DMS2 6WGY1E3P3XM+FKZLoIWcPRpuy7/fo/ZYL107IaG+cSGQ0lpiCnm6FedekrZcdsbUl7PX qiR5baZyq7rgD/Icx6FlI8PbjIta2HG7J/h6+RWTQMIzAnVzxuCV1k05b/DfNVGOJ4d6 UY3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Wm57eC+0; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-140491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c1-20020a631c01000000b005eb4d2501c7si1292275pgc.693.2024.04.11.06.18.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 06:18:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Wm57eC+0; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-140491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3304D282617 for ; Thu, 11 Apr 2024 13:18:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4587814D435; Thu, 11 Apr 2024 13:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Wm57eC+0" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08710335BC for ; Thu, 11 Apr 2024 13:18:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712841483; cv=none; b=D5NCKiFGODkVjJfZ1JE8jVb5mAmKvgr4aff6eVU3a9cXGFwK3CY1xXqOteZrq+/zGAyN4QY8T2OajnepONO2au6/+iDonzjfCZ2DK1JsQWFoifjWFYt25kb7+sAK8UXFC/B5UQJ0XTqOUA1KmXv355W83rDNYXwbozEyRE47YBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712841483; c=relaxed/simple; bh=Q6x1T1BSMrCr5eyuBNqAuNAVMxGpPKsZvY0wjxFuhwE=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=TBGj/8aMF2xl+RjjGK91kP2iepR1o+6F/Ms75c+QwfFA4QykDLUgEWM0kZ67RHRFdD6c90HCQu4nF3W7QNF784NFKvygqWdmekmRVAXig6DLzzSceV5W9MQj7u3oRgnm3+mYBMbYNkDqcxU2TKCWT+44mdG6RMU5zu54XdqS0bU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Wm57eC+0; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712841483; x=1744377483; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=Q6x1T1BSMrCr5eyuBNqAuNAVMxGpPKsZvY0wjxFuhwE=; b=Wm57eC+0CeFNYnxY2encVTC2xzyxL6Gd55NseNIgWJ+D/0tQ3v3ZnZqo +h/mo2VYbz0O3Qf1CCWQiHvmZRrm3HJm/zE8tvFLDhStUtdSHXrutd6XR cUeGPnb+HPeDYW8EFITYQxJvZQhESnSJJC3DgQ2i2/FDgLnqbwvOdlY2k 52mDxVZIrEezBXLFptHeZFavu34kUpROJ4+66/5I0yIwNzOzd5g7vXAvE 9kO6LVGIQa7V1P1sTy9Z1RF8wp+Yyx9CxDvEVaORGm8aEG8Ogq2QuL39B 7o/+8zK1CNr8lX+fCZ2jw3JDQqv1QovW0aw7vJEd7oY0L48lsiyvLwSbe w==; X-CSE-ConnectionGUID: ldODU5BWSjS76P+GCRpGUQ== X-CSE-MsgGUID: gMQE23pNRii4ngdE36m8JA== X-IronPort-AV: E=McAfee;i="6600,9927,11041"; a="8166104" X-IronPort-AV: E=Sophos;i="6.07,193,1708416000"; d="scan'208";a="8166104" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2024 06:17:47 -0700 X-CSE-ConnectionGUID: Cr0FifIJRyOtGhUiap4YEg== X-CSE-MsgGUID: oFlnFjwMQ+muWFNBNdGYHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,193,1708416000"; d="scan'208";a="25691493" Received: from blu2-mobl.ccr.corp.intel.com (HELO [10.124.237.86]) ([10.124.237.86]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2024 06:17:44 -0700 Message-ID: <4e47aff7-aa65-4c60-a5dc-b7e0f2737a3e@linux.intel.com> Date: Thu, 11 Apr 2024 21:17:41 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: baolu.lu@linux.intel.com, Joerg Roedel , Will Deacon , Robin Murphy , "Zhang, Tina" , "Liu, Yi L" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 01/12] iommu/vt-d: Add cache tag assignment interface To: "Tian, Kevin" , Jason Gunthorpe References: <20240325021705.249769-1-baolu.lu@linux.intel.com> <20240325021705.249769-2-baolu.lu@linux.intel.com> <20240410154134.GG223006@ziepe.ca> Content-Language: en-US From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/4/11 7:14, Tian, Kevin wrote: >> From: Jason Gunthorpe >> Sent: Wednesday, April 10, 2024 11:42 PM >> >> On Mon, Mar 25, 2024 at 10:16:54AM +0800, Lu Baolu wrote: >>> +static int __cache_tag_assign_parent_domain(struct dmar_domain >> *domain, u16 did, >>> + struct device *dev, ioasid_t pasid) >>> +{ >>> + struct device_domain_info *info = dev_iommu_priv_get(dev); >>> + int ret; >>> + >>> + ret = cache_tag_assign(domain, did, dev, pasid, >> CACHE_TAG_TYPE_PARENT_IOTLB); >>> + if (ret || !info->ats_enabled) >>> + return ret; >> >> I'm not sure I understood the point of PARENT_IOTLB? I didn't see any >> different implementation? >> >> Isn't this backwards though? Each domain should have a list of things >> to invalidate if the domain itself changes. >> >> So the nesting parent should have a list of CHILD_DEVTLB's that need >> cleaning. That list is changed when the nesting domains are attached >> to something. >> > > probably just a naming confusion. it's called PARENT_IOTLB from the > angle that this domain is used as a parent domain but actually it > tracks the child tags in nested attach. Is NESTING_IOTLB more readable? Best regards, baolu