linux/arch/x86/coco
Kirill A. Shutemov c3abbf1376 x86/tdx: Account shared memory
The kernel will convert all shared memory back to private during kexec.
The direct mapping page tables will provide information on which memory
is shared.

It is extremely important to convert all shared memory. If a page is
missed, it will cause the second kernel to crash when it accesses it.

Keep track of the number of shared pages. This will allow for
cross-checking against the shared information in the direct mapping and
reporting if the shared bit is lost.

Memory conversion is slow and does not happen often. Global atomic is
not going to be a bottleneck.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Tested-by: Tao Liu <ltao@redhat.com>
Link: https://lore.kernel.org/r/20240614095904.1345461-10-kirill.shutemov@linux.intel.com
2024-06-17 17:45:59 +02:00
..
tdx x86/tdx: Account shared memory 2024-06-17 17:45:59 +02:00
core.c cpu/hotplug, x86/acpi: Disable CPU offlining for ACPI MADT wakeup 2024-06-17 17:45:34 +02:00
Makefile x86/tdx: Detect running as a TDX guest in early boot 2022-04-07 08:27:50 -07:00