[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] [IA64] kexec: is for privileged guests only



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1204301175 25200
# Node ID 423662c822832d8dc4b0cb31ae3be59a454663c3
# Parent  0c1e6a1b8e900c9d2cdc766e3e6c6899d86e00d9
[IA64] kexec: is for privileged guests only

This makes the KEXEC Kconfig option depend on !XEN_UNPRIVILEGED_GUEST, so
that it is not available to unprivelaged guests. Or in other words,
it is only available to non-xen linux or privileged guests.

Some minor #defines relating to kexec have also been
updated.

linux/kexec.h is only needed in contig.c if both XEN and KEXEC
are in operation.

iomem_machine_resource is only used if PROC_IOMEM_MACHINE is in effect.
This does depend on XEN, but also depends on KEXEC and IA64.

Throughout the code #if CONFIG_XEN is used to guard regions.
This is ok, because the relevant code is only active if
KEXEC is configured, and thus implicitly the code is
being compiled with XEN_PRIVILEGED_GUEST

This is in line with the use of Kconfig on x86_64
(and presumably x86_32, though I did not check)

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 arch/ia64/Kconfig      |    2 +-
 arch/ia64/mm/contig.c  |    2 +-
 include/linux/ioport.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff -r 0c1e6a1b8e90 -r 423662c82283 arch/ia64/Kconfig
--- a/arch/ia64/Kconfig Tue Feb 26 10:49:08 2008 -0700
+++ b/arch/ia64/Kconfig Fri Feb 29 09:06:15 2008 -0700
@@ -459,7 +459,7 @@ source "drivers/sn/Kconfig"
 
 config KEXEC
        bool "kexec system call (EXPERIMENTAL)"
-       depends on EXPERIMENTAL && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
+       depends on EXPERIMENTAL && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU) && 
!XEN_UNPRIVILEGED_GUEST
        help
          kexec is a system call that implements the ability to shutdown your
          current kernel, and to start another kernel.  It is like a reboot
diff -r 0c1e6a1b8e90 -r 423662c82283 arch/ia64/mm/contig.c
--- a/arch/ia64/mm/contig.c     Tue Feb 26 10:49:08 2008 -0700
+++ b/arch/ia64/mm/contig.c     Fri Feb 29 09:06:15 2008 -0700
@@ -18,7 +18,7 @@
 #include <linux/efi.h>
 #include <linux/mm.h>
 #include <linux/swap.h>
-#ifdef CONFIG_XEN
+#if defined(CONFIG_XEN) && defined(CONFIG_KEXEC)
 #include <linux/kexec.h>
 #endif
 
diff -r 0c1e6a1b8e90 -r 423662c82283 include/linux/ioport.h
--- a/include/linux/ioport.h    Tue Feb 26 10:49:08 2008 -0700
+++ b/include/linux/ioport.h    Fri Feb 29 09:06:15 2008 -0700
@@ -93,7 +93,7 @@ struct resource_list {
 /* PC/ISA/whatever - the normal PC address spaces: IO and memory */
 extern struct resource ioport_resource;
 extern struct resource iomem_resource;
-#ifdef CONFIG_XEN
+#ifdef CONFIG_PROC_IOMEM_MACHINE
 extern struct resource iomem_machine_resource;
 #endif
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.