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] Tidy up vm_assist handling.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Tidy up vm_assist handling.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Wed, 30 Mar 2005 10:57:35 +0000
Delivery-date: Wed, 30 Mar 2005 12:03:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1396, 2005/03/30 11:57:35+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Tidy up vm_assist handling.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 linux-2.4.29-xen-sparse/arch/xen/kernel/head.S       |    1 -
 linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c      |    6 ++++--
 linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S  |    1 -
 linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c |    6 ++++--
 linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c      |    8 ++++----
 linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c     |   11 ++++-------
 tools/libxc/xc_linux_build.c                         |    8 --------
 tools/libxc/xc_vmx_build.c                           |    6 ------
 xen/arch/x86/dom0_ops.c                              |    7 +++++++
 xen/arch/x86/domain.c                                |    9 +++++++++
 xen/arch/x86/domain_build.c                          |    4 ----
 xen/common/domain.c                                  |    4 ----
 xen/common/elf.c                                     |    3 ---
 xen/common/kernel.c                                  |    1 -
 xen/include/asm-ia64/config.h                        |    7 -------
 xen/include/asm-x86/mm.h                             |    8 --------
 xen/include/public/arch-x86_32.h                     |    1 +
 xen/include/public/arch-x86_64.h                     |    4 ++--
 xen/include/xen/sched.h                              |    2 --
 19 files changed, 35 insertions(+), 62 deletions(-)


diff -Nru a/linux-2.4.29-xen-sparse/arch/xen/kernel/head.S 
b/linux-2.4.29-xen-sparse/arch/xen/kernel/head.S
--- a/linux-2.4.29-xen-sparse/arch/xen/kernel/head.S    2005-03-30 07:03:14 
-05:00
+++ b/linux-2.4.29-xen-sparse/arch/xen/kernel/head.S    2005-03-30 07:03:14 
-05:00
@@ -2,7 +2,6 @@
 .section __xen_guest
     .ascii "GUEST_OS=linux,GUEST_VER=2.4,XEN_VER=3.0,VIRT_BASE=0xC0000000"
     .ascii ",LOADER=generic"
-    .ascii ",PT_MODE_WRITABLE"
     .byte  0
 
 .text
diff -Nru a/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c 
b/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c
--- a/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c   2005-03-30 07:03:14 
-05:00
+++ b/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c   2005-03-30 07:03:14 
-05:00
@@ -228,8 +228,10 @@
     blk_nohighio = 1;
 #endif
 
