Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6181624rwd; Mon, 19 Jun 2023 03:43:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yl8naBjQIqxv329u396XlUdFxXLR7fAZzV2uhkufpMfQtQaL0zNITdkOq0nOpg1EXJ0S8 X-Received: by 2002:a92:d901:0:b0:33f:dfd1:fe4b with SMTP id s1-20020a92d901000000b0033fdfd1fe4bmr550257iln.7.1687171392094; Mon, 19 Jun 2023 03:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687171392; cv=none; d=google.com; s=arc-20160816; b=b51dBfK8Ecgoto9O0jlvaj90m6QhANISiLzsnZU8Z1v2U6jdqqL54ubF1qAoPva1xZ qssEhnKaTsTlKOAxWLTOoTGFTwnm257+M4ptd4CI+/ANMqv2gFSEx8AK/SKeEXsFhaNj 9Z0sMQDVt46DrqqKIOCQ1POPJ/xgsEQgdBvQsHjSCSCwLJAesUK4LMptosn1vZixlxjZ HMnxKdE1M24ughd7kDhs8yO0K/P55VM5SmA/uYVfMP66pebDSHSzMEjJVRxhwVmIvpwY zQkiDITUJs30gXvuDlSKu+3uvaFFHMZG4bEaZBxzk7UF2jZDjCcBb5ab/Ca/IPnNXbwk ztkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=uTfjYTBy79NwWDciliLTGzn0gqLejK829ij6CW8QMSs=; b=Q+wln6hIEGy/yIWy33kEddat29lLY0tOZrlJ55Gd42OvmrFNrbJIF8uowWhTYaFw/X Hp96O5UG6WNQMBqGEHrsabVU1KwKU4uiilPFsp13zwvP2FIHS8XC6r8vSpbxWPkJaCJQ l30fSXO8R+PmFo/w2ig/JCjA/CE6rGbA/uNgoZNTQnL79BlVenP3d7fNVCxlGpim4u6T qiLTooleL2v/nWWzJpuIMX78M0ktzjWdzC8nAIWY10cHL22mmPpCTGIg3hQ0vMt8s4/v qMUNq5Hivnn6K3s3VCztAtEyjGlrSYnDOV5qxhGXSaJf415Hq2bwf6NKxn9az4EDFU6d ojAw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b0053fee209655si20158096pgq.664.2023.06.19.03.42.59; Mon, 19 Jun 2023 03:43:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230522AbjFSKVT (ORCPT + 99 others); Mon, 19 Jun 2023 06:21:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230342AbjFSKVR (ORCPT ); Mon, 19 Jun 2023 06:21:17 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1CF339B; Mon, 19 Jun 2023 03:21:16 -0700 (PDT) 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 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 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 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.