From: Jan Dakinevich <[email protected]>

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 <[email protected]>

Signed-off-by: Jan Dakinevich <[email protected]>

(cherry-picked from a8c7017e8f9b07fec07a5a87e8d7e569c03c3752)
Signed-off-by: Andrey Zhadchenko <[email protected]>
---
 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 4411eaf..ff68628 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_NOWARN, L1D_CACHE_ORDER);
                if (!page)
                        return -ENOMEM;
                vmx_l1d_flush_pages = page_address(page);
-- 
1.8.3.1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to