Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1112936pxu; Wed, 6 Jan 2021 12:38:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwh3map0Es1frKAN+riMfyxQddO64kpdEBqw76FpWjIjFCHPcDIDpCsIMjcDNKd4/HC0Adp X-Received: by 2002:a17:906:ce23:: with SMTP id sd3mr4072582ejb.69.1609965533229; Wed, 06 Jan 2021 12:38:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609965533; cv=none; d=google.com; s=arc-20160816; b=Lyb1CPIoP9qTaewbP7xtHnq3toYeImuRigQNgEKk0gjDYrRNjMYIV39B3NVdEu15CQ j174TH64HaH6KQVOSLk0TyacpeMsQW05mHNYV1Ua4sxLmU4qJfF+8BD+KtWR3fsZbbDx yvnQWtLtYtnd8rhzTMywrWKQ6kVKbb2bFLSm497pd+QWIVN8GHHeqfuvp53oCkMsC0dd hyc3cnanAsJFdsbKwxrp1Kq/GwaTC6hqnouECVK1eVmfi0Ueyjfj8c5/l4C9m8+sn0kc zd3H9/0tAGWflARhr6C2nTr+c+wU9rc4dafyEv440LkqSBo4Ke8toOo5LILdipcCgFXO ffQw== 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=GQluzZTp7lD/YrcOQEh7s8Jd7ZcB2kG9RiBi9si9unl5oehv7EFuvrqdXOWLXb0eOa +3aRhnaQOusA5/TZQWuTZ4t3vDaMbq4Ombd1NR0kvBlFck6o9BxRIk7muQX2jkSFaWZZ QnD05zIdXWDRShqIuazSfFyvg6hsQEdGI3FCeG3XMKsM9sawL/dcuP5SpAUF1p7dCGoT RCN8pCA0ndI6YgAAsiOUv8g1kpPMVTFx9Zrx7scSJu1xkUSra+H7BQZiMU6nLgm+SB5v e9FpzjRhSWNdiQgbeplpxvtoq5RxBtCNXBEFE/1USXVi0bTQPANXzsmaO9yYoqXXvQyA u59g== 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 i12si1291965edk.461.2021.01.06.12.38.29; Wed, 06 Jan 2021 12:38:53 -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 S1727787AbhAFUff (ORCPT + 99 others); Wed, 6 Jan 2021 15:35:35 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:35707 "EHLO mail-wr1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727115AbhAFUej (ORCPT ); Wed, 6 Jan 2021 15:34:39 -0500 Received: by mail-wr1-f53.google.com with SMTP id r3so3592665wrt.2; Wed, 06 Jan 2021 12:34:23 -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=OJvM+YLZ4lV7adtWlLZ5R+DfXBO16l1EmoyK/Qq3hUTUvARZHFnM5gONrwBiaO1pgn hKM7IgK/PeKPZJJj4El9ev3KRhmR94ruNkL8czj1ABryh9rlNCIjZEblGXexcOTZbVn1 LtA144Cby4qPG9dcLR7EPIyU8RSSMGChHkKTOfpOU5RGRMkpjnNpbPYRnNWy74dTVHok ks69xc5pB8jgvnlUkP6xDoQf31+KsdHbdCyX3IMbIvbnBiYRW1FX8VZd40USeG5CCPfp AWvQezi5bPeholMTJ3IqZnnJdtXxGNvkOioQGEdl2FwBalz/uJ0kSD10qTJSoFT94ksd R6NQ== X-Gm-Message-State: AOAM531fo43TD3APpdpmvktn23U2JMfmaVOsf0eSjVFdrDCf3o7SwLt6 HIKV8TCgSLO8M77l2YztR5jSy6K7tcA= X-Received: by 2002:adf:a495:: with SMTP id g21mr6160651wrb.198.1609965237426; Wed, 06 Jan 2021 12:33:57 -0800 (PST) Received: from liuwe-devbox-debian-v2.j3c5onc20sse1dnehy4noqpfcg.zx.internal.cloudapp.net ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id u9sm4499456wmb.32.2021.01.06.12.33.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 12:33:57 -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 , Will Deacon , iommu@lists.linux-foundation.org (open list:IOMMU DRIVERS) Subject: [PATCH v4 04/17] iommu/hyperv: don't setup IRQ remapping when running as root Date: Wed, 6 Jan 2021 20:33:37 +0000 Message-Id: <20210106203350.14568-5-wei.liu@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210106203350.14568-1-wei.liu@kernel.org> References: <20210106203350.14568-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