-    HYPERVISOR_vm_assist(VMASST_CMD_enable,
-                         VMASST_TYPE_4gb_segments);
+    HYPERVISOR_vm_assist(
+        VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
+    HYPERVISOR_vm_assist(
+        VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
         
     HYPERVISOR_set_callbacks(
         __KERNEL_CS, (unsigned long)hypervisor_callback,
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S       2005-03-30 
07:03:14 -05:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S       2005-03-30 
07:03:14 -05:00
@@ -4,7 +4,6 @@
 .section __xen_guest
        .ascii  "GUEST_OS=linux,GUEST_VER=2.6,XEN_VER=3.0,VIRT_BASE=0xC0000000"
        .ascii  ",LOADER=generic"
-       .ascii  ",PT_MODE_WRITABLE"
        .byte   0
 
 .text
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c      2005-03-30 
07:03:14 -05:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c      2005-03-30 
07:03:14 -05:00
@@ -1409,8 +1409,10 @@
        /* Register a call for panic conditions. */
        notifier_chain_register(&panic_notifier_list, &xen_panic_block);
 
-       HYPERVISOR_vm_assist(VMASST_CMD_enable,
-                            VMASST_TYPE_4gb_segments);
+       HYPERVISOR_vm_assist(
+               VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
+       HYPERVISOR_vm_assist(
+               VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
 
        memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
        early_cpu_init();
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c 
b/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c
--- a/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c   2005-03-30 07:03:14 
-05:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c   2005-03-30 07:03:14 
-05:00
@@ -50,8 +50,8 @@
 
     if ( !test_and_set_bit(0, &printed) )
     {
-        HYPERVISOR_vm_assist(VMASST_CMD_disable,
-                             VMASST_TYPE_4gb_segments_notify);
+        HYPERVISOR_vm_assist(
+            VMASST_CMD_disable, VMASST_TYPE_4gb_segments_notify);
 
         DP("");
         DP("***************************************************************");
@@ -79,8 +79,8 @@
 
 static int __init fixup_init(void)
 {
-    HYPERVISOR_vm_assist(VMASST_CMD_enable,
-                         VMASST_TYPE_4gb_segments_notify);
+    HYPERVISOR_vm_assist(
+        VMASST_CMD_enable, VMASST_TYPE_4gb_segments_notify);
     return 0;
 }
 __initcall(fixup_init);
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c 
b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c
--- a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c  2005-03-30 07:03:12 
-05:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c  2005-03-30 07:03:12 
-05:00
@@ -110,18 +110,15 @@
     HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
     clear_fixmap(FIX_SHARED_INFO);
 
-    memcpy(&suspend_record->resume_info, &xen_start_info, 
sizeof(xen_start_info));
+    memcpy(&suspend_record->resume_info, &xen_start_info,
+           sizeof(xen_start_info));
 
     HYPERVISOR_suspend(virt_to_machine(suspend_record) >> PAGE_SHIFT);
 
-    HYPERVISOR_vm_assist(VMASST_CMD_enable,
-                        VMASST_TYPE_4gb_segments);
-    HYPERVISOR_vm_assist(VMASST_CMD_enable,
-                        VMASST_TYPE_writable_pagetables);
-
     shutting_down = -1; 
 
-    memcpy(&xen_start_info, &suspend_record->resume_info, 
sizeof(xen_start_info));
+    memcpy(&xen_start_info, &suspend_record->resume_info,
+           sizeof(xen_start_info));
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
     set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info);
diff -Nru a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      2005-03-30 07:03:13 -05:00
+++ b/tools/libxc/xc_linux_build.c      2005-03-30 07:03:13 -05:00
@@ -22,7 +22,6 @@
     unsigned long v_kernend;
     unsigned long v_kernentry;
 
-    unsigned int use_writable_pagetables;
     unsigned int load_bsd_symtab;
 
     unsigned long symtab_addr;
@@ -88,10 +87,6 @@
     if ( rc != 0 )
         goto error_out;
 
-    if (dsi.use_writable_pagetables)
-        xc_domain_setvmassist(xc_handle, dom, VMASST_CMD_enable,
-                              VMASST_TYPE_writable_pagetables);
-
     if (dsi.load_bsd_symtab)
         loadelfsymtab(image, xc_handle, dom, NULL, &dsi);
 
@@ -579,9 +574,6 @@
     dsi->v_start = kernstart;
     if ( (p = strstr(guestinfo, "VIRT_BASE=")) != NULL )
         dsi->v_start = strtoul(p+10, &p, 0);
-
-    if ( (p = strstr(guestinfo, "PT_MODE_WRITABLE")) != NULL )
-        dsi->use_writable_pagetables = 1;
 
     if ( (p = strstr(guestinfo, "BSD_SYMTAB")) != NULL )
         dsi->load_bsd_symtab = 1;
diff -Nru a/tools/libxc/xc_vmx_build.c b/tools/libxc/xc_vmx_build.c
--- a/tools/libxc/xc_vmx_build.c        2005-03-30 07:03:14 -05:00
+++ b/tools/libxc/xc_vmx_build.c        2005-03-30 07:03:14 -05:00
@@ -27,7 +27,6 @@
     unsigned long v_kernend;
     unsigned long v_kernentry;
 
-    unsigned int use_writable_pagetables;
     unsigned int load_bsd_symtab;
 
     unsigned long symtab_addr;
@@ -198,10 +197,6 @@
     if ( rc != 0 )
         goto error_out;
 
-    if (dsi.use_writable_pagetables)
-        xc_domain_setvmassist(xc_handle, dom, VMASST_CMD_enable,
-                              VMASST_TYPE_writable_pagetables);
-
     if (dsi.load_bsd_symtab)
         loadelfsymtab(image, xc_handle, dom, NULL, &dsi);
 
@@ -708,7 +703,6 @@
     }
 
     dsi->v_start = 0x00000000;
-    dsi->use_writable_pagetables = 0;
     dsi->load_bsd_symtab = 0;
 
     dsi->v_kernstart = kernstart - LINUX_PAGE_OFFSET;
diff -Nru a/xen/arch/x86/dom0_ops.c b/xen/arch/x86/dom0_ops.c
--- a/xen/arch/x86/dom0_ops.c   2005-03-30 07:03:13 -05:00
+++ b/xen/arch/x86/dom0_ops.c   2005-03-30 07:03:13 -05:00
@@ -435,8 +435,15 @@
     memcpy(c->debugreg, 
            ed->arch.debugreg, 
            sizeof(ed->arch.debugreg));
+#if defined(__i386__)
     c->event_callback_cs     = ed->arch.event_selector;
     c->event_callback_eip    = ed->arch.event_address;
     c->failsafe_callback_cs  = ed->arch.failsafe_selector;
     c->failsafe_callback_eip = ed->arch.failsafe_address;
+#elif defined(__x86_64__)
+    c->event_callback_eip    = ed->arch.event_address;
+    c->failsafe_callback_eip = ed->arch.failsafe_address;
+    c->syscall_callback_eip  = ed->arch.syscall_address;
+#endif
+    c->vm_assist = ed->domain->vm_assist;
 }
diff -Nru a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     2005-03-30 07:03:13 -05:00
+++ b/xen/arch/x86/domain.c     2005-03-30 07:03:13 -05:00
@@ -494,10 +494,19 @@
     for ( i = 0; i < 8; i++ )
         (void)set_debugreg(ed, i, c->debugreg[i]);
 
+#if defined(__i386__)
     ed->arch.event_selector    = c->event_callback_cs;
     ed->arch.event_address     = c->event_callback_eip;
     ed->arch.failsafe_selector = c->failsafe_callback_cs;
     ed->arch.failsafe_address  = c->failsafe_callback_eip;
+#elif defined(__x86_64__)
+    ed->arch.event_address     = c->event_callback_eip;
+    ed->arch.failsafe_address  = c->failsafe_callback_eip;
+    ed->arch.syscall_address   = c->syscall_callback_eip;
+#endif
+
+    if ( ed->eid == 0 )
+        d->vm_assist = c->vm_assist;
 
     phys_basetab = c->pt_base;
     ed->arch.guest_table = ed->arch.phys_table = mk_pagetable(phys_basetab);
diff -Nru a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       2005-03-30 07:03:13 -05:00
+++ b/xen/arch/x86/domain_build.c       2005-03-30 07:03:13 -05:00
@@ -129,10 +129,6 @@
     if ( rc != 0 )
         return rc;
 
-    /* Set up domain options */
-    if ( dsi.use_writable_pagetables )
-        vm_assist(d, VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
-
     /* Align load address to 4MB boundary. */
     dsi.v_start &= ~((1UL<<22)-1);
 
diff -Nru a/xen/common/domain.c b/xen/common/domain.c
--- a/xen/common/domain.c       2005-03-30 07:03:14 -05:00
+++ b/xen/common/domain.c       2005-03-30 07:03:14 -05:00
@@ -358,13 +358,9 @@
     {
     case VMASST_CMD_enable:
         set_bit(type, &p->vm_assist);
-        if (vm_assist_info[type].enable)
-            (*vm_assist_info[type].enable)(p);
         return 0;
     case VMASST_CMD_disable:
         clear_bit(type, &p->vm_assist);
-        if (vm_assist_info[type].disable)
-            (*vm_assist_info[type].disable)(p);
         return 0;
     }
 
diff -Nru a/xen/common/elf.c b/xen/common/elf.c
--- a/xen/common/elf.c  2005-03-30 07:03:14 -05:00
+++ b/xen/common/elf.c  2005-03-30 07:03:14 -05:00
@@ -118,9 +118,6 @@
     {
         if ( (p = strstr(guestinfo, "VIRT_BASE=")) != NULL )
             dsi->v_start = simple_strtoul(p+10, &p, 0);
-        
-        if ( (p = strstr(guestinfo, "PT_MODE_WRITABLE")) != NULL )
-            dsi->use_writable_pagetables = 1;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Tidy up vm_assist handling., BitKeeper Bot <=