|
@@ -69,6 +69,8 @@ static struct alloc_pgt_data pgt_data;
|
|
|
/* The top level page table entry pointer. */
|
|
|
static unsigned long top_level_pgt;
|
|
|
|
|
|
+phys_addr_t physical_mask = (1ULL << __PHYSICAL_MASK_SHIFT) - 1;
|
|
|
+
|
|
|
/*
|
|
|
* Mapping information structure passed to kernel_ident_mapping_init().
|
|
|
* Due to relocation, pointers must be assigned at run time not build time.
|
|
@@ -81,6 +83,9 @@ void initialize_identity_maps(void)
|
|
|
/* If running as an SEV guest, the encryption mask is required. */
|
|
|
set_sev_encryption_mask();
|
|
|
|
|
|
+ /* Exclude the encryption mask from __PHYSICAL_MASK */
|
|
|
+ physical_mask &= ~sme_me_mask;
|
|
|
+
|
|
|
/* Init mapping_info with run-time function/buffer pointers. */
|
|
|
mapping_info.alloc_pgt_page = alloc_pgt_page;
|
|
|
mapping_info.context = &pgt_data;
|