Lines Matching defs:cr3

33  * Naively, when loading %cr3 with the base of a new pagetable, Xen
38 * that it is still valid when you do load it into %cr3, and doesn't
117 * Note about cr3 (pagetable base) values:
119 * xen_cr3 contains the current logical cr3 value; it contains the
120 * last set cr3. This may not be the current effective cr3, because
122 * at its own cr3 can use this value knowing that it everything will
125 * xen_current_cr3 contains the actual vcpu cr3; it is set once the
126 * hypercall to set the vcpu cr3 is complete (so it may be a little
128 * looking at another vcpu's cr3 value, it should use this variable.
130 DEFINE_PER_CPU(unsigned long, xen_cr3); /* cr3 stored as physaddr */
131 DEFINE_PER_CPU(unsigned long, xen_current_cr3); /* actual vcpu cr3 */
919 * If this cpu still has a stale cr3 reference, then make sure
928 * Another cpu may still have their %cr3 pointing at the pagetable, so
950 * cr3, because its in lazy mode, and it hasn't yet flushed
952 * look at its actual current cr3 value, and force it to flush
1318 static void __xen_write_cr3(bool kernel, unsigned long cr3)
1323 trace_xen_mmu_write_cr3(kernel, cr3);
1325 if (cr3)
1326 mfn = pfn_to_mfn(PFN_DOWN(cr3));
1338 this_cpu_write(xen_cr3, cr3);
1342 xen_mc_callback(set_current_cr3, (void *)cr3);
1345 static void xen_write_cr3(unsigned long cr3)
1347 pgd_t *user_pgd = xen_get_user_pgd(__va(cr3));
1355 this_cpu_write(xen_cr3, cr3);
1357 __xen_write_cr3(true, cr3);
1375 * up the rest of the pagetables. When it has completed it loads the cr3.
1387 static void __init xen_write_cr3_init(unsigned long cr3)
1395 this_cpu_write(xen_cr3, cr3);
1397 __xen_write_cr3(true, cr3);