]> git.baikalelectronics.ru Git - kernel.git/commit
xen PVonHVM: use E820_Reserved area for shared_info
authorOlaf Hering <olaf@aepfle.de>
Thu, 1 Nov 2012 21:02:30 +0000 (22:02 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 2 Nov 2012 15:04:01 +0000 (11:04 -0400)
commit7cd9a6fc58075e4fd01a4c4a91f98a213d4cc873
tree5e8ea29e63c463496c1bd0d514539bec6e09d319
parent47e9b4f8d477fa4aee4b58e1afe93ce35e1d294e
xen PVonHVM: use E820_Reserved area for shared_info

This is a respin of 1fe55a47d89bd9d3b4562d4912f5d77c7ebe5e0c
("xen PVonHVM: move shared_info to MMIO before kexec").

Currently kexec in a PVonHVM guest fails with a triple fault because the
new kernel overwrites the shared info page. The exact failure depends on
the size of the kernel image. This patch moves the pfn from RAM into an
E820 reserved memory area.

The pfn containing the shared_info is located somewhere in RAM. This will
cause trouble if the current kernel is doing a kexec boot into a new
kernel. The new kernel (and its startup code) can not know where the pfn
is, so it can not reserve the page. The hypervisor will continue to update
the pfn, and as a result memory corruption occours in the new kernel.

The toolstack marks the memory area FC000000-FFFFFFFF as reserved in the
E820 map. Within that range newer toolstacks (4.3+) will keep 1MB
starting from FE700000 as reserved for guest use. Older Xen4 toolstacks
will usually not allocate areas up to FE700000, so FE700000 is expected
to work also with older toolstacks.

In Xen3 there is no reserved area at a fixed location. If the guest is
started on such old hosts the shared_info page will be placed in RAM. As
a result kexec can not be used.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/enlighten.c
arch/x86/xen/suspend.c
arch/x86/xen/xen-ops.h