Received: from eggs.gnu.org ([2001:4830:134:3::10]:52778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azeTx-0006B7-I4 for qemu-devel@nongnu.org; Mon, 09 May 2016 02:15:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azeTr-0005S5-FW for qemu-devel@nongnu.org; Mon, 09 May 2016 02:15:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azeTr-0005S0-9f for qemu-devel@nongnu.org; Mon, 09 May 2016 02:15:47 -0400 Date: Mon, 9 May 2016 14:15:40 +0800 From: Peter Xu Message-ID: <20160509061540.GB25435@pxdev.xzpeter.org> References: <1462418761-12714-1-git-send-email-peterx@redhat.com> <1462418761-12714-9-git-send-email-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v6 08/26] intel_iommu: provide helper function vtd_get_iommu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Kiarie Cc: QEMU Developers , imammedo@redhat.com, rth@twiddle.net, ehabkost@redhat.com, jasowang@redhat.com, Marcel Apfelbaum , "Michael S. Tsirkin" , pbonzini@redhat.com, Jan Kiszka , rkrcmar@redhat.com, alex.williamson@redhat.com, wexu@redhat.com On Thu, May 05, 2016 at 12:29:13PM +0300, David Kiarie wrote: > On Thu, May 5, 2016 at 6:25 AM, Peter Xu wrote: > > Moves acpi_get_iommu() under VT-d to make it a public function. > > > > Signed-off-by: Peter Xu > > --- > > hw/i386/acpi-build.c | 7 +------ > > hw/i386/intel_iommu.c | 13 +++++++++++++ > > include/hw/i386/intel_iommu.h | 2 ++ > > 3 files changed, 16 insertions(+), 6 deletions(-) > > > > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c > > index 5d2d87b..b064bc2 100644 > > --- a/hw/i386/acpi-build.c > > +++ b/hw/i386/acpi-build.c > > @@ -2677,12 +2677,7 @@ static bool acpi_get_mcfg(AcpiMcfgInfo *mcfg) > > > > static bool acpi_has_iommu(void) > > { > > - bool ambiguous; > > - Object *intel_iommu; > > - > > - intel_iommu = object_resolve_path_type("", TYPE_INTEL_IOMMU_DEVICE, > > - &ambiguous); > > - return intel_iommu && !ambiguous; > > + return !!vtd_iommu_get(); > > } > > This is not consistent with what we have in the AMD IOMMU patches but > I guess this could be easily fixed. Yes, I suppose there might be some conflict with corrent AMD IOMMU patchset. The vtd_iommu_get() is further replaced by x86_iommu_get_default() in patch 21/22. I'll possibly do a clean-up on these overlaps in next spin. Sorry for the inconvenience. Would you please help have a look on patches 21/22 about introducing x86-iommu? To see whether that would be okay for further AMD integration. TIA. -- peterx