Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9c9c17613a78545a4a93b1370924f62eb282c903
Commit:     9c9c17613a78545a4a93b1370924f62eb282c903
Parent:     c5dd8586707800cd7bbdefcd675ad7d3c9afcd57
Author:     Heiko Carstens <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 5 23:35:45 2007 +0100
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Mon Mar 5 23:35:45 2007 +0100

    [S390] nss: disable kexec.
    
    nss and kexec don't work together since kexec wants to write to the
    read-only text section of the shared kernel image.
    
    Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 arch/s390/Kconfig                |    2 ++
 arch/s390/kernel/machine_kexec.c |    5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index d9425f5..0f293aa 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -376,6 +376,8 @@ config SHARED_KERNEL
          Select this option, if you want to share the text segment of the
          Linux kernel between different VM guests. This reduces memory
          usage with lots of guests but greatly increases kernel size.
+         Also if a kernel was IPL'ed from a shared segment the kexec system
+         call will not work.
          You should only select this option if you know what you are
          doing and want to exploit this feature.
 
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index 52f57af..3c77dd3 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -19,6 +19,7 @@
 #include <asm/system.h>
 #include <asm/smp.h>
 #include <asm/reset.h>
+#include <asm/ipl.h>
 
 typedef void (*relocate_kernel_t)(kimage_entry_t *, unsigned long);
 
@@ -29,6 +30,10 @@ int machine_kexec_prepare(struct kimage *image)
 {
        void *reboot_code_buffer;
 
+       /* Can't replace kernel image since it is read-only. */
+       if (ipl_flags & IPL_NSS_VALID)
+               return -ENOSYS;
+
        /* We don't support anything but the default image type for now. */
        if (image->type != KEXEC_TYPE_DEFAULT)
                return -EINVAL;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to