Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp712659pxv; Fri, 9 Jul 2021 07:23:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPhJtzR1BlJ/c7Rqabkw9c9lHRJbDzwvEdVzB3EqmIp5nHWrEPNriWChImA5X7YQ1kzGl7 X-Received: by 2002:aa7:c711:: with SMTP id i17mr47255986edq.386.1625840607478; Fri, 09 Jul 2021 07:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625840607; cv=none; d=google.com; s=arc-20160816; b=RmvNRxdQQcbSiuXiAYBTqE5DOUJHEc8+gDqAg13qARV0/D565ow8YmAgKSHbxMoZ7y NZG5MtZ1Fs774tJIorJXY55CHMSUrw0fC8Ey6996kNKBSUlDrwiv2ItrecgQjQGh2ixV 7LV3soes+teLSrxSKwxTyB6jEfdnUciRkNT9vEYopACudO6JhOEGQOAlkBVQPnjdGa/y sPm+MGbK2zwt4YEuP+NIpg8o4Rgw2hcCJjizknbyFp/nxMWaM9JezG+Mt4y02Re2pI+y urnXFlVilEDp0rCsK3IqQ8xm8AaXmDNWRjMoMGtCnSADhNIVT8LjwkLM3sgZ3UhD0VRZ jvHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=27l4Uz/+uYVwD8O7yGXhjHeXe9a3hQtGW17m68tCa8g=; b=F4O2zFND4BGdjUmK9nlsE8OpOoge0vmxJLpN1gmX2FU/gv2SdFRDg9WZZMhfAxtuCA nG4axTg/jUiQZZR1xj1QIKZfFGtixSu2/vJ4P2yYqn8xclC4uC6f2VO76i3DxWyWHp/3 lmVuvSiMnWSV6oCUALdC0/V9tQXAt0WUTWMPt3wTzk2xNzneRmG5VpsWvE5Bz4RQmxvR lNjhFs0d8/WtcwVExPvc8x77gVRO8kAU9L97p90EjtGSSH9aR+rYOsy8Ym7JLjbdiaR3 KNrixUH8oJj+BmvPkunLWC+y1fau2/xAnUTBDOM+7yhhB6BerGjNnbBtCLYqhfQ9ob+c qr1Q== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si7671745edr.183.2021.07.09.07.23.04; Fri, 09 Jul 2021 07:23:27 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232095AbhGIOYB (ORCPT + 99 others); Fri, 9 Jul 2021 10:24:01 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:37488 "EHLO mail-wr1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231775AbhGIOYB (ORCPT ); Fri, 9 Jul 2021 10:24:01 -0400 Received: by mail-wr1-f48.google.com with SMTP id i94so12368862wri.4; Fri, 09 Jul 2021 07:21:16 -0700 (PDT) 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=27l4Uz/+uYVwD8O7yGXhjHeXe9a3hQtGW17m68tCa8g=; b=HHaluyR3FMRCnOnsksChXewoFrOZ/5bsOjX7CrHr3OyFiFhCfispg64twcZEhsAbB7 bsfiFdLODv9Nh7Yek8NpJtOnr2kWsp9JMiKK6cy7o641+ooY7Prlp+Fihf787d/13f0M qE4O4hsVAriJk6DyHrQERVf6UMnR+sQGn0H2q0A1Kd/v5jPVHQGSzAE9U00pSYFBj8rG +k0fS0hjTyQaQ3vRasl+WT7cV/Jp2w/lWS8W7p5JbgMws8Fbyezbg5MRklAG1ZaTf4Ib eWGZkE42dmzKc5QVtlPCaXvpRMmeWnoinjsiDpmjm0xoNBxj0hy6A3mhrDLvO7SNJ1l3 0kAQ== X-Gm-Message-State: AOAM532bc7VTY3Y5R0IdokYppyvIkijy3DvLwXp6AUV+JHJ2yHhiBCkM EvhKdl3bDDV/rk8XFq2Hc5bpj3zFLZA= X-Received: by 2002:adf:facf:: with SMTP id a15mr20539330wrs.39.1625840476073; Fri, 09 Jul 2021 07:21:16 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id i12sm5625277wrp.57.2021.07.09.07.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jul 2021 07:21:15 -0700 (PDT) Date: Fri, 9 Jul 2021 14:21:14 +0000 From: Wei Liu To: Lu Baolu Cc: Wei Liu , Linux on Hyper-V List , virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , kumarpraveen@linux.microsoft.com, pasha.tatashin@soleen.com, David Woodhouse , Joerg Roedel , Will Deacon , "open list:INTEL IOMMU (VT-d)" Subject: Re: [RFC v1 4/8] intel/vt-d: export intel_iommu_get_resv_regions Message-ID: <20210709142114.r5vhxmmp6mzq3vjl@liuwe-devbox-debian-v2> References: <20210709114339.3467637-1-wei.liu@kernel.org> <20210709114339.3467637-5-wei.liu@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 09, 2021 at 10:17:25PM +0800, Lu Baolu wrote: > On 2021/7/9 19:43, Wei Liu wrote: > > When Microsoft Hypervisor runs on Intel platforms it needs to know the > > reserved regions to program devices correctly. There is no reason to > > duplicate intel_iommu_get_resv_regions. Export it. > > Why not using iommu_get_resv_regions()? That calls into ops->get_resv_regions. In this patch series, get_resv_regions is hv_iommu_resv_regions, which wants to use intel_iommu_get_resv_regions when it detects the underlying hardware platform is from Intel. Wei.