>From 88213b0f76e2f603c5a38690cbd85a4df1e646ba Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Mon, 29 Jun 2015 15:35:47 +0900 Subject: [PATCH] add a new config option for memory mirror Add a new config option "CONFIG_MEMORY_MIRROR" for kernel assisted memory mirroring. In UEFI2.5 spec, Address based memory mirror is defined and it allows the system to create partial memory mirror. The feature guards important(kernel) memory to be mirrored by using the address based memory mirror. Now this depends on cpu architecure Haswell? Broadwell? --- arch/x86/Kconfig | 6 ++++++ mm/Kconfig | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e33e01b..56f17df 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -596,6 +596,12 @@ config X86_SUPPORTS_MEMORY_FAILURE depends on X86_64 || !SPARSEMEM select ARCH_SUPPORTS_MEMORY_FAILURE +config X86_SUPPORTS_MEMORY_MIRROR + def_bool y + # UEFI 2.5spec. address based memory mirror, supported only after XXX + depends on X86_64 && ARCH_SUPPORTS_MEMORY_FAILURE + select ARCH_MEMORY_MIRROR + config STA2X11 bool "STA2X11 Companion Chip Support" depends on X86_32_NON_STANDARD && PCI diff --git a/mm/Kconfig b/mm/Kconfig index b3a60ee..e14dc2d 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -200,6 +200,15 @@ config MEMORY_HOTREMOVE depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE depends on MIGRATION +config MEMORY_MIRROR + bool "Address range mirroring support" + depends on ARCH_MEMORY_MIRROR + default n + help + This feature allows the kernel to assist address based memory + mirror supported by architecture/firmware. And place some types + of memory (especially, kernel memory) placed into mirrored range. + # # If we have space for more page flags then we can enable additional # optimizations and functionality. -- 1.9.3