Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp295477pxt; Wed, 4 Aug 2021 23:18:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+6qWnFmPsxNgBBINZfy/IBUmU+p+Da219sIPEMuHKLAA2CiRsZbd230eqijLfqHoR+3WQ X-Received: by 2002:a05:6402:31a4:: with SMTP id dj4mr4419409edb.350.1628144286862; Wed, 04 Aug 2021 23:18:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628144286; cv=none; d=google.com; s=arc-20160816; b=jYZmw91h7j8WdQrEE5UoHdeU8SoQN9So4poCJVcgEJYIj/7o5+PIwvJLmiu8DRS/nS MngH0VsoLgXvQY4LJsQ3lWJf7I/02ts7Ttl12dPLm4gpElkGhFy3xIZIgy7PfDaPqJ90 MRWExYRKaE0Sx+mjCjf7BT7ZKCJWHQr025dbaMeZN+D5ux9UpK9hbGPgUjSHJ1bNo+I8 bta92rFCfSIL12NSZjAlUQB3tdpzcT1q271RaRarHAT4U06RtTvnUIzUCKAZUDhAAM6H vcnNSmdKSEdof167QMkn0BLiAdeHvb0GsR4dJ2/RAVSjToO3iAhefCrtd2J2pP7S4Vh5 ApxQ== 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=6SiA7bvcVHZqXbToRhUBDaU/vGFZJqAvL0Sam9hHdAI=; b=msBd0mlAqMglz6qV3Y8mcq9/FozfGrgjZu+gGZVCmOXr93jZLtssE1gI8a1qryrfDI PT1DCTMd+JrjhD8Ux6oD0JwmHGMv2n7uDSWFS25j2ppyf47HkAB53dBrTvHp/KoQUTXX mG149I8tSNrqVjp/o6K4pdXtW5uOeA3M2TOFxeh6oysTN4Vk5Nt/3DoIPemnMIqqB6qd ar4RYoUSIq/dYMP0FIqPtBdSsobjE1DOf61udz+rcvtXIZxr9aSe4a8MQDrl1p8u/rGy RIBaxE2LldkXd/fRP6wrJI09q0jMnwD28PtzMwVt8ZMBKeLNu2+KAlC7Re79wSKpIbxk Wyjg== 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o5si4862465eju.351.2021.08.04.23.17.42; Wed, 04 Aug 2021 23:18:06 -0700 (PDT) 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237318AbhHEAzA (ORCPT + 99 others); Wed, 4 Aug 2021 20:55:00 -0400 Received: from mga09.intel.com ([134.134.136.24]:27469 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237071AbhHEAyS (ORCPT ); Wed, 4 Aug 2021 20:54:18 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10066"; a="214027486" X-IronPort-AV: E=Sophos;i="5.84,296,1620716400"; d="scan'208";a="214027486" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 17:53:47 -0700 X-IronPort-AV: E=Sophos;i="5.84,296,1620716400"; d="scan'208";a="437617285" Received: from mjkendri-mobl.amr.corp.intel.com (HELO skuppusw-desk1.amr.corp.intel.com) ([10.254.17.117]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 17:53:45 -0700 From: Kuppuswamy Sathyanarayanan To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Peter Zijlstra , Andy Lutomirski , Bjorn Helgaas , Richard Henderson , Thomas Bogendoerfer , James E J Bottomley , Helge Deller , "David S . Miller" , Arnd Bergmann , Jonathan Corbet , "Michael S . Tsirkin" Cc: Peter H Anvin , Dave Hansen , Tony Luck , Dan Williams , Andi Kleen , Kirill Shutemov , Sean Christopherson , Kuppuswamy Sathyanarayanan , x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [PATCH v4 12/15] pci: Mark MSI data shared Date: Wed, 4 Aug 2021 17:52:15 -0700 Message-Id: <20210805005218.2912076-13-sathyanarayanan.kuppuswamy@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210805005218.2912076-1-sathyanarayanan.kuppuswamy@linux.intel.com> References: <20210805005218.2912076-1-sathyanarayanan.kuppuswamy@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Kleen In a TDX guest the MSI area must be shared with the host, so use a shared mapping. Signed-off-by: Andi Kleen Signed-off-by: Kuppuswamy Sathyanarayanan --- drivers/pci/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 9232255c8515..c6cf1b756d74 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -682,7 +682,7 @@ static void __iomem *msix_map_region(struct pci_dev *dev, unsigned nr_entries) table_offset &= PCI_MSIX_TABLE_OFFSET; phys_addr = pci_resource_start(dev, bir) + table_offset; - return ioremap(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE); + return ioremap_shared(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE); } static int msix_setup_entries(struct pci_dev *dev, void __iomem *base, -- 2.25.1