Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp340828pxb; Wed, 20 Jan 2021 08:14:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJX+eWpO7yf6M5IbcjSgyD7DBoyJT3i+s+zcKMsmGYk3cYy/MFMIdqs3z5bZHD0cwcNXrf X-Received: by 2002:aa7:cfda:: with SMTP id r26mr7733131edy.142.1611159249088; Wed, 20 Jan 2021 08:14:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611159249; cv=none; d=google.com; s=arc-20160816; b=S75UfdWqTDtsu7kzzAYvRiVtfjjl0HgNOgU2W0ydfMQ/90oWv4FVLor5ED5cHBJwFc 706MzZytqA+VMbXygpHa6Qv6biXXHmnb4l8qdncyo0UGfXRIEkEBEv7eEbbqIS8/SbVt N4qsdfokkqsinSjGADBUseK7MSIgGe3r8orzjJPdQVaWeCGX9kkGfa/IPggHKqCEv0Cp klr6vZmPXGRWx11HYpZCfzZeK3Rt29X5Mx/q3UBJjEybEy9D7+xGpFth0BnxTMOara7c o/W5V7mg5Ubyrzmx8ZvDqddBd2W6bYkern+YgP6osbzGcN5vBF0d8KcLOYPAMjAp/etQ fBmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=uFPoWmdT1E7447c/foHDjqNJuO8UPeUXJAj8ZTCeNuI=; b=ffTswriRFCrf+3n4+xaXeGuWdvAJBizZsjYFI+vCf+yBhoghvFgKFI9/W0dUbeDck9 dKAY74tNVWtokmCCgaBNJU+VmYK9UohysABCxbW5g9QLHi4sI+bTlBhtnWUAn0oxnkhN fzxBB0dGrAsm9ewI2FB6trsB1OY8F3HDPiLGy88Ja64953SRWLm6FJHxXU24JyRuIG7r Pg/DexdToyvMAWcJ0HDNLLmupnyylv8lBjczgh1eNyUSi8419/nlT4Wsu6KRFjg71vt9 dsslP7eo9k32jUo+5pp6h2zNCEzdp6yZ49IoeuVaEvkHv/gOHSudVIPYrPWTEXzz0RdY vTag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=bNp4m8GX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t24si813592ejr.275.2021.01.20.08.13.44; Wed, 20 Jan 2021 08:14:09 -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; dkim=pass header.i=@soleen.com header.s=google header.b=bNp4m8GX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390783AbhATQNK (ORCPT + 99 others); Wed, 20 Jan 2021 11:13:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391242AbhATQJ5 (ORCPT ); Wed, 20 Jan 2021 11:09:57 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68BB3C0613CF for ; Wed, 20 Jan 2021 08:09:11 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id b2so26387376edm.3 for ; Wed, 20 Jan 2021 08:09:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uFPoWmdT1E7447c/foHDjqNJuO8UPeUXJAj8ZTCeNuI=; b=bNp4m8GXBuiU/FXyjO9D9cA/C4gIGIPznUcpKtSxPEKyebwvVQ+aRwdeBURGW60Aqn LWDM8IY14JaXyGVpmy9pspE7lfObh3UXUk1T9JUoE9m742jY/UWqwZOuCBJ1bPyIODGl UnlPbfbmqFegwGszXH5A2WM1t7WLON4F/hTTf41tPfVOHi9uvgUn8pBT7w/CdD4OSxCR Pj4XoIeByZmeoQNQ4FhMnueL2wZ9/ttGENz2s0DHc9xIW18UNCzE7rgOV30lEB4IWM6K z43ISZVwDPuNuqM8j3RZAlGmRUAK0i/ai2ThrTF7kmw/zPRYVf/biTfeZ/ArEDWa+95U iDfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uFPoWmdT1E7447c/foHDjqNJuO8UPeUXJAj8ZTCeNuI=; b=T821vr5SP6sj7VcmO+8pyXKh7/54g2kaQcoVLERD4KRyr7Q5EtWR6ArzSnNxZAIX2w VO30foH994bKMjIhFawSjoIhQeBe9/NPD3ex5A/zHnAm5tKdy47if2pFf02wQgjHr2oI MDm3Qvn8deU0qTy0IrJnHHbYvMDgnuPXhsYeFdxyPqBYoh2XqYy0hKmKUhRxQUmrojFB JcVrwF/Z8jcYpJA0+l5Gfwew60/th1o73xWAgdTNek71Nkaq/aymTcPi9jMI9e2RMNda OkRxekFViCjVy2PHcAJZgGvRS2Ab/Zfzq8CgTet+1QWwqDIljwJaP63tIssW8z2Thscs o5Nw== X-Gm-Message-State: AOAM533DzQb9159V1PhuOKPnBByD7UITYGfbmJYV4mukLgkjyDoQ2UF6 n72hQBeFu1avBegAw2LRumXLgtM01P/qnmwsuWFYcQ== X-Received: by 2002:aa7:d803:: with SMTP id v3mr7685979edq.153.1611158950213; Wed, 20 Jan 2021 08:09:10 -0800 (PST) MIME-Version: 1.0 References: <20210120120058.29138-1-wei.liu@kernel.org> <20210120120058.29138-5-wei.liu@kernel.org> In-Reply-To: <20210120120058.29138-5-wei.liu@kernel.org> From: Pavel Tatashin Date: Wed, 20 Jan 2021 11:08:34 -0500 Message-ID: Subject: Re: [PATCH v5 04/16] iommu/hyperv: don't setup IRQ remapping when running as root To: Wei Liu Cc: Linux on Hyper-V List , virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , Joerg Roedel , Vitaly Kuznetsov , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Joerg Roedel , Will Deacon , "open list:IOMMU DRIVERS" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2021 at 7:01 AM Wei Liu wrote: > > The IOMMU code needs more work. We're sure for now the IRQ remapping > hooks are not applicable when Linux is the root partition. > > Signed-off-by: Wei Liu > Acked-by: Joerg Roedel > Reviewed-by: Vitaly Kuznetsov > --- > 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 1d21a0b5f724..b7db6024e65c 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" > > @@ -122,7 +123,7 @@ static int __init hyperv_prepare_irq_remapping(void) > > if (!hypervisor_is_type(X86_HYPER_MS_HYPERV) || > x86_init.hyper.msi_ext_dest_id() || > - !x2apic_supported()) > + !x2apic_supported() || hv_root_partition) > return -ENODEV; Reviewed-by: Pavel Tatashin