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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 6A657C282DA for ; Fri, 1 Feb 2019 16:34:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 401A0207E0 for ; Fri, 1 Feb 2019 16:34:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730944AbfBAQeq (ORCPT ); Fri, 1 Feb 2019 11:34:46 -0500 Received: from 8bytes.org ([81.169.241.247]:36742 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727057AbfBAQeq (ORCPT ); Fri, 1 Feb 2019 11:34:46 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id C8AB5273; Fri, 1 Feb 2019 17:34:43 +0100 (CET) Date: Fri, 1 Feb 2019 17:34:43 +0100 From: Joerg Roedel To: lantianyu1986@gmail.com Cc: Lan Tianyu , mchehab+samsung@kernel.org, davem@davemloft.net, gregkh@linuxfoundation.org, akpm@linux-foundation.org, nicolas.ferre@microchip.com, arnd@arndb.de, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, michael.h.kelley@microsoft.com, kys@microsoft.com, vkuznets@redhat.com, alex.williamson@redhat.com Subject: Re: [PATCH 2/3] HYPERV/IOMMU: Add Hyper-V stub IOMMU driver Message-ID: <20190201163443.GS32526@8bytes.org> References: <1548929853-25877-1-git-send-email-Tianyu.Lan@microsoft.com> <1548929853-25877-3-git-send-email-Tianyu.Lan@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1548929853-25877-3-git-send-email-Tianyu.Lan@microsoft.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Jan 31, 2019 at 06:17:32PM +0800, lantianyu1986@gmail.com wrote: > +config HYPERV_IOMMU > + bool "Hyper-V stub IOMMU support" This is not a real IOMMU driver, it only implements IRQ remapping capabilities. Please change the name to reflect that, e.g. to "Hyper-V IRQ Remapping Support" or something like that. > +static int __init hyperv_prepare_irq_remapping(void) > +{ > + struct fwnode_handle *fn; > + u32 apic_id; > + int i; > + > + if (x86_hyper_type != X86_HYPER_MS_HYPERV || > + !x2apic_supported()) > + return -ENODEV; > + > + fn = irq_domain_alloc_named_id_fwnode("HYPERV-IR", 0); > + if (!fn) > + return -EFAULT; Why does this return -EFAULT? I guess there is no fault happening in irq_domain_alloc_named_id_fwnode()... Joerg