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] The attached patch replaces the three hypercalls with a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] The attached patch replaces the three hypercalls with a signle
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Thu, 23 Jun 2005 09:19:35 +0000
Cc: james@xxxxxxxxxxxxx
Delivery-date: Thu, 23 Jun 2005 11:04:23 +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@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1731, 2005/06/23 10:19:35+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        The attached patch replaces the three hypercalls with a signle
        multi-call in switch_mm, as x86 xenlinux does.
        
        Signed-off-by: Jun Nakajima <jun.nakajima@xxxxxxxxx>



 mmu_context.h |   32 ++++++++++++++++++++++++++------
 1 files changed, 26 insertions(+), 6 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mmu_context.h 
b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mmu_context.h
--- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mmu_context.h  
2005-06-23 07:05:34 -04:00
+++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mmu_context.h  
2005-06-23 07:05:34 -04:00
@@ -33,20 +33,40 @@
                             struct task_struct *tsk)
 {
        unsigned cpu = smp_processor_id();
+       struct mmuext_op _op[3], *op = _op;
+
        if (likely(prev != next)) {
                /* stop flush ipis for the previous mm */
                clear_bit(cpu, &prev->cpu_vm_mask);
-#ifdef CONFIG_SMP
+#if 0  /* XEN: no lazy tlb */
                write_pda(mmu_state, TLBSTATE_OK);
                write_pda(active_mm, next);
 #endif
                set_bit(cpu, &next->cpu_vm_mask);
-                load_cr3(next->pgd);
-                xen_new_user_pt(__pa(__user_pgd(next->pgd)));
-               if (unlikely(next->context.ldt != prev->context.ldt)) 
-                       load_LDT_nolock(&next->context, cpu);
+
+               /* load_cr3(next->pgd) */
+               per_cpu(cur_pgd, smp_processor_id()) = next->pgd;
+               op->cmd = MMUEXT_NEW_BASEPTR;
+               op->mfn = pfn_to_mfn(__pa(next->pgd) >> PAGE_SHIFT);
+               op++;
+
+               /* xen_new_user_pt(__pa(__user_pgd(next->pgd))) */
+               op->cmd = MMUEXT_NEW_USER_BASEPTR;
+               op->mfn = pfn_to_mfn(__pa(__user_pgd(next->pgd)) >> PAGE_SHIFT);
+               op++;
+               
+               if (unlikely(next->context.ldt != prev->context.ldt)) {
+                       /* load_LDT_nolock(&next->context, cpu) */
+                       op->cmd = MMUEXT_SET_LDT;
+                       op->linear_addr = (unsigned long)next->context.ldt;
+                       op->nr_ents     = next->context.size;
+                       op++;
+               }
+
+               BUG_ON(HYPERVISOR_mmuext_op(_op, op-_op, NULL, DOMID_SELF));
        }
-#ifdef CONFIG_SMP
+
+#if 0 /* XEN: no lazy tlb */
        else {
                write_pda(mmu_state, TLBSTATE_OK);
                if (read_pda(active_mm) != next)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] The attached patch replaces the three hypercalls with a signle, BitKeeper Bot <=