[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de96cad3-6591-4084-b02a-e0b2c27c525b@amd.com>
Date: Fri, 18 Oct 2024 09:56:25 +0530
From: Neeraj Upadhyay <Neeraj.Upadhyay@....com>
To: Tom Lendacky <thomas.lendacky@....com>, linux-kernel@...r.kernel.org,
x86@...nel.org
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
Michael Roth <michael.roth@....com>, Ashish Kalra <ashish.kalra@....com>
Subject: Re: [PATCH v3 3/8] x86/sev: Require the RMPREAD instruction after
Fam19h
On 9/30/2024 8:52 PM, Tom Lendacky wrote:
> Limit usage of the non-architectural RMP format to Fam19h processors.
> The RMPREAD instruction, with its architecture defined output, is
> available, and should be used, for RMP access beyond Fam19h.
>
> Signed-off-by: Tom Lendacky <thomas.lendacky@....com>
> ---
> arch/x86/kernel/cpu/amd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
> index 015971adadfc..ddbb6dd75fb2 100644
> --- a/arch/x86/kernel/cpu/amd.c
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -358,7 +358,8 @@ static void bsp_determine_snp(struct cpuinfo_x86 *c)
> * for which the RMP table entry format is currently defined for.
> */
> if (!cpu_has(c, X86_FEATURE_HYPERVISOR) &&
> - c->x86 >= 0x19 && snp_probe_rmptable_info()) {
> + (c->x86 == 0x19 || cpu_feature_enabled(X86_FEATURE_RMPREAD)) &&
Maybe update the comment above this if condition with information about RMPREAD FEAT?
- Neeraj
> + snp_probe_rmptable_info()) {
> cc_platform_set(CC_ATTR_HOST_SEV_SNP);
> } else {
> setup_clear_cpu_cap(X86_FEATURE_SEV_SNP);
Powered by blists - more mailing lists