WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [patch] ia64: kexec: is for privileged guests only

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [patch] ia64: kexec: is for privileged guests only
From: horms@xxxxxxxxxxxx (Horms)
Date: Fri, 29 Feb 2008 13:00:40 +0900
Cc: Alex Williamson <alex.williamson@xxxxxx>
Delivery-date: Thu, 28 Feb 2008 20:02:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
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(-)

Index: linux-2.6.18-xen.hg/arch/ia64/mm/contig.c
===================================================================
--- linux-2.6.18-xen.hg.orig/arch/ia64/mm/contig.c      2008-02-26 
14:25:53.000000000 +0900
+++ linux-2.6.18-xen.hg/arch/ia64/mm/contig.c   2008-02-26 14:33:08.000000000 
+0900
@@ -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
 
Index: linux-2.6.18-xen.hg/include/linux/ioport.h
===================================================================
--- linux-2.6.18-xen.hg.orig/include/linux/ioport.h     2008-02-26 
14:25:53.000000000 +0900
+++ linux-2.6.18-xen.hg/include/linux/ioport.h  2008-02-26 14:33:08.000000000 
+0900
@@ -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
 
Index: linux-2.6.18-xen.hg/arch/ia64/Kconfig
===================================================================
--- linux-2.6.18-xen.hg.orig/arch/ia64/Kconfig  2008-02-26 14:25:53.000000000 
+0900
+++ linux-2.6.18-xen.hg/arch/ia64/Kconfig       2008-02-26 14:33:08.000000000 
+0900
@@ -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

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

<Prev in Thread] Current Thread [Next in Thread>