From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4589C123 for ; Mon, 19 Jun 2023 10:21:16 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 944CF150C; Mon, 19 Jun 2023 03:21:59 -0700 (PDT) Received: from [10.57.86.121] (unknown [10.57.86.121]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 80CFF3F64C; Mon, 19 Jun 2023 03:21:14 -0700 (PDT) Message-ID: <90823b33-1f44-8789-9a38-282407fd9f15@arm.com> Date: Mon, 19 Jun 2023 11:20:58 +0100 Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: Question about reserved_regions w/ Intel IOMMU Content-Language: en-GB To: Jason Gunthorpe Cc: Alexander Duyck , "Tian, Kevin" , Alex Williamson , Baolu Lu , LKML , linux-pci , "iommu@lists.linux.dev" References: <520e2be4-726f-c680-c010-a308cdddbae0@arm.com> From: Robin Murphy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2023-06-16 19:59, Jason Gunthorpe wrote: > On Fri, Jun 16, 2023 at 05:34:53PM +0100, Robin Murphy wrote: >> >> If the system has working ACS configured correctly, then this issue should >> be moot; > > Yes > >> if it doesn't, then a VFIO user is going to get a whole group of >> peer devices if they're getting anything at all, so it doesn't seem entirely >> unreasonable to leave it up to them to check that all those devices' >> resources play well with their expected memory map. > > I think the kernel should be helping here.. 'go figure it out from > lspci' is a very convoluted and obscure uAPI, and I don't see things > like DPDK actually doing that. > > IMHO the uAPI expectation is that the kernel informs userspace what > the usable IOVA is, if bridge windows and lack of ACS are rendering > address space unusable then VFIO/iommufd should return it as excluded > as well. > > If we are going to do that then all UNAMANGED domain users should > follow the same logic. > > We probably have avoided bug reports because of how rare it would be > to see a switch and an UNMANAGED domain using scenario together - > especially with ACS turned off. > > So it is really narrow niche.. Obscure enough I'm not going to make > patches :) The main thing is that we've already been round this once before; we tried it 6 years ago and then reverted it a year later for causing more problems than it solved: https://lkml.org/lkml/2018/3/2/760 Thanks, Robin.