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 4A99BC433EF for ; Mon, 14 Feb 2022 08:19:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240782AbiBNITb (ORCPT ); Mon, 14 Feb 2022 03:19:31 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232671AbiBNITa (ORCPT ); Mon, 14 Feb 2022 03:19:30 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B72A25C41; Mon, 14 Feb 2022 00:19:23 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 38CEE68AA6; Mon, 14 Feb 2022 09:19:19 +0100 (CET) Date: Mon, 14 Feb 2022 09:19:19 +0100 From: Christoph Hellwig To: Tianyu Lan Cc: 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, hch@lst.de, parri.andrea@gmail.com, thomas.lendacky@amd.com Subject: Re: [PATCH V2 1/2] Swiotlb: Add swiotlb_alloc_from_low_pages switch Message-ID: <20220214081919.GA18337@lst.de> References: <20220209122302.213882-1-ltykernel@gmail.com> <20220209122302.213882-2-ltykernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209122302.213882-2-ltykernel@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org Adding a function to set the flag doesn't really change much. As Robin pointed out last time you should fine a way to just call swiotlb_init_with_tbl directly with the memory allocated the way you like it. Or given that we have quite a few of these trusted hypervisor schemes maybe add an argument to swiotlb_init that specifies how to allocate the memory.