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

Alexander Mikhalitsyn alexander.mikhalitsyn at virtuozzo.com
Thu Jun 3 20:37:31 MSK 2021


I have to resend this patch with fixup. 0a3e20990d36 x86/microcode/intel: hide warning on high order allocation for microcode area

Thanks to Andrey Zhadchenko

________________________________________
From: devel-bounces at openvz.org <devel-bounces at openvz.org> on behalf of Alexander Mikhalitsyn <alexander.mikhalitsyn at virtuozzo.com>
Sent: Wednesday, June 2, 2021 18:59
To: devel at openvz.org
Subject: [Devel] [PATCH 4/7] x86/microcode/intel: hide warning on high order    allocation for microcode area

From: Konstantin Khorenko <khorenko at virtuozzo.com>

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 commit 0b26c4a6f25cfd35a90a7d6dfa139cec30abb946)

VZ 8 rebase part https://jira.sw.ru/browse/PSBM-127837

Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn 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 6a99535d7f37..a47f1ea46139 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -155,7 +155,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_NOWARN);
        if (!p->data) {
                kfree(p);
                return NULL;
--
2.28.0

_______________________________________________
Devel mailing list
Devel at openvz.org
https://lists.openvz.org/mailman/listinfo/devel


More information about the Devel mailing list