Conversation
arch_xen_unpopulated_init() gives up immediately on a domain that is using ACPI, so xen_alloc_unpopulated_pages() has no address space to hand out and falls back to ballooning the domain's own memory out instead. On arm64 that fallback grows the balloon through memory hotplug, and add_memory_resource() picks a range from iomem_resource with nothing to say whether it is safe to map. When it is not, arch_add_memory() walks into BUG_ON(!pgattr_change_is_safe(...)) in alloc_init_cont_pte(), and creating a guest takes dom0 down with it. The regions are not actually missing. Xen publishes them in the hypervisor node of the device tree it hands over whichever way the machine is described, and dt_scan_depth1_nodes() has already read that node during early boot -- it is how the tree was judged empty enough to use ACPI in the first place. What is missing is a reader: the tree is never unflattened when ACPI is in use, so of_find_compatible_node() below has nothing to walk. Read them from the flat tree in that case. The device tree path is unchanged. Signed-off-by: Alex Zenla <alex@edera.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
arch_xen_unpopulated_init() gives up immediately on a domain that is using ACPI, so xen_alloc_unpopulated_pages() has no address space to hand out and falls back to ballooning the domain's own memory out instead. On arm64 that fallback grows the balloon through memory hotplug, and add_memory_resource() picks a range from iomem_resource with nothing to say whether it is safe to map. When it is not, arch_add_memory() walks into
in alloc_init_cont_pte(), and creating a guest takes dom0 down with it.
The regions are not actually missing. Xen publishes them in the hypervisor node of the device tree it hands over whichever way the machine is described, and dt_scan_depth1_nodes() has already read that node during early boot -- it is how the tree was judged empty enough to use ACPI in the first place. What is missing is a reader: the tree is never unflattened when ACPI is in use, so of_find_compatible_node() below has nothing to walk.
Read them from the flat tree in that case. The device tree path is unchanged.