[PATCH] add a new config option for memory mirror

From: KAMEZAWA Hiroyuki
Date: Mon Jun 29 2015 - 02:35:47 EST


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


--------------030208070301040603070806--

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/