Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1206182pxb; Fri, 13 Nov 2020 06:57:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJy32YByG9sUlCWjl5w6UnYtScmHcKD+3LsulN1LywaCkkmutGdxWaC4dlN2HSuEaSLcROZk X-Received: by 2002:aa7:d601:: with SMTP id c1mr2835135edr.323.1605279449045; Fri, 13 Nov 2020 06:57:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605279449; cv=none; d=google.com; s=arc-20160816; b=In34Ja0qBses54glNwYhSEeNEcybaDFFkFXJLT85OZxdaOjEX09NOAAsikspJO2D4m yQHaLgzzLMCcrcA5/v65gP45NimOs55P+5Rtvs41X842EnOMtAOBJQiVl48bKZLTZIT4 dljdaGvncO56RbJYHg0XYCGBTeYCkd28FJ4gXZDtMNN1r7TkesTniEvLY8un2buOzKPb wPkaJlRlllWiinZf/QuL8ykgbC+tgZcuEWTABnZFcW0oI924APHSv2T4XrqO2hoymGfR DVoL45W/HxepsodVNeThew69pF21DFW6N4f0UVzYuTsQrg7EJdnEam+I/4zoo70H0m6p 2xYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=J3g1EmbPGYLgsVJyJusBp+ecz9drgGWXqp9ghw7oo04=; b=MfiJ1fbzix/2cx0LFq3+sSYHaKfldHwWgjet9NZN+Ks7mbUgJ9tE81DhRjenjwJ1r6 BYFm00oqTD2YRLDZN6Qmaqt1lnlrDJymkxfI67MJvkl+AtP+qT9R9JExGvCWQfOsoMH/ DB1Is9OPpNLmClpyLBWoPRSyEp9XfMqJTyZ3nVrqhPg7XhnN6kAsuda3fXHZURZt7DFG 3LuNkdjjCF8uA2V1kZT2h0/9ZsgGeU+tIBbnBISnR/RHXNRAhFZl1LQYoUrkmco1wf+7 qxcEu917Kpgi+WoIggLddiidQBl0qvmTJU6XK882/4JxM0Uk717wr+ftf1DEacqD0tsm NvBg== 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 p22si5742317ejw.31.2020.11.13.06.57.04; Fri, 13 Nov 2020 06:57:29 -0800 (PST) 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 S1726791AbgKMOxI (ORCPT + 99 others); Fri, 13 Nov 2020 09:53:08 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46961 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726324AbgKMOxH (ORCPT ); Fri, 13 Nov 2020 09:53:07 -0500 Received: by mail-wr1-f67.google.com with SMTP id d12so10168474wrr.13; Fri, 13 Nov 2020 06:53:07 -0800 (PST) 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:user-agent; bh=J3g1EmbPGYLgsVJyJusBp+ecz9drgGWXqp9ghw7oo04=; b=oc9l91eWAtIhZ02QQ8YnH+Vu9Mg80ncYBDbdOOtSmY7zsRV1MeiSo3FOkfOxAkMaIe ljnHFBCqrh0wHU3RuQdUYi8ZzEsxfl5ttEP4T3imbZQzaH5aFlGtap+Jare0WRH89MEz TwJlmFeIUpkuQQQrfQpzBLnOHAXU+GiHSLZSnz1z/R8JmeBEB0L1yRPP4gKJnVjlty4z HQdg+MWIQB0rmXqWleBNbZuMhP8RTpCj0Vb85/YMh6mhTV5FPCc2TYoQk6l/dUYXQ2dt qhlKDL+lkw7fDzign76PbJoMk312v7ui+7dAdB9AOAX9JxbzW0lLqPD/c7FfzDWr3PcV w2LA== X-Gm-Message-State: AOAM533dd6UWq6lGME/JKxc4T7jMWvQ1zzxIvN8+OH0pwT9ZH4GmNi/j +sE1HTqnC/1bv1F9hrO4VSg= X-Received: by 2002:adf:804b:: with SMTP id 69mr3963167wrk.274.1605279186710; Fri, 13 Nov 2020 06:53:06 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id a17sm12104587wra.61.2020.11.13.06.53.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 06:53:06 -0800 (PST) Date: Fri, 13 Nov 2020 14:53:04 +0000 From: Wei Liu To: Vitaly Kuznetsov 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 , Joerg Roedel , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Joerg Roedel , "open list:IOMMU DRIVERS" Subject: Re: [PATCH v2 04/17] iommu/hyperv: don't setup IRQ remapping when running as root Message-ID: <20201113145304.37w3h6xi7fmhgcg6@liuwe-devbox-debian-v2> References: <20201105165814.29233-1-wei.liu@kernel.org> <20201105165814.29233-5-wei.liu@kernel.org> <87ft5ey4rx.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ft5ey4rx.fsf@vitty.brq.redhat.com> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 12, 2020 at 04:27:14PM +0100, Vitaly Kuznetsov wrote: > Wei Liu writes: > > > The IOMMU code needs more work. We're sure for now the IRQ remapping > > hooks are not applicable when Linux is the root. > > Super-nitpick: I would suggest we always say 'root partition' as 'root' > has a 'slightly different' meaning in Linux and this commit message may > sound confusing to an unprepared reader. Fixed. > > > > > Signed-off-by: Wei Liu > > Acked-by: Joerg Roedel > > --- > > drivers/iommu/hyperv-iommu.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/iommu/hyperv-iommu.c b/drivers/iommu/hyperv-iommu.c > > index e09e2d734c57..8d3ce3add57d 100644 > > --- a/drivers/iommu/hyperv-iommu.c > > +++ b/drivers/iommu/hyperv-iommu.c > > @@ -20,6 +20,7 @@ > > #include > > #include > > #include > > +#include > > > > #include "irq_remapping.h" > > > > @@ -143,7 +144,7 @@ static int __init hyperv_prepare_irq_remapping(void) > > int i; > > > > if (!hypervisor_is_type(X86_HYPER_MS_HYPERV) || > > - !x2apic_supported()) > > + !x2apic_supported() || hv_root_partition) > > return -ENODEV; > > > > fn = irq_domain_alloc_named_id_fwnode("HYPERV-IR", 0); > > Reviewed-by: Vitaly Kuznetsov Thanks. Wei. > > -- > Vitaly >