[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mini-os master] e820: don't count lapic page as initially reserved



commit e1558bb65b0e64dcbf0a6144c32f2522b3dec83e
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Tue Jul 15 15:29:25 2025 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Jul 16 15:04:15 2025 +0200

    e820: don't count lapic page as initially reserved
    
    The number of pages marked initially as reserved in the memory map
    are counted to be allocated, as they are normally populated by Xen
    tools for e.g. xenbus and console ring pages.
    
    This is wrong in case the lapic page is marked as reserved in the
    memory map, as there is never memory allocated for a lapic.
    
    So when finding the lapic page to be marked as reserved, don't add
    it to the number of reserved pages.
    
    Fixes: 9b87429d2864 ("mini-os: fix number of pages for PVH")
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
 e820.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/e820.c b/e820.c
index 16622e2..44cfac0 100644
--- a/e820.c
+++ b/e820.c
@@ -275,7 +275,10 @@ static void e820_sanitize(void)
             e820_initial_reserved_pfns += e820_map[i].size / PAGE_SIZE;
             if ( e820_map[i].addr <= LAPIC_ADDRESS &&
                  e820_map[i].addr + e820_map[i].size > LAPIC_ADDRESS )
+            {
                 found_lapic = true;
+                e820_initial_reserved_pfns--;
+            }
         }
     }
 
--
generated by git-patchbot for /home/xen/git/mini-os.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.