Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1799666pxu; Tue, 24 Nov 2020 09:11:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWNRyl/qEQbu0HjdN89ewQ45owh/wfnRO2e+xkRtE/ICxyMG0H8hX5HvCaLmimigtIdrpp X-Received: by 2002:a17:906:d0c7:: with SMTP id bq7mr5339953ejb.404.1606237863751; Tue, 24 Nov 2020 09:11:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606237863; cv=none; d=google.com; s=arc-20160816; b=WzvWt9sZ9vETtzqvWPltIFaDTmCCct/V+k/5LEwyOd4JZAMvdysZwCWriJcmlAh9VD jcFi3ysv/1Mg5oaNL7/+xsWmLmKX3931EwDX9eFd4dSnw3DyPMCZowEnhyatQMQAuVFB l66lnX3Ex7hhJzVgmpzEizMUNyWDsosH6Z3WjjWiOBgfnVCRL4I54AFT1v5IDHq0zGL8 JMp8h3jV2mUKM4Xmx9IPCnb8eK7cJ1h4m0myCNPqqXmW+lIfMCb++5aZ9kRj5V+noJYH bk+kJJL34nvJC+hsrOSW2REjaDJ03DraCvZvPatSdYwrOcKCX4qKfJP1MRxldoRG5PmK 8ahA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=y+NYsCm9tGc6GjBoEZ7bi5tfuxFZISDvGMwp4S/BObI=; b=g9k7QP5W51UWEpd6v3MPfTk4dWshebhcfzoh6MvWlS4chtbj1K7DWe9xcBa+LYDi0q fpmbFktzn/7O1GeiQcYREpus7VTmgdnTqYFEou0ITlDyc/OxDSNcCGmA94ZubpPJY4Ge /0GIlV/xwzfse3C1QdjXEQil8Ou5I/hLnOlaMeKQox7UtSnWNr1ncEW5FlltkCVZu6Af X1U9GcE7nP6LPViYDAn/t+od9yrR2QKRqY99TkPPQtrjRSTBF6a1N3fYFoZwJSNUixhK T7yJ/51etc+lYS/IpOhND6KKiyGWqeRW/NhXmEVLBiQgPk82PYKfcHTQvSdvoISn4E5w CFCA== 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 g19si9162520edy.65.2020.11.24.09.10.38; Tue, 24 Nov 2020 09:11:03 -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 S2390661AbgKXRHz (ORCPT + 99 others); Tue, 24 Nov 2020 12:07:55 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:36401 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390452AbgKXRHx (ORCPT ); Tue, 24 Nov 2020 12:07:53 -0500 Received: by mail-wm1-f65.google.com with SMTP id a65so3645314wme.1; Tue, 24 Nov 2020 09:07:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y+NYsCm9tGc6GjBoEZ7bi5tfuxFZISDvGMwp4S/BObI=; b=EBgf8u8Lo/i6CX0Fc40uKpsu+VXWwCeaElDuH5kC/+5hCf4tqOmJ5xI4V0KZ/+EEXU jaVk1DiF14nLuwoeqsXntD8YPWMYBx4y+8R4dFlZcf0o3AvT4qeNqJSeTcnDbiy/oZeP At1CLjTm8xBnSSAZH9oe4BtZTPnzI0My5SFX8SCxvRpl1mVCZoDPG+meZgacOAqrtaiR r4NSzQPXlq5aT30dJBek/554PqWALrHj1njE2TfGr2MQWRFR+LLaDv7R/WmylXKz6AJ7 Rb3UKgclJcIZNR2lTxl0P56RH5O55Az+GTP3rz3bfA57cZuVQad9N+26aspDznYGNcf8 E66Q== X-Gm-Message-State: AOAM531r/73vI5hkh9sZCVi9NIkoWY83RgqFF93aS+TYg3ByKWWirq50 BHvIomKb8mV4Pq06FoU6fISrZiIWGeM= X-Received: by 2002:a1c:4b18:: with SMTP id y24mr5780733wma.154.1606237671954; Tue, 24 Nov 2020 09:07:51 -0800 (PST) Received: from liuwe-devbox-debian-v2.j3c5onc20sse1dnehy4noqpfcg.zx.internal.cloudapp.net ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id v20sm6419874wmh.44.2020.11.24.09.07.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 09:07:51 -0800 (PST) From: Wei Liu To: Linux on Hyper-V List Cc: virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , Wei Liu , Joerg Roedel , Vitaly Kuznetsov , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Joerg Roedel , iommu@lists.linux-foundation.org (open list:IOMMU DRIVERS) Subject: [PATCH v3 04/17] iommu/hyperv: don't setup IRQ remapping when running as root Date: Tue, 24 Nov 2020 17:07:31 +0000 Message-Id: <20201124170744.112180-5-wei.liu@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201124170744.112180-1-wei.liu@kernel.org> References: <20201124170744.112180-1-wei.liu@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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); -- 2.20.1