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

[Xen-changelog] [linux-2.6.18-xen] [IA64] Fix linux restore. It should reset opt feature.



# 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


 


Rackspace

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