Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp635870pxb; Thu, 5 Nov 2020 09:04:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJym2HbBdNu15C1xJP60YZTLH14CUEX9S0Pzbup8+sKT2rtocBIra6SLwnm90SKE6IhzdLl9 X-Received: by 2002:a05:6402:150:: with SMTP id s16mr3436003edu.304.1604595845260; Thu, 05 Nov 2020 09:04:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604595845; cv=none; d=google.com; s=arc-20160816; b=XnB/yhPZ2Sti42SsgbDKKFcE/YMfHXvjXToILjgr3G+JgS7jTW9cyUFKDNu3aLBDwH qTBFieUyB9mCGV3i9kXN5Xs/JnhoGIF8YuEUAavCP1mfbzhLT/y/LEGJe2XLq/L9t8+J bT+fUeOWR1/aZIE09X+d+vEpLPonMf3J4sLTfDfB2pNS5oFvspmra/xeYyo0VitHfS58 j/tmbbDYBeHwxxEnV8sl9gYMBMNK9W1spYi1IdcZyVZpyHn2yW+A0evfUCauZhdKevBS MH/gTGB0Rsg9Cv1F+tZq+R0QTDVVzDawgoggrCTSV/TIXkVE4fdZwJx2QWqBm8HWV8no zgFA== 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=Bh2EFPnmcn/x+bLcSdCEHI4hoqXZxmYUy4JjOwlCick=; b=JmGV87/88BK6lO0FxwO+PKRiYzm+rMhgfQzUWrgYg5GuNcyf8IKwUuYNuNHO4BcHJ/ eX654ElPUGy9oc9TxAxb29VW0moD3Pu0TkVvCcAXTZBEXS57c0wF89arcJqHf4Pn9ey9 HRoNFnKEwknJvnvBdR9aVUKtAgLX1TZrxw1j8aPev+Oze83E3S6dMqzQ0EcubDAdAkcw UizVBHE6UOZMz0OHQl2TjlwhT5VSV63TdiSgoI4M84R9BnSJPDAh9NIDOts6Z9FUMxT2 T7q4rskkYepuP1pKep+QfFjK+bbJZ8LvxxtRapojBfN/3SnA7dZExB8N2OjK244mZ34Y Axkg== 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 bx3si1512745ejb.709.2020.11.05.09.03.38; Thu, 05 Nov 2020 09:04:05 -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 S1731750AbgKEQ63 (ORCPT + 99 others); Thu, 5 Nov 2020 11:58:29 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:35821 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731654AbgKEQ6Y (ORCPT ); Thu, 5 Nov 2020 11:58:24 -0500 Received: by mail-wr1-f66.google.com with SMTP id n15so2605109wrq.2; Thu, 05 Nov 2020 08:58:22 -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=Bh2EFPnmcn/x+bLcSdCEHI4hoqXZxmYUy4JjOwlCick=; b=Zst5k6LKhFFRyiyTPPMkyWD2odiAVL/zloARX2x4YWuietCHrh0PgGEx8ij8kjG8zy bcXLOZ56wRy8kqbz5EuugPO5g7feWuO5ZSrjL8QVq+eSRxvZ64om+OEEssyjmRggQYHP F+IWkPGcE4kOcdbCzdiZfr7D7Q87WXZ/eAoqf84w7ZszCn7Eib2iKJscf5S+R4Hxa22B ExGMRuqSj7/XLCb72UDL6unlm+GfvAEwOrC4PtKMKVoftpFJi/Ijw3NfwiLGkKbjJ9cy wTVf6dugSLcQE5cfwfj/UhKCxs3ZOewirk3PBzIGmUOI4EwRBqmty3TJVlZcDYf3+FBJ WR/w== X-Gm-Message-State: AOAM533cnJ7DQSfm6OxCyKPzsAYMPtndgp8btTEU10MHDMXzvRFFdpQV JKV+YIzzmtZjn3mSAoEU0h+rKwGDIRA= X-Received: by 2002:adf:e447:: with SMTP id t7mr4024862wrm.384.1604595501442; Thu, 05 Nov 2020 08:58:21 -0800 (PST) Received: from liuwe-devbox-debian-v2.j3c5onc20sse1dnehy4noqpfcg.zx.internal.cloudapp.net ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id z5sm3350729wrw.87.2020.11.05.08.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 08:58:20 -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 , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Joerg Roedel , iommu@lists.linux-foundation.org (open list:IOMMU DRIVERS) Subject: [PATCH v2 04/17] iommu/hyperv: don't setup IRQ remapping when running as root Date: Thu, 5 Nov 2020 16:58:01 +0000 Message-Id: <20201105165814.29233-5-wei.liu@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201105165814.29233-1-wei.liu@kernel.org> References: <20201105165814.29233-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. 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); -- 2.20.1