Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp538738pxb; Wed, 29 Sep 2021 04:45:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPsVUO/aM0xWJtsWfBvrcDu3WG8i5kWQWW6uPQZ6cih/ZmZtEDj4+6kg9h3ycj4S8fot0T X-Received: by 2002:a17:90b:4c8a:: with SMTP id my10mr3308101pjb.49.1632915922586; Wed, 29 Sep 2021 04:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632915922; cv=none; d=google.com; s=arc-20160816; b=I/iF1g/gIEUUuS8p9yAhCEyMluhu9pdzUiWD23zk+fsC8OuyomwVRZxlhDaKQ0Ssnf nDXUuc1+1L7Itp8M777W7TRaZBSsa7zVwhWSW1s5wAzbZVwos+Sl8aRa1U+w3bYo4i8W 53oTbLKjijVDQqSYLVzl1erFSMr+tkh7HDO8TIqLbt9+RPBAoU8gz7Ld1BBs7ed7kJP1 VO3GmGFHLfmgkV0O5fF52or0j5gdllHLVfBdjColvvkFBAJHsEkLdEEvzV3pKMXjYzAX l2eLRIHnOCj8pLPaEGudPotWhFQv9k3b7PNQyCcp5/rn9jKYlI2ULN7MwuWo9XhCK/R1 qJcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:cc; bh=KG6Y+wOi8P14UdC7saNokGM6aVFzKARBKQtgs7spZbg=; b=oipeufbn6/oN05/rq5Rpdq/YuKsXR1R7G838vPyd/NnYRULS0TJV9+YB7sKYmrOcRk SKzIGX0C7kkPmJPoiqzuByNdyRzZDVeARbg42z+ltbNHQW0VR0lRmg06SSVkUiPlQXOg TB9PiuRvVQ4xE9A1W4HX1+4ba4GgKh7W7tesQGPkIKn/O94Uxk8QuuSi6QCklV68/vmU dM9koN1iRw/DGpVB4yuk4VnEh9n5QfyB0Te9pvUJbH67bknOme5AawOrPGyxQrzlfr4z 56gQ1WlupaCveDEPB5+xJkimauKKYxb0v16nrMMw+eRhEnQxDmhj1F3VAW7BptuPISTl /WCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si2425832plm.30.2021.09.29.04.45.10; Wed, 29 Sep 2021 04:45:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245043AbhI2J1O (ORCPT + 99 others); Wed, 29 Sep 2021 05:27:14 -0400 Received: from mga09.intel.com ([134.134.136.24]:60796 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbhI2J1I (ORCPT ); Wed, 29 Sep 2021 05:27:08 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10121"; a="224940094" X-IronPort-AV: E=Sophos;i="5.85,331,1624345200"; d="scan'208";a="224940094" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2021 02:25:27 -0700 X-IronPort-AV: E=Sophos;i="5.85,331,1624345200"; d="scan'208";a="563136465" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.210.53]) ([10.254.210.53]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2021 02:25:21 -0700 Cc: baolu.lu@linux.intel.com, alex.williamson@redhat.com, jgg@nvidia.com, hch@lst.de, jasowang@redhat.com, joro@8bytes.org, jean-philippe@linaro.org, kevin.tian@intel.com, parav@mellanox.com, lkml@metux.net, pbonzini@redhat.com, lushenming@huawei.com, eric.auger@redhat.com, corbet@lwn.net, ashok.raj@intel.com, yi.l.liu@linux.intel.com, jun.j.tian@intel.com, hao.wu@intel.com, dave.jiang@intel.com, jacob.jun.pan@linux.intel.com, kwankhede@nvidia.com, robin.murphy@arm.com, kvm@vger.kernel.org, iommu@lists.linux-foundation.org, dwmw2@infradead.org, linux-kernel@vger.kernel.org, nicolinc@nvidia.com Subject: Re: [RFC 04/20] iommu: Add iommu_device_get_info interface To: David Gibson , Liu Yi L References: <20210919063848.1476776-1-yi.l.liu@intel.com> <20210919063848.1476776-5-yi.l.liu@intel.com> From: Lu Baolu Message-ID: <21cd618b-3ea6-dc89-cc79-e0927dece927@linux.intel.com> Date: Wed, 29 Sep 2021 17:25:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On 2021/9/29 10:52, David Gibson wrote: > On Sun, Sep 19, 2021 at 02:38:32PM +0800, Liu Yi L wrote: >> From: Lu Baolu >> >> This provides an interface for upper layers to get the per-device iommu >> attributes. >> >> int iommu_device_get_info(struct device *dev, >> enum iommu_devattr attr, void *data); > That fact that this interface doesn't let you know how to size the > data buffer, other than by just knowing the right size for each attr > concerns me. > We plan to address this by following the comments here. https://lore.kernel.org/linux-iommu/20210921161930.GP327412@nvidia.com/ Best regards, baolu