mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: John Allen <john.allen@amd.com>,
	bp@alien8.de, linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] x86/microcode/AMD: Increase microcode PATCH_MAX_SIZE
Date: Fri, 21 Jul 2023 06:47:39 +0200	[thread overview]
Message-ID: <748e8be1-d7e6-c0a3-b83b-a8475873cc4c@kernel.org> (raw)
In-Reply-To: <20230720202813.3269888-1-john.allen@amd.com>

On 20. 07. 23, 22:28, John Allen wrote:
> Future AMD cpus will have microcode patches that exceed the current
> limit of three 4K pages. Increase substantially to avoid future size
> increases.

Hi,

so with my current distro (openSUSE TW):
$ zgrep NODES_SHIFT /proc/config.gz
CONFIG_NODES_SHIFT=10

This:

static u8 amd_ucode_patch[MAX_NUMNODES][PATCH_MAX_SIZE];

is now 32M instead of 12M. That is a complete waste on my _one_ node 
system. Can we make amd_ucode_patch dynamic first, depending on 
num_online_nodes()?

> Signed-off-by: John Allen <john.allen@amd.com>
> Cc: stable@vger.kernel.org
> ---
>   arch/x86/include/asm/microcode_amd.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/microcode_amd.h b/arch/x86/include/asm/microcode_amd.h
> index e6662adf3af4..e3d5f5ae2f46 100644
> --- a/arch/x86/include/asm/microcode_amd.h
> +++ b/arch/x86/include/asm/microcode_amd.h
> @@ -41,7 +41,7 @@ struct microcode_amd {
>   	unsigned int			mpb[];
>   };
>   
> -#define PATCH_MAX_SIZE (3 * PAGE_SIZE)
> +#define PATCH_MAX_SIZE (8 * PAGE_SIZE)
>   
>   #ifdef CONFIG_MICROCODE_AMD
>   extern void __init load_ucode_amd_bsp(unsigned int family);

thanks,
-- 
js
suse labs


  reply	other threads:[~2023-07-21  4:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 20:28 John Allen
2023-07-21  4:47 ` Jiri Slaby [this message]
2023-07-21  7:38   ` Borislav Petkov
2023-07-21 15:49 ` Borislav Petkov
2023-07-21 16:42   ` John Allen
2023-07-22  7:28     ` Borislav Petkov
2023-07-27  9:05 ` [tip: x86/microcode] x86/microcode/AMD: Rip out static buffers tip-bot2 for Borislav Petkov (AMD)
  -- strict thread matches above, loose matches on Subject: below --
2020-04-09 15:34 [PATCH] x86/microcode/AMD: Increase microcode PATCH_MAX_SIZE John Allen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=748e8be1-d7e6-c0a3-b83b-a8475873cc4c@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=john.allen@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®