From 8620b7fb7b2680e1392eb8b8b02d97322306af1e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20=C5=BBygowski?= Date: Fri, 24 May 2024 00:11:59 +0200 Subject: [PATCH] xen/arch/x86/slaunch.c: Map the TPM event log after TXT regions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Map the TPM event log after the TXT regions are mapped to avoid an early page fault when booting with slaunch. Signed-off-by: Michał Żygowski --- xen/arch/x86/slaunch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/slaunch.c b/xen/arch/x86/slaunch.c index 3a6e2f19a8..e618181a60 100644 --- a/xen/arch/x86/slaunch.c +++ b/xen/arch/x86/slaunch.c @@ -72,8 +72,8 @@ void __init map_slaunch_mem_regions(void) } find_evt_log(__va(slaunch_slrt), &evt_log_addr, &evt_log_size); - map_l2((unsigned long)evt_log_addr, evt_log_size); - + if ( evt_log_addr != NULL ) + map_l2((unsigned long)evt_log_addr, evt_log_size); } void __init protect_slaunch_mem_regions(void) -- 2.39.5