[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 5/5] xen: tolerate ACPI NVS memory overlapping with Xen allocated memory
On 07.08.24 14:05, Jan Beulich wrote: On 07.08.2024 12:41, Juergen Gross wrote:In order to minimize required special handling for running as Xen PV dom0, the memory layout is modified to match that of the host. This requires to have only RAM at the locations where Xen allocated memory is living. Unfortunately there seem to be some machines, where ACPI NVS is located at 64 MB, resulting in a conflict with the loaded kernel or the initial page tables built by Xen. As ACPI NVS needs to be accessed by the kernel only for saving and restoring it across suspend operations, it can be relocated in the dom0's memory map by swapping it with unused RAM (this is possible via modification of the dom0 P2M map).While the kernel may not (directly) need to access it for other purposes, what about AML accessing it? As you can't advertise the movement to ACPI, and as non-RAM mappings are carried out by drivers/acpi/osl.c:acpi_map() using acpi_os_ioremap(), phys-to-machine translations won't cover for that (unless I'm overlooking something, which unfortunately seems like I might be). Seems I need to hook into acpi_os_ioremap() in order to handle that case. Even without that I wonder in how far tools (kexec?) may be misguided by relocating non-RAM memory ranges. Even more so when stuff traditionally living below the 4G boundary suddenly moves far beyond that. I don't think kexec is working in PV mode. Other tools: time will tell, I guess. I prefer a generally working system with maybe some tools failing over one not booting at all. The only other general solution I could think of would be something similar to vmlinuz on bare metal: a "small" boot code looking for an appropriate location for the kernel and then relocating the "real" kernel accordingly. This would require quite some effort, though, as the boot code would need to create the related page tables and p2m table, too. I'd like to avoid that. Juergen
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |