[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220209122302.213882-3-ltykernel@gmail.com>
Date: Wed, 9 Feb 2022 07:23:02 -0500
From: Tianyu Lan <ltykernel@...il.com>
To: kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
wei.liu@...nel.org, decui@...rosoft.com, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
x86@...nel.org, hpa@...or.com, hch@...radead.org,
m.szyprowski@...sung.com, robin.murphy@....com,
michael.h.kelley@...rosoft.com
Cc: Tianyu Lan <Tianyu.Lan@...rosoft.com>,
iommu@...ts.linux-foundation.org, linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org, vkuznets@...hat.com,
brijesh.singh@....com, konrad.wilk@...cle.com, hch@....de,
parri.andrea@...il.com, thomas.lendacky@....com
Subject: [PATCH V2 2/2] x86/hyperv: Make swiotlb bounce buffer allocation not just from low pages
From: Tianyu Lan <Tianyu.Lan@...rosoft.com>
In Hyper-V Isolation VM, swiotlb bnounce buffer size maybe 1G at most
and there maybe no enough memory from 0 to 4G according to memory layout.
Devices in Isolation VM can use memory above 4G as DMA memory and call
swiotlb_alloc_from_low_pages() to allocate swiotlb bounce buffer not
limit from 0 to 4G.
Signed-off-by: Tianyu Lan <Tianyu.Lan@...rosoft.com>
---
arch/x86/kernel/cpu/mshyperv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 5a99f993e639..50ba4622c650 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -343,6 +343,7 @@ static void __init ms_hyperv_init_platform(void)
* use swiotlb bounce buffer for dma transaction.
*/
swiotlb_force = SWIOTLB_FORCE;
+ swiotlb_set_alloc_from_low_pages(false);
#endif
}
--
2.25.1
Powered by blists - more mailing lists