On 10.04.24 21:48, Jason Andryuk wrote:
The PVH entry point will need an additional set of prebuild page tables. Move the macros and defines to a new header so they can be re-used.Signed-off-by: Jason Andryuk <jason.andr...@amd.com>
With the one nit below addressed: Reviewed-by: Juergen Gross <jgr...@suse.com> ...
diff --git a/arch/x86/kernel/pgtable_64_helpers.h b/arch/x86/kernel/pgtable_64_helpers.h new file mode 100644 index 000000000000..0ae87d768ce2 --- /dev/null +++ b/arch/x86/kernel/pgtable_64_helpers.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __PGTABLES_64_H__ +#define __PGTABLES_64_H__ + +#ifdef __ASSEMBLY__ + +#define l4_index(x) (((x) >> 39) & 511) +#define pud_index(x) (((x) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
Please fix the minor style issue in this line by s/-/ - / Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature