[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/device-tree: Allow exact match for overlapping regions
On 06.11.24 15:41, Luca Fancellu wrote: There are some cases where the device tree exposes a memory range in both /memreserve/ and reserved-memory node, in this case the current code will stop Xen to boot since it will find that the latter range is clashing with the already recorded /memreserve/ ranges. Furthermore, u-boot lists boot modules ranges, such as ramdisk, in the /memreserve/ part and even in this case this will prevent Xen to boot since it will see that the module memory range that it is going to add in 'add_boot_module' clashes with a /memreserve/ range. When Xen populate the data structure that tracks the memory ranges, it also adds a memory type described in 'enum membank_type', so in order to fix this behavior, allow the 'check_reserved_regions_overlap' function to check for exact memory range match given a specific memory type; allowing reserved-memory node ranges and boot modules to have an exact match with ranges from /memreserve/. While there, set a type for the memory recorded during ACPI boot. Fixes: 53dc37829c31 ("xen/arm: Add DT reserve map regions to bootinfo.reserved_mem") Reported-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx> Reported-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx> --- I tested this patch adding the same range in a /memreserve/ entry and /reserved-memory node, and by letting u-boot pass a ramdisk. I've also tested that a configuration running static shared memory still works fine. [...] Thank you, Dom0 started successfully with Initrd. Tested-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx> Meminfo from boot log is below: (XEN) Checking for initrd in /chosen (XEN) Initrd 0000000084000040-00000000860864fd (XEN) RAM: 0000000048000000 - 00000000bfffffff (XEN) RAM: 0000000480000000 - 00000004ffffffff (XEN) RAM: 0000000600000000 - 00000006ffffffff (XEN) (XEN) MODULE[0]: 0000000048080000 - 00000000481ec000 Xen (XEN) MODULE[1]: 0000000048000000 - 000000004801e080 Device Tree (XEN) MODULE[2]: 0000000084000040 - 00000000860864fd Ramdisk (XEN) MODULE[3]: 0000000048300000 - 000000004a300000 Kernel (XEN) MODULE[4]: 0000000048070000 - 0000000048080000 XSM (XEN) RESVD[0]: 0000000084000040 - 00000000860864fc (XEN) RESVD[1]: 0000000060000000 - 000000007fffffff (XEN) RESVD[2]: 00000000b0000000 - 00000000bfffffff (XEN) RESVD[3]: 00000000a0000000 - 00000000afffffff ... BR, -grygorii
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |