From patchwork Thu Jun 2 06:32:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koba Ko X-Patchwork-Id: 1638219 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=e4w2f79e; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LDGRj5X58z9sGG for ; Thu, 2 Jun 2022 16:33:20 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nweOO-00031j-4J; Thu, 02 Jun 2022 06:33:12 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nweOJ-00030u-U0 for kernel-team@lists.ubuntu.com; Thu, 02 Jun 2022 06:33:07 +0000 Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id B10373F6FE for ; Thu, 2 Jun 2022 06:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1654151587; bh=2ln6eXTefQuycQyZtei5F+yfhruH43gm8WDWzxj9Uyg=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=e4w2f79eDrXw6/ahzhrwRfDT6Ue5CGFXnPP0vOHrrzf4F9mTg60Gkm5HFZfW+xM83 tXYAvBG8MLHxFCNMkiq8V1PamxTQ5pKdq0yjkjHxPjD0bah6173MXg3fxgThFyuZnC W6bpevSsVXMbm1n238cNW4UbD80sGYtOg+46pPZBNi2MNDxv1sSvp5rIbzGvLu3kMD ebVwgKeJiw3r9I4IaDFVMtTHKtoCmPfEufy68cMPAboxobei3bQbx84lQAbes0H7uX KB+qLiBiSsVOWfjApOEql+GjQgiLr9oXslBcSGU6h+svlk/7ZbGBaDaZCavRI8T0C0 u+5BMnrZNUC7g== Received: by mail-pf1-f197.google.com with SMTP id q12-20020a056a0002ac00b0051bb2e66c91so2170799pfs.4 for ; Wed, 01 Jun 2022 23:33:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2ln6eXTefQuycQyZtei5F+yfhruH43gm8WDWzxj9Uyg=; b=GV0h5wIyD/1uxuQ8Arb17g79scNhEBHFQEEQvrMnAQg4UaIWd0ejinkNR1it4v5I3p S5Uaj16GhXGcjp2z52IBSaJR1YIX+qQB59jRZwno+W+lkV1u4sTiRNnReVoEiNNO7Afa pjaTditXVpRi3o7nS0sZn26Le3ig9dN+n8dEiWEUWGf0oQZXyhpCYmOgGLFqVqKhTz5O Jm4ehIkaqVF2H14xJ1FiTtntMXRqwbR2ZzH7X3Zl5BL/409qzqD9tu018L/B8FNx395G xFSg8SMr+6pPoNw1iJafekLdIbmF1qpeAzzAttdsaXDta3jq4pHNDGz5L9J0EWajdhsx D5ZQ== X-Gm-Message-State: AOAM532lqTQN6QEfvjUSiQnKi5ppJyE4O4pwr3dFmt3+7BSni5ljT5jp vdTgigfBRYBbetdDW/3dhDBj48WO6j3bmkAIojFuNOy7jIuBoeQ3kOZ4v+0/2Rm9FIATxtnkCab SRyrayAxH6XtnBnd4Q3qisqmSNmV8yaeJr0faY7Ryww== X-Received: by 2002:a17:90b:38cc:b0:1e0:1c6f:d3e3 with SMTP id nn12-20020a17090b38cc00b001e01c6fd3e3mr38400103pjb.86.1654151586115; Wed, 01 Jun 2022 23:33:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyd5++DxGaKv0f2sr+tP592L595Q6qEvzupZSJW1Tn9gPnPoogG4RYZ1vhGV54o1q9+QPFARg== X-Received: by 2002:a17:90b:38cc:b0:1e0:1c6f:d3e3 with SMTP id nn12-20020a17090b38cc00b001e01c6fd3e3mr38400064pjb.86.1654151585689; Wed, 01 Jun 2022 23:33:05 -0700 (PDT) Received: from canonical.com (2001-b011-3815-1799-c8b3-3945-38ee-fba9.dynamic-ip6.hinet.net. [2001:b011:3815:1799:c8b3:3945:38ee:fba9]) by smtp.gmail.com with ESMTPSA id t21-20020aa79475000000b0051bbe085f16sm1227566pfq.104.2022.06.01.23.33.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 23:33:05 -0700 (PDT) From: Koba Ko To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2][SRU][J/U/OEM-5.17] PCI: vmd: Revert 2565e5b69c44 ("PCI: vmd: Do not disable MSI-X remapping if interrupt remapping is enabled by IOMMU.") Date: Thu, 2 Jun 2022 14:32:59 +0800 Message-Id: <20220602063259.43781-3-koba.ko@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220602063259.43781-1-koba.ko@canonical.com> References: <20220602063259.43781-1-koba.ko@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Nirmal Patel BugLink: https://bugs.launchpad.net/bugs/1976587 Revert 2565e5b69c44 ("PCI: vmd: Do not disable MSI-X remapping if interrupt remapping is enabled by IOMMU.") The commit 2565e5b69c44 was added as a workaround to keep MSI-X remapping enabled if IOMMU enables interrupt remapping. VMD would keep running in low performance mode. There is no dependency between MSI-X remapping by VMD and interrupt remapping by IOMMU. Link: https://lore.kernel.org/r/20220511095707.25403-3-nirmal.patel@linux.intel.com Signed-off-by: Nirmal Patel Signed-off-by: Lorenzo Pieralisi (cherry picked from commit c94f732e8001a860b42aa740b0a178a29907463c git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git) Signed-off-by: Koba Ko --- drivers/pci/controller/vmd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c index 5015adc04d191..94a14a3d7e555 100644 --- a/drivers/pci/controller/vmd.c +++ b/drivers/pci/controller/vmd.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -813,8 +812,7 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features) * acceptable because the guest is usually CPU-limited and MSI * remapping doesn't become a performance bottleneck. */ - if (iommu_capable(vmd->dev->dev.bus, IOMMU_CAP_INTR_REMAP) || - !(features & VMD_FEAT_CAN_BYPASS_MSI_REMAP) || + if (!(features & VMD_FEAT_CAN_BYPASS_MSI_REMAP) || offset[0] || offset[1]) { ret = vmd_alloc_irqs(vmd); if (ret)