Port-xen archive

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

Re: pae MP on cherry-xenmp



On Tue, 30 Aug 2011, Michael L. Hitch wrote:

Index: sys/arch/xen/x86/cpu.c
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/x86/cpu.c,v
retrieving revision 1.56.2.8
diff -u -p -r1.56.2.8 cpu.c
--- sys/arch/xen/x86/cpu.c      26 Aug 2011 13:33:34 -0000      1.56.2.8
+++ sys/arch/xen/x86/cpu.c      30 Aug 2011 20:45:06 -0000
@@ -1023,7 +1023,7 @@ xen_init_i386_vcpuctxt(struct cpu_info *
         * per-cpu L4 PD in pmap_cpu_init_late()
         */
#ifdef PAE
-       initctx->ctrlreg[3] = xpmap_ptom(ci->ci_pae_l3_pdirpa);
+ initctx->ctrlreg[3] = xen_pfn_to_cr3(xpmap_ptom(ci->ci_pae_l3_pdirpa) << 12);
#else /* PAE */
        initctx->ctrlreg[3] = xpmap_ptom(pcb->pcb_cr3);
#endif /* PAE */

Oops - I got a chance to test it and that patch was wrong. Here's the corrected version:

Index: sys/arch/xen/x86/cpu.c
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/x86/cpu.c,v
retrieving revision 1.56.2.8
diff -u -p -r1.56.2.8 cpu.c
--- sys/arch/xen/x86/cpu.c      26 Aug 2011 13:33:34 -0000      1.56.2.8
+++ sys/arch/xen/x86/cpu.c      30 Aug 2011 21:36:18 -0000
@@ -1023,7 +1023,7 @@ xen_init_i386_vcpuctxt(struct cpu_info *
         * per-cpu L4 PD in pmap_cpu_init_late()
         */
 #ifdef PAE
-       initctx->ctrlreg[3] = xpmap_ptom(ci->ci_pae_l3_pdirpa);
+       initctx->ctrlreg[3] = xen_pfn_to_cr3(xpmap_ptom(ci->ci_pae_l3_pdirpa) 
>> 12);
 #else /* PAE */
        initctx->ctrlreg[3] = xpmap_ptom(pcb->pcb_cr3);
 #endif /* PAE */


--
Michael L. Hitch                        mhitch%montana.edu@localhost
Computer Consultant
Information Technology Center
Montana State University        Bozeman, MT     USA


Home | Main Index | Thread Index | Old Index