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-changelog

[Xen-changelog] [linux-2.6.18-xen] [IA64] Fix linux restore. It should r

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Fix linux restore. It should reset opt feature.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Oct 2007 15:00:10 -0700
Delivery-date: Wed, 31 Oct 2007 15:00:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1192470342 21600
# Node ID 9514c93e80532fce944ce6c8fa52bf1e89320429
# Parent  4cf72481b5ed20ed719c380f60a560aa14b12a26
[IA64] Fix linux restore.  It should reset opt feature.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 arch/ia64/kernel/setup.c      |    9 +--------
 arch/ia64/xen/hypervisor.c    |   16 ++++++++++++++++
 include/asm-ia64/hypervisor.h |    3 +++
 3 files changed, 20 insertions(+), 8 deletions(-)

diff -r 4cf72481b5ed -r 9514c93e8053 arch/ia64/kernel/setup.c
--- a/arch/ia64/kernel/setup.c  Fri Oct 12 14:21:34 2007 -0600
+++ b/arch/ia64/kernel/setup.c  Mon Oct 15 11:45:42 2007 -0600
@@ -522,8 +522,6 @@ setup_arch (char **cmdline_p)
 
 #ifdef CONFIG_XEN
        if (is_running_on_xen()) {
-               struct xen_ia64_opt_feature optf;
-
                /* Must be done before any hypercall.  */
                xencomm_initialize();
 
@@ -533,12 +531,7 @@ setup_arch (char **cmdline_p)
                                               &xen_panic_block);
                pm_power_off = xen_pm_power_off;
 
-               /* Enable region 7 identity map optimizations in Xen */
-               optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG7;
-               optf.on = XEN_IA64_OPTF_ON;
-               optf.pgprot = pgprot_val(PAGE_KERNEL);
-               optf.key = 0;   /* No key on linux. */
-               HYPERVISOR_opt_feature(&optf);
+               xen_ia64_enable_opt_feature();
        }
 #endif
 
diff -r 4cf72481b5ed -r 9514c93e8053 arch/ia64/xen/hypervisor.c
--- a/arch/ia64/xen/hypervisor.c        Fri Oct 12 14:21:34 2007 -0600
+++ b/arch/ia64/xen/hypervisor.c        Mon Oct 15 11:45:42 2007 -0600
@@ -1478,6 +1478,21 @@ EXPORT_SYMBOL_GPL(xen_ia64_unmap_resourc
 EXPORT_SYMBOL_GPL(xen_ia64_unmap_resource);
 
 ///////////////////////////////////////////////////////////////////////////
+// opt feature
+void
+xen_ia64_enable_opt_feature(void)
+{
+       /* Enable region 7 identity map optimizations in Xen */
+       struct xen_ia64_opt_feature optf;
+
+       optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG7;
+       optf.on = XEN_IA64_OPTF_ON;
+       optf.pgprot = pgprot_val(PAGE_KERNEL);
+       optf.key = 0;   /* No key on linux. */
+       HYPERVISOR_opt_feature(&optf);
+}
+
+///////////////////////////////////////////////////////////////////////////
 // suspend/resume
 void
 xen_post_suspend(int suspend_cancelled)
@@ -1486,5 +1501,6 @@ xen_post_suspend(int suspend_cancelled)
                return;
        
        p2m_expose_resume();
+       xen_ia64_enable_opt_feature();
        /* add more if necessary */
 }
diff -r 4cf72481b5ed -r 9514c93e8053 include/asm-ia64/hypervisor.h
--- a/include/asm-ia64/hypervisor.h     Fri Oct 12 14:21:34 2007 -0600
+++ b/include/asm-ia64/hypervisor.h     Mon Oct 15 11:45:42 2007 -0600
@@ -170,6 +170,9 @@ int xen_limit_pages_to_max_mfn(struct pa
 /* For drivers/xen/core/machine_reboot.c */
 #define HAVE_XEN_POST_SUSPEND
 void xen_post_suspend(int suspend_cancelled);
+
+/* For setup_arch() in arch/ia64/kernel/setup.c */
+void xen_ia64_enable_opt_feature(void);
 #endif /* !CONFIG_VMX_GUEST */
 
 #define __pte_ma(_x)   ((pte_t) {(_x)})        /* unmodified use */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] [IA64] Fix linux restore. It should reset opt feature., Xen patchbot-linux-2.6.18-xen <=