Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2863593pxb; Fri, 8 Oct 2021 17:39:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJJ7OixZLT8s1+ORPuWoXqEwOF2MTrbt7PbqW1DpBtJKd08iYheNdMSRn53itj+LEL/9rd X-Received: by 2002:a17:90a:bd08:: with SMTP id y8mr14725307pjr.123.1633739987799; Fri, 08 Oct 2021 17:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633739987; cv=none; d=google.com; s=arc-20160816; b=y5ycp8p9aOeu/5Nbw2PzUY2V2Xct3jU7RaDZExbtLPIp7j2O/JltOPysAc27pQB0qB JORi95n4SX0bjTaqxUfP6msl0Fl7PPau8iJCdsF8ZBnESeNH5zeZ2fXeVv9cR5s0sUaZ /LpGIdXZrC8HHE+9xiroeE6CPK3RjulE05jRjcDM2+TIjyQlxFLg8IBfzzejs9zU3SYO iFXjPvqtHWfJ8wjBPJEvGnVZmV+yGS3p9sl/+nkrNiwUgIxZzk43wN+5RAjCQMwWz8fL F3wg3QHFcvnbRRGS5V00F+I7fv8Xs9iqdWP8RRmNVJAwMPVuBktYGlJbTFfriLpkwMem oRhQ== 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=/PkRwMH7oCDwmobK2dVfX/QIim5wgYvlGXxM2ixOMDo=; b=bThJhu6A3MmVAr/9ffUc00NjhBwbxu2lIRVFGSUh96Ni/wgPPel+rWROEsIugcT2ye Dp9I73BcC/lTuRVWLSCVUmPFl80PmhadanSFVjWuq2tbp4+jK+dO9koXM5WPB9O15MsX p6mnsnYdrT7siv0J74cruJTnCYJTDQ6q2WmBGtD2vQIAoUqGryRaw3LQKITgnE+lbtUk DakvSKwDw8SAmphWzTTjjO+DRvnu3kFGSYi7H2RQWmxOtduK3qCEZ1EEodIKq1iZjDoo Wfzd0+kCUGGM7wWUZniJvsn9Q4T2roy0p2o8Fjt9qmnP7raOX5+LaivefDmRxGr9rXek UUeA== 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 t13si1168842plg.272.2021.10.08.17.39.35; Fri, 08 Oct 2021 17:39:47 -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 S244323AbhJIAkw (ORCPT + 99 others); Fri, 8 Oct 2021 20:40:52 -0400 Received: from mga02.intel.com ([134.134.136.20]:5260 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244114AbhJIAk2 (ORCPT ); Fri, 8 Oct 2021 20:40:28 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10131"; a="213756554" X-IronPort-AV: E=Sophos;i="5.85,358,1624345200"; d="scan'208";a="213756554" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2021 17:37:51 -0700 X-IronPort-AV: E=Sophos;i="5.85,358,1624345200"; d="scan'208";a="624905416" Received: from dmsojoza-mobl3.amr.corp.intel.com (HELO skuppusw-desk1.amr.corp.intel.com) ([10.251.135.62]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2021 17:37:50 -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" , Paolo Bonzini , David Hildenbrand , Andrea Arcangeli , Josh Poimboeuf Cc: Peter H Anvin , Dave Hansen , Tony Luck , Dan Williams , Andi Kleen , Kirill Shutemov , Sean Christopherson , Kuppuswamy Sathyanarayanan , 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 v5 13/16] PCI: Mark MSI data shared Date: Fri, 8 Oct 2021 17:37:08 -0700 Message-Id: <20211009003711.1390019-14-sathyanarayanan.kuppuswamy@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009003711.1390019-1-sathyanarayanan.kuppuswamy@linux.intel.com> References: <20211009003711.1390019-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 --- Changes since v4: * Replaced ioremap_shared() with ioremap_host_shared() 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 0099a00af361..198ef6e6ca4f 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -596,7 +596,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_host_shared(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE); } static int msix_setup_entries(struct pci_dev *dev, void __iomem *base, -- 2.25.1