diff mbox series

[2/2] x86/hyperv: Make swiotlb bounce buffer allocation not just from low pages

Message ID 20220404131648.29209-3-tim.gardner@canonical.com
State New
Headers show
Series Azure: not enough RAM under 4GB for CVM | expand

Commit Message

Tim Gardner April 4, 2022, 1:16 p.m. UTC
From: Tianyu Lan <Tianyu.Lan@microsoft.com>

BugLink: https://bugs.launchpad.net/bugs/1967166

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@microsoft.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 arch/x86/kernel/cpu/mshyperv.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 3b073b4672e5..cb5af3025647 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -342,6 +342,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
 	}