From 70222ffc1a55fded27c5da17238ae49467aa6a37 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Fri, 1 Apr 2022 17:52:19 +0200 Subject: [PATCH] vmm: tdx: Only report TempMem as reserved memory Based on latest QEMU patches from branch tdx-qemu-2022.03.29-v7.0.0-rc1 we should only report as memory resources the TempMem sections from TDVF sections. Signed-off-by: Sebastien Boeuf --- vmm/src/vm.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index b39c00535..5df1f7e65 100644 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -1829,9 +1829,7 @@ impl Vm { let mut hob = TdHob::start(hob_offset.unwrap()); let mut sorted_sections = sections.to_vec(); - sorted_sections.retain(|section| { - !matches!(section.r#type, TdvfSectionType::Bfv | TdvfSectionType::Cfv) - }); + sorted_sections.retain(|section| matches!(section.r#type, TdvfSectionType::TempMem)); sorted_sections.sort_by_key(|section| section.address); sorted_sections.reverse();