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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 877BFC4332F for ; Tue, 22 Feb 2022 16:00:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233883AbiBVQBO (ORCPT ); Tue, 22 Feb 2022 11:01:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233878AbiBVQBJ (ORCPT ); Tue, 22 Feb 2022 11:01:09 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65DE6163D7E; Tue, 22 Feb 2022 08:00:43 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 97CA868AFE; Tue, 22 Feb 2022 17:00:40 +0100 (CET) Date: Tue, 22 Feb 2022 17:00:39 +0100 From: Christoph Hellwig To: Tianyu Lan Cc: Christoph Hellwig , kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, hch@infradead.org, m.szyprowski@samsung.com, robin.murphy@arm.com, michael.h.kelley@microsoft.com, Tianyu Lan , iommu@lists.linux-foundation.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, vkuznets@redhat.com, brijesh.singh@amd.com, konrad.wilk@oracle.com, parri.andrea@gmail.com, thomas.lendacky@amd.com Subject: Re: [PATCH V2 1/2] Swiotlb: Add swiotlb_alloc_from_low_pages switch Message-ID: <20220222160039.GA13380@lst.de> References: <20220209122302.213882-1-ltykernel@gmail.com> <20220209122302.213882-2-ltykernel@gmail.com> <20220214081919.GA18337@lst.de> <4f433f07-05be-f81f-43e8-55c3f1af23b3@gmail.com> <20220214135834.GA30150@lst.de> <8d052867-ccff-f00f-7c89-cc26a4bfa347@gmail.com> <23f4a64d-5977-1816-8faa-fe7691ace2ff@gmail.com> <20220222080543.GA5412@lst.de> <00112505-4999-ac41-877e-49c4cc45312e@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00112505-4999-ac41-877e-49c4cc45312e@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 22, 2022 at 11:07:19PM +0800, Tianyu Lan wrote: > Thanks for your comment. That means we need to expose an > swiotlb_device_init() interface to allocate bounce buffer and initialize > io tlb mem entry. DMA API Current rmem_swiotlb_device_init() only works > for platform with device tree. The new API should be called in the bus > driver or new DMA API. Could you check whether this is a right way before > we start the work. Do these VMs use ACPI? We'd probably really want some kind of higher level configuration and not have the drivers request it themselves. 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 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89C34C433EF for ; Tue, 22 Feb 2022 16:00:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 393EB414C9; Tue, 22 Feb 2022 16:00:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xcEk-7h35iqi; Tue, 22 Feb 2022 16:00:48 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 12DC4414D1; Tue, 22 Feb 2022 16:00:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D6D8FC0021; Tue, 22 Feb 2022 16:00:47 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 22248C0011 for ; Tue, 22 Feb 2022 16:00:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id CAA55414C9 for ; Tue, 22 Feb 2022 16:00:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BXuYgt-8uUpP for ; Tue, 22 Feb 2022 16:00:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by smtp4.osuosl.org (Postfix) with ESMTPS id 20F28414E2 for ; Tue, 22 Feb 2022 16:00:45 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 97CA868AFE; Tue, 22 Feb 2022 17:00:40 +0100 (CET) Date: Tue, 22 Feb 2022 17:00:39 +0100 From: Christoph Hellwig To: Tianyu Lan Subject: Re: [PATCH V2 1/2] Swiotlb: Add swiotlb_alloc_from_low_pages switch Message-ID: <20220222160039.GA13380@lst.de> References: <20220209122302.213882-1-ltykernel@gmail.com> <20220209122302.213882-2-ltykernel@gmail.com> <20220214081919.GA18337@lst.de> <4f433f07-05be-f81f-43e8-55c3f1af23b3@gmail.com> <20220214135834.GA30150@lst.de> <8d052867-ccff-f00f-7c89-cc26a4bfa347@gmail.com> <23f4a64d-5977-1816-8faa-fe7691ace2ff@gmail.com> <20220222080543.GA5412@lst.de> <00112505-4999-ac41-877e-49c4cc45312e@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <00112505-4999-ac41-877e-49c4cc45312e@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: linux-hyperv@vger.kernel.org, brijesh.singh@amd.com, dave.hansen@linux.intel.com, hpa@zytor.com, kys@microsoft.com, Christoph Hellwig , hch@infradead.org, wei.liu@kernel.org, sthemmin@microsoft.com, x86@kernel.org, decui@microsoft.com, michael.h.kelley@microsoft.com, mingo@redhat.com, parri.andrea@gmail.com, thomas.lendacky@amd.com, Tianyu Lan , konrad.wilk@oracle.com, haiyangz@microsoft.com, bp@alien8.de, tglx@linutronix.de, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, vkuznets@redhat.com, robin.murphy@arm.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Tue, Feb 22, 2022 at 11:07:19PM +0800, Tianyu Lan wrote: > Thanks for your comment. That means we need to expose an > swiotlb_device_init() interface to allocate bounce buffer and initialize > io tlb mem entry. DMA API Current rmem_swiotlb_device_init() only works > for platform with device tree. The new API should be called in the bus > driver or new DMA API. Could you check whether this is a right way before > we start the work. Do these VMs use ACPI? We'd probably really want some kind of higher level configuration and not have the drivers request it themselves. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu