Received: by 10.192.165.148 with SMTP id m20csp4517704imm; Tue, 8 May 2018 09:39:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrB2DjoGdcP5i/2Wv39D1GSXBxdOdtVhwVyKKq0Ob50kGRKIZzoW89Y5MtdlT1iSXzVfx5T X-Received: by 2002:a17:902:b702:: with SMTP id d2-v6mr37208627pls.228.1525797587221; Tue, 08 May 2018 09:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525797587; cv=none; d=google.com; s=arc-20160816; b=veIwmcIT2wzFH+yaWau1uPouaPfLnzEEaua/C+eOj1W2fIb8qARIVIXb59x2cWN5jf viiHBjX963UOj9MspG/iKK7irfckgB75dXxY6N+Xh2byotTAn5ho/Z4TgWObydm6oopT rAILpcgMbhcLVVf9lDo0bPC7+q8s2W/dx5Uey0V7EctMAyT/AQ/VOmJANU6wuvDc5NoX aGr1X3AkzHeK42P9Zcbx8dwqjzA6w35/FGuGIapm0lEKZXo3BhYK0nJylZPN2gB/PhmQ 58ShfauPpxUNIWK1PAx5XlkgILyloGmvf86HYdOPx7ds5glKaf6APdZP7KT5/2Sm1G21 1wjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=PbnNylLiZdv3g2hrkucELdgHOOG9GAzwO+soYhYx6tY=; b=yyWt4GDlNsbomTTfOEMi0mAAUOPoWk9rZZDvAcvygvwpC/JtQCM0y/P3+Ry9WCJ/wL hYNYmUruxtlkOGJf2myMqlxTAVLpbwiEfTr5NuwCzuRgDeKhpd9vCKRIyMqvyrgoPh8m mxQS8GJ5QlsoKcoVghr8EHckX2S9oiTWRKH1kmRnPBENCCXef70r2JHocB4FIClTU7Ic 19PCCxr55Z0YAe66sgMMQAdyxyCLJzaXOoIvy2jdqt2404eMdHOJywr44iO3qM9XmpjT WNb595F9BPVIo+VxAqxHqZ6QzcQu34K1yON071MzvpsatXbFmQ6sBPLyw/ZeE0pIYhb1 DbEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=Ndc1Vyvt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si24551676pfm.119.2018.05.08.09.39.32; Tue, 08 May 2018 09:39:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=Ndc1Vyvt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932841AbeEHQiM (ORCPT + 99 others); Tue, 8 May 2018 12:38:12 -0400 Received: from mail-bl2nam02on0087.outbound.protection.outlook.com ([104.47.38.87]:15824 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755462AbeEHQiI (ORCPT ); Tue, 8 May 2018 12:38:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=PbnNylLiZdv3g2hrkucELdgHOOG9GAzwO+soYhYx6tY=; b=Ndc1VyvtLP6Csg3/Fw/MYrFZruX/pOFo3mFhwf3j44gvl//DAi2ouzz+FPnfdocaFn0Gn7vCh8AT+/W4rWj0lxogVPAux0tOce5ICEkp+6xrMZMAoyq23Yc4jXx/u6xy/ELQ6WyCt+x78iZVye5BP/i67aQ7KigEbs1gqLNjM30= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Christian.Koenig@amd.com; Received: from [IPv6:2a02:908:1257:4460:1ab8:55c1:a639:6740] (2a02:908:1257:4460:1ab8:55c1:a639:6740) by CY4PR12MB1719.namprd12.prod.outlook.com (2603:10b6:903:121::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.16; Tue, 8 May 2018 16:38:01 +0000 Subject: Re: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches To: Stephen Bates , Bjorn Helgaas , Logan Gunthorpe , Alex Williamson Cc: "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "linux-rdma@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "linux-block@vger.kernel.org" , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt References: <20180423233046.21476-1-logang@deltatee.com> <20180423233046.21476-5-logang@deltatee.com> <20180507231306.GG161390@bhelgaas-glaptop.roam.corp.google.com> <479F2F93-903B-4A8A-8989-A4BD0E5E1471@raithlin.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <44488fb8-8105-b6f8-3438-720ee39d8520@amd.com> Date: Tue, 8 May 2018 18:37:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <479F2F93-903B-4A8A-8989-A4BD0E5E1471@raithlin.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [2a02:908:1257:4460:1ab8:55c1:a639:6740] X-ClientProxiedBy: PR2P264CA0035.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101:1::23) To CY4PR12MB1719.namprd12.prod.outlook.com (2603:10b6:903:121::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020);SRVR:CY4PR12MB1719; X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1719;3:2RGpLoipld0RPHAdFsCOJTfmnPkctJucE5DmbOXeKD6AqrgPN3Q7Nc2Wg5zWyVnwbRn/4umjeFUU6PeKoglo2UuFyrhzWtsN9EOX75g/hXzBCnsFCbSxnztEmoplWG6GZhl8DK+yg2NMkb96EyNzZWDnCyJ4qPKnxCfrNz+8baUPX/3Csnr2OY55y1fvVgl1oA5Ibc5tFnUFj4jy6lNNTl4NDHwA/HXbbZlhS6hrH5MBqRMAGfhsb4N+gC8B6+Ve;25:LKqMwCjdYsY0YwiqlaOZnM5lMahPaUyChdpreeLJXcI40N4MM5WvDXn7yWOI415/oSnbwMTuDhSIJBuiwrLN0Bj7hBxdWXOA+X6wDyG1YjrHxzj5hHPy8Q5rHiaIzhyT+QmgrsTHzwkMnzYM2+jIck0b2hOvOA27izs6M6DKYYVEFQbX0U6Hw/ou9pJ31biNih7sX7q6OqkvZlYfqaiHVV5gwND67ioVyNnH2unphGRxe/yCi//kWG99G/MUaI13wtnadNt6Ii5Tb7JNPDmmA3iHe3vAz8A0AceNlp4hX/mpOGR++8n+Xyjcoh7eiPk0xDV3sYleMf9aCUnIvx2J0w==;31:zfMuMkJcF2d+Q/6Y/BcnrueJpkmp+C1eiLs6mwcOJ2BXOIskTwmfE3FbKSWmfxWIkndkKQh09p6fUIXiuWeV/0gBrhs8E6FHkPYG0XGDCKhLIT0L8nqQIOi+9kfmJ7HISfniO1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ispam-Report-Test: UriScan:(192374486261705)(100405760836317); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011);SRVR:CY4PR12MB1719;BCL:0;PCL:0;RULEID:;SRVR:CY4PR12MB1719; X-Forefront-PRVS: 0666E15D35 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39860400002)(376002)(366004)(39380400002)(346002)(396003)(189003)(199004)(51444003)(59450400001)(52116002)(386003)(105586002)(305945005)(65826007)(31696002)(93886005)(67846002)(23676004)(2486003)(52396003)(52146003)(229853002)(478600001)(76176011)(6666003)(25786009)(72206003)(31686004)(106356001)(86362001)(64126003)(4326008)(8936002)(2906002)(5660300001)(1706002)(16526019)(97736004)(186003)(230700001)(8676002)(53936002)(47776003)(65956001)(65806001)(81166006)(7416002)(11346002)(2616005)(54906003)(476003)(446003)(36756003)(6116002)(81156014)(50466002)(6486002)(7736002)(6246003)(58126008)(68736007)(110136005)(316002)(486006)(46003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1719;H:[IPv6:2a02:908:1257:4460:1ab8:55c1:a639:6740];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxNzE5OzIzOnM0dkdCVE10Z0dFUWVtbWIrQlZQS1BsZksy?= =?utf-8?B?Ull0WXhhQ2FkZmFDUzlFTi95MWtMSGs4VkdWMjVTU2l4b096VU5vdnBjWlJV?= =?utf-8?B?c2V3dmxvbW83ZDNoZ2pEcExvUnMxbEt5NlA0bDQwL3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nMZQB/ICRrUZU4C8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1719;7:N3zq+FNksvBhb9DL7xLX5eR8UqZNHsrZwk2VZvt8SSIkbmPAoEwrvS/S+Bb7HmiiV0E+gsknTnxl/wsD6N7DGRvVX6JakbBn6CDIaIEpNqTKBqEu7nzip0rVjk2KWqSljTUmhrxTopsbba0cOaH8/5ehZHN8550u4QbxDJEC8Vrql0AHM1hXtexhp4TdfvjFGMIosgcsYvmouOgb/qDGRqhatk4JdA8gPLCEq3CtjIV+dcLqY9tuTYtkfdt7xatw;20:KfCY8XSmeCd61wamfu9aeJHGrWWmpIdvgu8yjBLxcdvKI4pOO+HXiUux9v0/kOScKVLwJWPJwWO8gI6tr2mM9YARhqvB3XrOKIZ+b1m6/H4ftcSxgawKnlup3yTbtHF134Ft6DC6NS1yC4vFRaifDkKqWfiW22+OOj+qhZJFCphL7cA8nv8+vTT74dsQrIwLZG5R92AON9/cdZJ3WDapIaMptX7N+lh6WGXdvV+emK8AN8VlNl2ROQ2u2+/PdLO1 X-MS-Office365-Filtering-Correlation-Id: 83b311af-2d32-44b7-10a9-08d5b5021294 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2018 16:38:01.4829 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83b311af-2d32-44b7-10a9-08d5b5021294 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1719 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 08.05.2018 um 16:25 schrieb Stephen Bates: > > Hi Christian > >> AMD APUs mandatory need the ACS flag set for the GPU integrated in the >> CPU when IOMMU is enabled or otherwise you will break SVM. > OK but in this case aren't you losing (many of) the benefits of P2P since all DMAs will now get routed up to the IOMMU before being passed down to the destination PCIe EP? Well I'm not an expert on this, but I think that is an incorrect assumption you guys use here. At least in the default configuration even with IOMMU enabled P2P transactions does NOT necessary travel up to the root complex for translation. It's already late here, but if nobody beats me I'm going to dig up the necessary documentation tomorrow. Regards, Christian. > >> Similar problems arise when you do this for dedicated GPU, but we >> haven't upstreamed the support for this yet. > Hmm, as above. With ACS enabled on all downstream ports any P2P enabled DMA will be routed to the IOMMU which removes a lot of the benefit. > >> So that is a clear NAK from my side for the approach. > Do you have an alternative? This is the approach we arrived it after a reasonably lengthy discussion on the mailing lists. Alex, are you still comfortable with this approach? > >> And what exactly is the problem here? > > We had a pretty lengthy discussion on this topic on one of the previous revisions. The issue is that currently there is no mechanism in the IOMMU code to inform VMs if IOMMU groupings change. Since p2pdma can dynamically change its topology (due to PCI hotplug) we had to be cognizant of the fact that ACS settings could change. Since there is no way to currently handle changing ACS settings and hence IOMMU groupings the consensus was to simply disable ACS on all ports in a p2pdma domain. This effectively makes all the devices in the p2pdma domain part of the same IOMMU grouping. The plan will be to address this in time and add a mechanism for IOMMU grouping changes and notification to VMs but that's not part of this series. Note you are still allowed to have ACS functioning on other PCI domains so if you do not a plurality of IOMMU groupings you can still achieve it (but you can't do p2pdma across IOMMU groupings, which is safe). > >> I'm currently testing P2P with GPUs in different IOMMU domains and at least with AMD IOMMUs that works perfectly fine. > Yup that should work though again I have to ask are you disabling ACS on the ports between the two peer devices to get the p2p benefit? If not you are not getting all the performance benefit (due to IOMMU routing), if you are then there are obviously security implications between those IOMMU domains if they are assigned to different VMs. And now the issue is if new devices are added and the p2p topology needed to change there would be no way to inform the VMs of any IOMMU group change. > > Cheers > > Stephen > >