ia64/linux-2.6.18-xen.hg

changeset 443:423662c82283

[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@verge.net.au>
author Alex Williamson <alex.williamson@hp.com>
date Fri Feb 29 09:06:15 2008 -0700 (2008-02-29)
parents 0c1e6a1b8e90
children ee7015727bd1
files arch/ia64/Kconfig arch/ia64/mm/contig.c include/linux/ioport.h
line diff
     1.1 --- a/arch/ia64/Kconfig	Tue Feb 26 10:49:08 2008 -0700
     1.2 +++ b/arch/ia64/Kconfig	Fri Feb 29 09:06:15 2008 -0700
     1.3 @@ -459,7 +459,7 @@ source "drivers/sn/Kconfig"
     1.4  
     1.5  config KEXEC
     1.6  	bool "kexec system call (EXPERIMENTAL)"
     1.7 -	depends on EXPERIMENTAL && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
     1.8 +	depends on EXPERIMENTAL && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU) && !XEN_UNPRIVILEGED_GUEST
     1.9  	help
    1.10  	  kexec is a system call that implements the ability to shutdown your
    1.11  	  current kernel, and to start another kernel.  It is like a reboot
     2.1 --- a/arch/ia64/mm/contig.c	Tue Feb 26 10:49:08 2008 -0700
     2.2 +++ b/arch/ia64/mm/contig.c	Fri Feb 29 09:06:15 2008 -0700
     2.3 @@ -18,7 +18,7 @@
     2.4  #include <linux/efi.h>
     2.5  #include <linux/mm.h>
     2.6  #include <linux/swap.h>
     2.7 -#ifdef CONFIG_XEN
     2.8 +#if defined(CONFIG_XEN) && defined(CONFIG_KEXEC)
     2.9  #include <linux/kexec.h>
    2.10  #endif
    2.11  
     3.1 --- a/include/linux/ioport.h	Tue Feb 26 10:49:08 2008 -0700
     3.2 +++ b/include/linux/ioport.h	Fri Feb 29 09:06:15 2008 -0700
     3.3 @@ -93,7 +93,7 @@ struct resource_list {
     3.4  /* PC/ISA/whatever - the normal PC address spaces: IO and memory */
     3.5  extern struct resource ioport_resource;
     3.6  extern struct resource iomem_resource;
     3.7 -#ifdef CONFIG_XEN
     3.8 +#ifdef CONFIG_PROC_IOMEM_MACHINE
     3.9  extern struct resource iomem_machine_resource;
    3.10  #endif
    3.11