Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp439871pxb; Thu, 12 Nov 2020 07:31:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxSTha3qar+eNykNrcjS1QzZjzC1l6w0LaFCbGHEZHOTXS60GfdX/Qln9b2oKZ4DFcUpfP X-Received: by 2002:a50:ed96:: with SMTP id h22mr300758edr.336.1605195092187; Thu, 12 Nov 2020 07:31:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605195092; cv=none; d=google.com; s=arc-20160816; b=uaLH1rhqZLh63yijVODFmVHi4REfagFbn4xxApgS3xGDk0S/2SUi9mSqYWz1VJ5M0Q FfdDFCYH7TRnbJhiITVjjGidfTAFyjB6oVZckeFO8OOOYUg5DOYF79+u2ZrDsl22Petg lQ8sQ8HNEhAPbKR7P4vqWzQ5GJ+R2jmSeDiSKIPREwz8zXAK8JVFiscChjQ8TIT35f1s UXx28ey60X4vnCOj3fFVnu+HqEvLFdhBm801i7MAtNWIr9FFzAWx80wIrgQKLk2kHSYD PgotCdKwY2+RC0sBIOeNgN/54Y0h0Ie1ioKtMRZWIkjMOsMEsDTutiUqB2elLcbWz89N +1DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=EToCEhKZCbY5qYquKZLEYM9Zxm5PVC8drZdaa3o0iK0=; b=yZjjL9Xh1SjZ5N0CD1rhQ5F2P9yqZhj+dswK5L5mJKmKvK/HLLgHJ6PFqXyZEmT3eG uB9u6btwCJIL13UJlCBlY69DPupzRhiClIuKN7IkNbbLSdhXnxMbJ1wsnueP6uzKEtQR UQ8BvLnWhdEwWxyluUc6H0RISjiudfaWvjG/SBRtzQKBSN5qMJxNmnK5QMSixZADlaQX 0hoEqCcOXd9PCXSW1jnyjUR40VhOQp04xS4aAFA40cBCw86ckinP0a+++ypLMT/+6Tnu jdr2SCYwW0kzWO+Z7A7cy2P7RTO7vjM561O4cabJcv7qMJB+eh6ejVSq87xqMa6uIoou vvCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PuQBexc5; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f19si4333187edr.593.2020.11.12.07.31.08; Thu, 12 Nov 2020 07:31:32 -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=@redhat.com header.s=mimecast20190719 header.b=PuQBexc5; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728210AbgKLP1X (ORCPT + 99 others); Thu, 12 Nov 2020 10:27:23 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32632 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727932AbgKLP1W (ORCPT ); Thu, 12 Nov 2020 10:27:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605194839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EToCEhKZCbY5qYquKZLEYM9Zxm5PVC8drZdaa3o0iK0=; b=PuQBexc5JbCrk+JoA+JCE26rlSNwjZWYKXfp2JIqlFW2U0Q+t88K8pzkGhK0ymQVlV/tGX guXj3F218sMNcTOKRsrx1mh+KaLBihj3UZTh1BqNRC8pfLV3oX1fsv7nFVCpwN4Qbmje18 0roGsJf6NJ9LJngCi4+ySlIWN2/yKyM= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-219-B1Cr8ad8PiaViZd8iYbO_Q-1; Thu, 12 Nov 2020 10:27:17 -0500 X-MC-Unique: B1Cr8ad8PiaViZd8iYbO_Q-1 Received: by mail-wr1-f71.google.com with SMTP id p16so2095167wrx.4 for ; Thu, 12 Nov 2020 07:27:17 -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:in-reply-to:references:date :message-id:mime-version; bh=EToCEhKZCbY5qYquKZLEYM9Zxm5PVC8drZdaa3o0iK0=; b=t+D9FhdJ61Ib1bQ1XbmwrTPtySLoK8GAprrrRzUETWRsbActDrTaae2E+0F+zF5Yre TIyCPiEL9jBimmEqYbs2Q33XYtB8DvQM4+2d7mCUdjopzUR+c7eRnhACrkGhtZFjMC4n KvhcVMBD5nzVFXvKlfOMD4qv2wbXp/sY9OAganlp3c8GUPg23QyTYDy0l0uD6z9c0Lba 21wGvbcypY5Z2PS6q0X7+9mheCS+b6ZqgmezaSGOxss7pqsjM8h9chCwrm/GYV1DcYLN Vx7LUwIar9ooGYFEXnYLs/gI/D9xwI1AGNqTOuWETuiMrQngzOrfBCe8uN2eD7nvuJS+ YA+w== X-Gm-Message-State: AOAM531LKGW+udkR4qEFh7rfcC8MUuq2sYg2B/Oe8A6uNaaUVJKaDMNY nQj++rnE78moJtw9/Td0rLjQ0e2OzZzgmC6c7LEkBZ6B5M3EmhLPy1U8FQBA+2+esE1bUnDP6+Z 0MNXyn8jn2lROI/uzCY9X1vpz X-Received: by 2002:adf:e44f:: with SMTP id t15mr57351wrm.380.1605194836252; Thu, 12 Nov 2020 07:27:16 -0800 (PST) X-Received: by 2002:adf:e44f:: with SMTP id t15mr57335wrm.380.1605194836113; Thu, 12 Nov 2020 07:27:16 -0800 (PST) Received: from vitty.brq.redhat.com (g-server-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id a9sm7378333wrp.21.2020.11.12.07.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 07:27:15 -0800 (PST) From: Vitaly Kuznetsov To: Wei Liu , 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 , "open list:IOMMU DRIVERS" Subject: Re: [PATCH v2 04/17] iommu/hyperv: don't setup IRQ remapping when running as root In-Reply-To: <20201105165814.29233-5-wei.liu@kernel.org> References: <20201105165814.29233-1-wei.liu@kernel.org> <20201105165814.29233-5-wei.liu@kernel.org> Date: Thu, 12 Nov 2020 16:27:14 +0100 Message-ID: <87ft5ey4rx.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wei Liu writes: > The IOMMU code needs more work. We're sure for now the IRQ remapping > hooks are not applicable when Linux is the root. Super-nitpick: I would suggest we always say 'root partition' as 'root' has a 'slightly different' meaning in Linux and this commit message may sound confusing to an unprepared reader. > > 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); Reviewed-by: Vitaly Kuznetsov -- Vitaly