Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp228905pxb; Wed, 20 Jan 2021 05:46:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSRlEPDR3nOUg2zA7xSUuHY5wxL9tfnaC350nj5Xl5kNJpUICRoBfp0oRiG6ba5SDXztDN X-Received: by 2002:aa7:c9c9:: with SMTP id i9mr7351298edt.160.1611150408191; Wed, 20 Jan 2021 05:46:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611150408; cv=none; d=google.com; s=arc-20160816; b=lLSv/UP28269MDeavbtGSfNJRaVzPKqvF68hiA9I9cvx2Ho12PlNHa9+Z5kQMPjJKV gAuF4Qa5wp2ZY6jieEycNaLDXw2iRDUBLqqAeWjmMa9LUjWj9/hYXvj/wNf1NGBGij4U aachSQIqQEi3xh5m7vkdgt7mEnlZPL0mrt2iOU5xtQh1JQAmMwegOYBDQccRy6Cb3eW3 bTIyYqZ0mGmav4OCaCo7vBZSk3QyG0OEN/WFljuuSZEdhKb11ZfjiPyvF20QZU+vOeQc m5eIzLUNb1UVcuttsoRad4+R+8FZfWeVGQqMN+gzOAxyBbFsUgPlbdaJQYdh9VlEw81/ YMvQ== 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=iQMtgq3pUcrjj3NVCdkiQSStjiewGBjHdwkFAPCFR6A=; b=i6SEfQAGT7gTDy2F9oQWGNGFaIEtl/1Jw5pb+nfY6Rg6PTZHgcPlt6nV02jQSLzHzJ Buvuq5hsD8cX21Fr418TzJwxyQxDuSW366ppzGR7CxnE/cFUvgaQ/YwbffGR75ErtOdq /1WIlmxIBDRNi1reFUXPq6WFnzq9YAqHUn7JpRH1+ZIfcm093IHs99fKD3+IRy8lxVaH MGWl3BQ4cU03gMWY9JhSDZzUBMaySepwdY4NcrkJVKub4FOI69bJlyma9MunZPsEstS0 EQomLzfhWDuOs7KVGivrsHxQp1sDcQr6Lw43R5wELNkc1/eI7R+dBiF7ke9xjYr5UTBo fz/g== 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 c7si869452edv.311.2021.01.20.05.46.24; Wed, 20 Jan 2021 05:46:48 -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 S2389283AbhATNB6 (ORCPT + 99 others); Wed, 20 Jan 2021 08:01:58 -0500 Received: from mail-ej1-f42.google.com ([209.85.218.42]:41140 "EHLO mail-ej1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733278AbhATMMt (ORCPT ); Wed, 20 Jan 2021 07:12:49 -0500 Received: by mail-ej1-f42.google.com with SMTP id g12so33219073ejf.8; Wed, 20 Jan 2021 04:12:30 -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=iQMtgq3pUcrjj3NVCdkiQSStjiewGBjHdwkFAPCFR6A=; b=NjthebAkuSs6fArMRYIQbeZeoiI0WOi/p/enyzCB9a7pwX3ggTKxLrZi5YVBBVyW/L 4c7C6WCkZzmYJADu0ZBBil4/m8Itqf5TUeQ0z1h2gV0oErinqSeKNzv2QoCSAz00o/lf YUxUmnRjbT7budrA5EyX4ws3ZiDdxs4b/yYDyJJ/0lMAD2GB7tIX8LwvtmEYZjdszPg9 xMqwhOCLUXO8exID966SQqUbQ9r1BaQIJylhGvFJskN8T1ROiBYd4DEgzTAi9k3QHfSO nKtbiaQLjzEYbKmdcTwCzOwGorAkg3hA2ysXmXiB/CyBSMtLdn1LCqHGVER9AQCJQXRG 9iRg== X-Gm-Message-State: AOAM531MbSoy5uBGlzLB+WZhUNJMv65PEICaKN+AkDy1FrAGpyXFB5Kr W87NG4S+Wkh1VPQSDKBiAsYPA3qxKUo= X-Received: by 2002:adf:e512:: with SMTP id j18mr8953978wrm.52.1611144065620; Wed, 20 Jan 2021 04:01:05 -0800 (PST) Received: from liuwe-devbox-debian-v2.j3c5onc20sse1dnehy4noqpfcg.zx.internal.cloudapp.net ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id x17sm3747671wro.40.2021.01.20.04.01.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 04:01:05 -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 , pasha.tatashin@soleen.com, Wei Liu , Joerg Roedel , Vitaly Kuznetsov , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Joerg Roedel , Will Deacon , iommu@lists.linux-foundation.org (open list:IOMMU DRIVERS) Subject: [PATCH v5 04/16] iommu/hyperv: don't setup IRQ remapping when running as root Date: Wed, 20 Jan 2021 12:00:46 +0000 Message-Id: <20210120120058.29138-5-wei.liu@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210120120058.29138-1-wei.liu@kernel.org> References: <20210120120058.29138-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 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; fn = irq_domain_alloc_named_id_fwnode("HYPERV-IR", 0); -- 2.20.1