]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-6.1/iommu-vt-d-allocate-local-memory-for-page-request-qu.patch
Linux 5.15.156
[thirdparty/kernel/stable-queue.git] / queue-6.1 / iommu-vt-d-allocate-local-memory-for-page-request-qu.patch
1 From b5a1ba11b1c4eaff1247a620f252afd8b118874c Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Thu, 11 Apr 2024 11:07:43 +0800
4 Subject: iommu/vt-d: Allocate local memory for page request queue
5
6 From: Jacob Pan <jacob.jun.pan@linux.intel.com>
7
8 [ Upstream commit a34f3e20ddff02c4f12df2c0635367394e64c63d ]
9
10 The page request queue is per IOMMU, its allocation should be made
11 NUMA-aware for performance reasons.
12
13 Fixes: a222a7f0bb6c ("iommu/vt-d: Implement page request handling")
14 Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
15 Reviewed-by: Kevin Tian <kevin.tian@intel.com>
16 Link: https://lore.kernel.org/r/20240403214007.985600-1-jacob.jun.pan@linux.intel.com
17 Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
18 Signed-off-by: Joerg Roedel <jroedel@suse.de>
19 Signed-off-by: Sasha Levin <sashal@kernel.org>
20 ---
21 drivers/iommu/intel/svm.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
25 index 03b25358946c4..cb862ab96873e 100644
26 --- a/drivers/iommu/intel/svm.c
27 +++ b/drivers/iommu/intel/svm.c
28 @@ -71,7 +71,7 @@ int intel_svm_enable_prq(struct intel_iommu *iommu)
29 struct page *pages;
30 int irq, ret;
31
32 - pages = alloc_pages(GFP_KERNEL | __GFP_ZERO, PRQ_ORDER);
33 + pages = alloc_pages_node(iommu->node, GFP_KERNEL | __GFP_ZERO, PRQ_ORDER);
34 if (!pages) {
35 pr_warn("IOMMU: %s: Failed to allocate page request queue\n",
36 iommu->name);
37 --
38 2.43.0
39