[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7ef4305-39ba-4650-bfec-287599730554@amd.com>
Date: Fri, 18 Oct 2024 10:08:01 +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 5/8] x86/sev: Map only the RMP table entries instead of
the full RMP range
> /*
> * Do the necessary preparations which are verified by the firmware as
> * described in the SNP_INIT_EX firmware command description in the SNP
> @@ -205,12 +222,17 @@ static int __init snp_rmptable_init(void)
> goto nosnp;
> }
>
> - rmptable_start = memremap(probed_rmp_base, probed_rmp_size, MEMREMAP_WB);
> + /* Map only the RMP entries */
> + rmptable_start = memremap(probed_rmp_base + RMPTABLE_CPU_BOOKKEEPING_SZ,
> + probed_rmp_size - RMPTABLE_CPU_BOOKKEEPING_SZ,
> + MEMREMAP_WB);
> if (!rmptable_start) {
> pr_err("Failed to map RMP table\n");
> goto nosnp;
> }
>
> + rmptable_size = probed_rmp_size - RMPTABLE_CPU_BOOKKEEPING_SZ;
> +
Nit: Move this assignment above 'rmptable_start = memremap(...)', so that
rmptable_size can be used there.
- Neeraj
Powered by blists - more mailing lists