[Devel] [PATCH RHEL COMMIT] x86/microcode/intel: hide warning on high order allocation for microcode area

Konstantin Khorenko khorenko at virtuozzo.com
Thu Sep 30 16:03:56 MSK 2021


The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after ark-5.14
------>
commit 6f750c94cc20156103c2798ed8a85d224606d758
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Thu Sep 30 16:03:56 2021 +0300

    x86/microcode/intel: hide warning on high order allocation for microcode area
    
    Microcode blob can require a page of 3rd order and loading microcode
    data is done using "wrmsr" asm instruction, so we cannot substitute
    kmalloc() with kvmalloc() here.
    
    Let's just hide the warning for this scenario, microcode update is a
    rare operation anyway.
    
    https://jira.sw.ru/browse/PSBM-86662
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
    
    (cherry picked from vz7 commit 0b26c4a6f25c ("x86/microcode/intel: hide warning
    on high order allocation for microcode area"))
    
    mFixes: 0a3e20990d36 ("x86/microcode/intel: hide warning on high order
    allocation for microcode area - addon")
    
    VZ 8 rebase part https://jira.sw.ru/browse/PSBM-127837
    
    Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn at virtuozzo.com>
    
    (cherry picked from vz8 commit cd2d68085f463a2b9c63a5498fe615989d86f760)
    Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 arch/x86/kernel/cpu/microcode/intel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 7e8e07bddd5f..90bd5698d148 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -108,7 +108,7 @@ static struct ucode_patch *memdup_patch(void *data, unsigned int size)
 	if (!p)
 		return NULL;
 
-	p->data = kmemdup(data, size, GFP_KERNEL);
+	p->data = kmemdup(data, size, GFP_KERNEL | __GFP_ORDER_NOWARN);
 	if (!p->data) {
 		kfree(p);
 		return NULL;


More information about the Devel mailing list