Skip to contentSkip to conversation

x86/microcode/AMD: Increase microcode PATCH_MAX_SIZE

PATCH Applied John Allen 2 participants 2 messages Apr 9, 2020 – Apr 14, 2020

Subsystems (2)
lore
Share & tools
lore

John Allen

author
#0 lore raw

PATCH 1/1 x86/microcode/AMD: Increase microcode PATCH_MAX_SIZE

Future AMD cpus will have microcode patches that exceed the default 4K page size.

---

arch/x86/include/asm/microcode_amd.h +1 -1
index 6685e1218959..7063b5a43220 100644
@@ -41,7 +41,7 @@ struct microcode_amd {
 	unsigned int			mpb[0];
 };
 
-#define PATCH_MAX_SIZE PAGE_SIZE
+#define PATCH_MAX_SIZE (3 * PAGE_SIZE)
 
 #ifdef CONFIG_MICROCODE_AMD
 extern void __init load_ucode_amd_bsp(unsigned int family);
merge bot Applied
#1 lore raw
The following commit has been merged into the x86/urgent branch of tip:

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     bdf89df3c54518eed879d8fac7577fcfb220c67e
Gitweb:        https://git.kernel.org/tip/bdf89df3c54518eed879d8fac7577fcfb220c67e
Author:        John Allen <[email protected]>
AuthorDate:    Thu, 09 Apr 2020 10:34:29 -05:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Tue, 14 Apr 2020 17:34:46 +02:00

x86/microcode/AMD: Increase microcode PATCH_MAX_SIZE

Future AMD CPUs will have microcode patches that exceed the default 4K patch size. Raise our limit.

---
 arch/x86/include/asm/microcode_amd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/microcode_amd.h +1 -1
index 6685e12..7063b5a 100644
@@ -41,7 +41,7 @@ struct microcode_amd {
 	unsigned int			mpb[0];
 };
 
-#define PATCH_MAX_SIZE PAGE_SIZE
+#define PATCH_MAX_SIZE (3 * PAGE_SIZE)
 
 #ifdef CONFIG_MICROCODE_AMD
 extern void __init load_ucode_amd_bsp(unsigned int family);