[Devel] [PATCH RHEL8 COMMIT] x86/kvm/vmx: Suppress warning on high-order allocation

Konstantin Khorenko khorenko at virtuozzo.com
Tue May 25 12:16:40 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.33
------>
commit d28f345aee082b6405ce8888b8697a786b9ced8e
Author: Jan Dakinevich <jan.dakinevich at virtuozzo.com>
Date:   Tue May 25 12:16:40 2021 +0300

    x86/kvm/vmx: Suppress warning on high-order allocation
    
    For L1TF mitigation vmx allocates 16 pages (4th order) and use them to
    move out the content of L1D cache. An attempt to use physically
    non-contiguous memory could break the algorithm.
    
    https://jira.sw.ru/browse/HCI-133
    
    Signed-off-by: Jan Dakinevich <jan.dakinevich at virtuozzo.com>
    
    (cherry-picked from vz7 commit a8c7017e8f9b ("x86/kvm/vmx: suppress warning on
    high-order allocation"))
    
    Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
    khorenko@: s/__GFP_NOWARN/__GFP_ORDER_NOWARN/
---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 4411eaf652a6..b1eb4b3cc547 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -256,7 +256,7 @@ static int vmx_setup_l1d_flush(enum vmx_l1d_flush_state l1tf)
 		 * This allocation for vmx_l1d_flush_pages is not tied to a VM
 		 * lifetime and so should not be charged to a memcg.
 		 */
-		page = alloc_pages(GFP_KERNEL, L1D_CACHE_ORDER);
+		page = alloc_pages(GFP_KERNEL | __GFP_ORDER_NOWARN, L1D_CACHE_ORDER);
 		if (!page)
 			return -ENOMEM;
 		vmx_l1d_flush_pages = page_address(page);


More information about the Devel mailing list