From patchwork Thu Feb 4 19:09:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Derrick X-Patchwork-Id: 12068425 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79251C433E0 for ; Thu, 4 Feb 2021 19:11:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 201E064F43 for ; Thu, 4 Feb 2021 19:11:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239651AbhBDTLC (ORCPT ); Thu, 4 Feb 2021 14:11:02 -0500 Received: from mga18.intel.com ([134.134.136.126]:31186 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239580AbhBDTKH (ORCPT ); Thu, 4 Feb 2021 14:10:07 -0500 IronPort-SDR: 86dATtHS4AYJAaY3CEI0mKI/SGuZse2Uph30xs4M/t/oOipt6aGMuk/hR4c3FR+jUXfv2EhoAw erqRwIoJuC7w== X-IronPort-AV: E=McAfee;i="6000,8403,9885"; a="168988743" X-IronPort-AV: E=Sophos;i="5.81,153,1610438400"; d="scan'208";a="168988743" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 11:09:23 -0800 IronPort-SDR: w0atSNMjsRFsy4Ai8n7QIQ836ydnbir2pqCTllgrKm/NZlsqJ4GYxh3J91sf2CDZ84DDCYr88w FTJCJe5k81Wg== X-IronPort-AV: E=Sophos;i="5.81,153,1610438400"; d="scan'208";a="434070462" Received: from sgklier-mobl1.amr.corp.intel.com (HELO jderrick-mobl.amr.corp.intel.com) ([10.212.165.190]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 11:09:21 -0800 From: Jon Derrick To: , Cc: Bjorn Helgaas , Lorenzo Pieralisi , David Woodhouse , Lu Baolu , Joerg Roedel , Nirmal Patel , Kapil Karkra , Will Deacon , Jon Derrick Subject: [PATCH v2 0/2] VMD MSI Remapping Bypass Date: Thu, 4 Feb 2021 12:09:04 -0700 Message-Id: <20210204190906.38515-1-jonathan.derrick@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The Intel Volume Management Device acts similar to a PCI-to-PCI bridge in that it changes downstream devices' requester-ids to its own. As VMD supports PCIe devices, it has its own MSI/X table and transmits child device MSI/X by remapping child device MSI/X and handling like a demultiplexer. Some newer VMD devices (Icelake Server) have an option to bypass the VMD MSI/X remapping table. This allows for better performance scaling as the child device MSI/X won't be limited by VMD's MSI/X count and IRQ handler. V1->V2: Updated for 5.12-next Moved IRQ allocation and remapping enable/disable to a more logical location V1 patches 1-4 were already merged V1, 5/6: https://patchwork.kernel.org/project/linux-pci/patch/20200728194945.14126-6-jonathan.derrick@intel.com/ V1, 6/6: https://patchwork.kernel.org/project/linux-pci/patch/20200728194945.14126-7-jonathan.derrick@intel.com/ Jon Derrick (2): iommu/vt-d: Use Real PCI DMA device for IRTE PCI: vmd: Disable MSI/X remapping when possible drivers/iommu/intel/irq_remapping.c | 3 +- drivers/pci/controller/vmd.c | 60 +++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 13 deletions(-)