Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp383972pxb; Fri, 16 Apr 2021 08:02:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5NGGLJr/iQgwFFkO6QMkpEcALih+erazmXzPobkIP8oM/7lutRZ3n8fyZhRhgZ72AOQhw X-Received: by 2002:adf:90f0:: with SMTP id i103mr9309289wri.318.1618585344326; Fri, 16 Apr 2021 08:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618585344; cv=none; d=google.com; s=arc-20160816; b=MetsTg/IjpQ/ITpUQ/OoZfwQFW1LpZJtcS4O2JmlmkGBxM/z3VfBZV8IWhDygyas1T 7idgvoJn8tCxYdvilCh5t3BNpfji7hW98YP6xF4uhk67DD2bjw6vsmwtIukuPkyNEIqC yi1S/7huvubHcVScmH1I+O7Eii3280O6HbgdKCh56NhxDTixqZUdoHq+AjUTBefNQ3LS Tsy8Uphll/uK+qPB+TvAc5DXp8ltnOC3aX/webJIYyLdRhQhkVCw4/j6StBFktwKCTzN psGDBpIkAfVjSeqGJua6rk6XD2HyrIZisc0iq9y5Js7MrPYFO3gO1uAVsPJsCwAF8xiE QPcw== 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 :cc:to:subject:dkim-signature; bh=h5MhNFa+G0GXPiMOp8zeJtDGBUydEX9X5pmRHMN7Eug=; b=aL9JeMwRHNWWap8Yd4eJktKB0DslGDDbCKZPIrAcjKK3zVE/uYDpdlZMpQ52Z7Ok5a VOL2F3/SW+ots1Gijh9v4KINsDLAKONC097t5809EwumU0Fr++YS26m0/144OThmoIQI zNlLF72MpT4dkgYMJHy359DVDvn96j8yPeOVPYGoAxHQEVcogPXAnscm8c9yEw8Qo3GB fqhBUfUd2fDAmJop9nfKKpSHmpkAtvvT9v3+JZDkHkqgMpDtgix++KrkaGqFvSLX0ll9 q+0hdxierFoDrmoPnYvPZ6e5UY7Rqx2l6NNY/ywplDPggXgHgXHL2Zu16XOLmdyTPryg OqOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="XR/e+NTT"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si353458ejq.60.2021.04.16.08.02.00; Fri, 16 Apr 2021 08:02:24 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="XR/e+NTT"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233916AbhDPPB2 (ORCPT + 99 others); Fri, 16 Apr 2021 11:01:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:43216 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236384AbhDPPB1 (ORCPT ); Fri, 16 Apr 2021 11:01:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618585262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h5MhNFa+G0GXPiMOp8zeJtDGBUydEX9X5pmRHMN7Eug=; b=XR/e+NTTTfwQ7jfhHBmwVOhMuPvL+4dR/AEzchWh2cw7pGaxVBgwFrM494YuMlztZ6PKTS q8SmLX0pQXA5JHSYfKXZBPECkxsMRORv4X0T5KdJGSbFjAV1et0hvpMF2jvZYn1Zu/I2KU D4swtJeoTfuAYk3bMQNJRhQpLGYUOXA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-600-Z4tRWluRNO-bDudkzhywfw-1; Fri, 16 Apr 2021 11:00:57 -0400 X-MC-Unique: Z4tRWluRNO-bDudkzhywfw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC79B107AFB6; Fri, 16 Apr 2021 15:00:54 +0000 (UTC) Received: from [10.36.113.21] (ovpn-113-21.ams2.redhat.com [10.36.113.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 34752107D5C1; Fri, 16 Apr 2021 15:00:47 +0000 (UTC) Subject: Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs To: Jason Gunthorpe Cc: "Liu, Yi L" , Jean-Philippe Brucker , "Tian, Kevin" , Jacob Pan , LKML , Joerg Roedel , Lu Baolu , David Woodhouse , "iommu@lists.linux-foundation.org" , "cgroups@vger.kernel.org" , Tejun Heo , Li Zefan , Johannes Weiner , Jean-Philippe Brucker , Alex Williamson , Jonathan Corbet , "Raj, Ashok" , "Wu, Hao" , "Jiang, Dave" References: <20210401134236.GF1463678@nvidia.com> <20210401160337.GJ1463678@nvidia.com> <4bea6eb9-08ad-4b6b-1e0f-c97ece58a078@redhat.com> <20210415230732.GG1370958@nvidia.com> <20210416140524.GI1370958@nvidia.com> <20210416143451.GJ1370958@nvidia.com> From: Auger Eric Message-ID: <6159ef35-c24e-105f-43f6-f90d481f4b24@redhat.com> Date: Fri, 16 Apr 2021 17:00:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210416143451.GJ1370958@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jason, On 4/16/21 4:34 PM, Jason Gunthorpe wrote: > On Fri, Apr 16, 2021 at 04:26:19PM +0200, Auger Eric wrote: > >> This was largely done during several confs including plumber, KVM forum, >> for several years. Also API docs were shared on the ML. I don't remember >> any voice was raised at those moments. > > I don't think anyone objects to the high level ideas, but > implementation does matter. I don't think anyone presented "hey we > will tunnel an uAPI through VFIO to the IOMMU subsystem" - did they? At minimum https://events19.linuxfoundation.cn/wp-content/uploads/2017/11/Shared-Virtual-Memory-in-KVM_Yi-Liu.pdf But most obviously everything is documented in Documentation/userspace-api/iommu.rst where the VFIO tunneling is clearly stated ;-) But well let's work together to design a better and more elegant solution then. Thanks Eric > > Look at the fairly simple IMS situation, for example. This was > presented at plumbers too, and the slides were great - but the > implementation was too hacky. It required a major rework of the x86 > interrupt handling before it was OK. > > Jason >