From: Tom Lendacky <thomas.lendacky@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Michael Roth <michael.roth@amd.com>,
Ashish Kalra <ashish.kalra@amd.com>
Subject: Re: [PATCH] x86/sev: Do RMP memory coverage check after max_pfn has been set
Date: Fri, 21 Jun 2024 09:17:35 -0500 [thread overview]
Message-ID: <4c4c8208-7194-79d0-a9cf-e625e5feff23@amd.com> (raw)
In-Reply-To: <20240621135935.GGZnWHRxn08g8CkLNu@fat_crate.local>
On 6/21/24 08:59, Borislav Petkov wrote:
> On Wed, Jun 05, 2024 at 10:38:37AM -0500, Tom Lendacky wrote:
>> -static u64 probed_rmp_base, probed_rmp_size;
>> +static u64 probed_rmp_base, probed_rmp_end, probed_rmp_size;
>
> Why do you need _end if you have _size already?
>
> IOW, please compute _end where you need it instead of adding yet another
> static.
I think it makes the code easier to follow and less of a chance to compute
the value wrong given you have to substract 1 (end = base + size - 1). I
guess I can create a #define or a helper function so that the calculation
is always the same if that is preferred.
Thanks,
Tom
>
> Thx.
>
next prev parent reply other threads:[~2024-06-21 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 15:38 [PATCH] x86/sev: Do RMP memory coverage check after max_pfn has been set Tom Lendacky
2024-06-06 13:09 ` Liam Merwick
2024-06-21 13:59 ` Borislav Petkov
2024-06-21 14:17 ` Tom Lendacky [this message]
2024-06-21 14:29 ` Borislav Petkov
2024-06-21 14:37 ` Tom Lendacky
2024-06-21 14:49 ` Borislav Petkov
2024-06-21 15:02 ` Tom Lendacky
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=4c4c8208-7194-79d0-a9cf-e625e5feff23@amd.com \
--to=thomas.lendacky@amd.com \
--cc=ashish.kalra@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--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