From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0D9AC433ED for ; Fri, 14 May 2021 14:46:53 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 46D5760FDC for ; Fri, 14 May 2021 14:46:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46D5760FDC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mM7G6DlMzffyhvNgxcVPCyKDqwxLbOWWvACQe77C3k8=; b=SJJukTVWRh2PAjC6mPMgNJ1WE 42tIUzxBqimQ05UlZSrKUM/58RcDqyUZ3FTHYALfv5012nIvqoIOY1PXNbsm23RHbAoKqXk+Yz8gy YlU/t+Ij+7W5bMZalvVrX0xtXdhJXV9fPwF7KC2sSUyLQt1xedqsTcqZfJ0mUgwi1V4oaYlZDMlbb po4s4+60rlEv7TIdd9K4UaYZ7PXQQLbJcSumxj5JTsZaCdCzTYAX3XscM6PYtIJHwhB4yJ2LbEn4b d0gdi/jQDrCUrPxp2d3gnROPTiJ/UsoG/WPIYlLBIXfnU545Q3apYKTlGeUjcs1RIiN0UAC4TSD5s LyV2eTH/Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhZ3b-008KaE-O6; Fri, 14 May 2021 14:44:51 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZ3Y-008KZG-Py for linux-arm-kernel@desiato.infradead.org; Fri, 14 May 2021 14:44:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=5eRvTdeEB4OFHRkGyw/FepnZIZ1CoxvAuK8I7ThmVnY=; b=uAlOmyrUU9VZIWxvnvuHIZ5EDJ 9Z6xefMUvzfnZbq+NKu51UcGPit9H0/snqgCrPPaXwxo6ueoQ8FlSjiLiI/tUab6Cv+AnbZgPKUDq /978SlHWht1fzzjj7m3PDZHsZcC26tvqZLJJnb75fqxdtOvF6QmZNF5sGRuCGNpYdIf8nhFDk41jP VgIIxa/yhkoJyPRa/Slbpbx5fO49b5eFbjuoQ2K3UDx8YBp2BJ+xzv/V7eZ1bwOmwzCkBXCdgMqso J9J6gzgHR+5hT5CjkCNawtbC+ILpjE/XgquUd6HRUo12jJSeuxw9kweYAC3+lPKoFwsoF3NrKabT3 jD7/9X0w==; Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZ3W-00C3a0-10 for linux-arm-kernel@lists.infradead.org; Fri, 14 May 2021 14:44:47 +0000 Received: by mail-qt1-x834.google.com with SMTP id k10so8808787qtp.9 for ; Fri, 14 May 2021 07:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5eRvTdeEB4OFHRkGyw/FepnZIZ1CoxvAuK8I7ThmVnY=; b=nRkdu7k2xQ+YoBCvbAK24g2UZnBtDHdW77UuZWq1TzE1ce/i2vSxDI3PdfKI5Jsm9d JRRwdxdT0Bs39ZNeLlzVgpmazAiVXgM+zzr8ziiO7KgyEikyw7RpioDCezi1XKjxoGNP POVVlFsCMQ9vTbPgGl7v6QzGYQWWYI9OJewyjQmQ3WwsxgYI24sQ6TMMkjKiiYwVXW5x 8+ipkG/ael3qLVrlHufx0H2LgX6Tqpg0Z8QC+AqA4v8RN6S8q3zVrRqgoth1O4jzTlAj jwIHjEFqIPmdguSTbvmMbkB3B5avjXAM3F3JkUPS+VqLm2pQ4PjA0Yf2BtzRnkcYpGtT aUTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5eRvTdeEB4OFHRkGyw/FepnZIZ1CoxvAuK8I7ThmVnY=; b=gFoZRW9gTV6otGxO3FYHT5G3krrmpr8mrbhv+Sgn4KF9BTLMS9KOe4HFBNzHGPWIpo 531knDtGuVQ521ZG4q3hUct6slqoyf107D3JaRtxyCuhSMU3D5i5UywLlM+5c3CRiqtS a6Km1/5yd1kQ59uIlEt7h0Fi3kRkKwMQMIXya9a9lXfExOwamlyRwgxyaZWypJtiYMnT 0DmU9IoJAjdxFaKNQM8JGWWVHVaKLJNqbniMRblk0hBCOWT14Z1TiaRrZnhXQNWsEI0W fvd9gyx106qrtCT3ENYPcMWnXY1IwDmpcvUbEnfECdgqpnaRaJSwHekLc6j0FW0/uU5G WkvA== X-Gm-Message-State: AOAM530VvHd3uePpmu6zkUo25b73Mf53JlkgV2fg/UUaXHwgNlkRu/+N E9Tu6mmGjt0g8KKBl9LPTG9eHw== X-Google-Smtp-Source: ABdhPJxXWxgtyCMpLAybGYmVkwL/O8mVvUjGMWW8nfKwX9BgEHmZSiHUjb0Crr7tgdUgMOvc0inVcg== X-Received: by 2002:a05:622a:1493:: with SMTP id t19mr43119374qtx.147.1621003484390; Fri, 14 May 2021 07:44:44 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-47-55-113-94.dhcp-dynamic.fibreop.ns.bellaliant.net. [47.55.113.94]) by smtp.gmail.com with ESMTPSA id q7sm4886079qki.17.2021.05.14.07.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 07:44:43 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lhZ3T-007Shk-Ai; Fri, 14 May 2021 11:44:43 -0300 Date: Fri, 14 May 2021 11:44:43 -0300 From: Jason Gunthorpe To: "Tian, Kevin" Cc: Christoph Hellwig , Joerg Roedel , Alex Williamson , David Woodhouse , Lu Baolu , Will Deacon , Kirti Wankhede , "linux-arm-kernel@lists.infradead.org" , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" Subject: Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook Message-ID: <20210514144443.GN1096940@ziepe.ca> References: <20210510065405.2334771-1-hch@lst.de> <20210510065405.2334771-4-hch@lst.de> <20210510155454.GA1096940@ziepe.ca> <20210513120058.GG1096940@ziepe.ca> <20210514133939.GL1096940@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_074446_312608_7229D499 X-CRM114-Status: GOOD ( 16.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, May 14, 2021 at 02:28:44PM +0000, Tian, Kevin wrote: > Well, I see what you meant now. Basically you want to make IOASID > as the first-class object in the entire iommu stack, replacing what > iommu domain fulfill todays. Alternatively you transform domain into being a full fledged IOASID. I don't know which path works out to be a better patch series. > Our original proposal was still based on domain-centric philosophy > thus containing IOASID and its routing info only in the uAPI layer > of /dev/ioasid and then connecting to domains. Where do the domains come from though? You still have to hack hack all the drivers to create dummy domains to support this plan, and in the process PASID is pretty hobbled as an actual API if every PASID instance requires a wonky dummy struct device and domain. > btw are you OK with our ongoing uAPI proposal still based on domain > flavor for now? the uAPI semantics should be generic regardless of > how underlying iommu interfaces are designed. At least separate > uAPI discussion from iommu ops re-design. The most important thing is the uAPI, you don't get to change that later. The next most is the driver facing API. You can figure out the IOMMU layer internals in stages. Clearly IOASID == domain today as domain is kind of half a IOASID. When you extend to PASID and other stuff I think you have little choice but to make a full IOASID more first class. Dummy domains are a very poor substitute. In my experiance these kinds of transformations can usually be managed as "just alot of typing". Usually the old driver code structure can be kept enough to not break it while reorganizing. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel