u-boot/drivers/xen
Dmytro Firsov 0001a964b8 drivers: xen: unmap Enlighten page before jumping to Linux
This commit fixes issue with usage of Xen hypervisor shared info page.
Previously U-boot did not unmap it at the end of OS boot process. Xen
did not prevent guest from this. So, it worked, but caused wierd
issues - one memory page, that was returned by memalign in U-boot
for Enlighten mapping was not unmaped by Xen (shared_info values was
not removed from there) and returned to allocator. During the Linux
boot, it uses shared_info page as regular RAM page, which leads to
hypervisor shared info corruption.

So, to fix this issue, as discussed on the xen-devel mailing list, the
code should:
   1) Unmap the page
   2) Populate the area with memory using XENMEM_populate_physmap

This patch adds page unmapping via XENMEM_remove_from_physmap, fills
hole in address space where page was mapped via XENMEM_populate_physmap
and return this address to memory allocator for freeing.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Reviewed-by: Anastasiia Lukianenko <vicooodin@gmail.com>
2022-07-25 14:57:27 -04:00
..
events.c WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
gnttab.c WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
hypervisor.c drivers: xen: unmap Enlighten page before jumping to Linux 2022-07-25 14:57:27 -04:00
Kconfig xen: pvblock: Add initial support for para-virtualized block driver 2020-08-14 15:18:30 -04:00
Makefile xen: pvblock: Add initial support for para-virtualized block driver 2020-08-14 15:18:30 -04:00
pvblock.c dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
xenbus.c xen: Port Xen bus driver from mini-os 2020-08-14 15:18:30 -04:00