[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] crash on boot with 4.6.1 on fedora 24
On 05/26/2016 06:24 AM, David Vrabel wrote: >> @@ -1577,10 +1577,10 @@ static pte_t __init mask_rw_pte(pte_t *ptep, >> pte_t pte) >> * page tables for mapping the p2m list, too, and page tables MUST be >> * mapped read-only. >> */ >> - pfn = pte_pfn(pte); >> + pfn = (pte & PTE_PFN_MASK) >> PAGE_SHIFT; >> if (pfn >= xen_start_info->first_p2m_pfn && >> pfn < xen_start_info->first_p2m_pfn + xen_start_info->nr_p2m_frames) >> - pte = __pte_ma(pte_val_ma(pte) & ~_PAGE_RW); >> + pte &= ~_PAGE_RW; >> >> return pte; >> } >> @@ -1600,13 +1600,26 @@ static pte_t __init mask_rw_pte(pte_t *ptep, >> pte_t pte) >> * so always write the PTE directly and rely on Xen trapping and >> * emulating any updates as necessary. >> */ >> +__visible __init pte_t xen_make_pte_init(pteval_t pte) >> +{ >> +#ifdef CONFIG_X86_64 >> + pte = mask_rw_pte(pte); >> +#endif Won't make_pte() be called on 32-bit as well? (And if yes then we can get rid of xen_set_pte_init()) (Also there were build warnings about xen_make_pte_init() being in wrong section because PV_CALLEE_SAVE is not __init). -boris >> + pte = pte_pfn_to_mfn(pte); >> + >> + if ((pte & PTE_PFN_MASK) >> PAGE_SHIFT == INVALID_P2M_ENTRY) >> + pte = 0; >> + >> + return native_make_pte(pte); >> +} >> +PV_CALLEE_SAVE_REGS_THUNK(xen_make_pte_init); >> + >> static void __init xen_set_pte_init(pte_t *ptep, pte_t pte) >> { >> +#ifdef CONFIG_X86_32 >> if (pte_mfn(pte) != INVALID_P2M_ENTRY) >> pte = mask_rw_pte(ptep, pte); >> - else >> - pte = __pte_ma(0); >> - >> +#endif >> native_set_pte(ptep, pte); >> } >> >> @@ -2407,6 +2420,7 @@ static void __init xen_post_allocator_init(void) >> pv_mmu_ops.alloc_pud = xen_alloc_pud; >> pv_mmu_ops.release_pud = xen_release_pud; >> #endif >> + pv_mmu_ops.make_pte = PV_CALLEE_SAVE(xen_make_pte); >> >> #ifdef CONFIG_X86_64 >> pv_mmu_ops.write_cr3 = &xen_write_cr3; >> @@ -2455,7 +2469,7 @@ static const struct pv_mmu_ops xen_mmu_ops >> __initconst = { >> .pte_val = PV_CALLEE_SAVE(xen_pte_val), >> .pgd_val = PV_CALLEE_SAVE(xen_pgd_val), >> >> - .make_pte = PV_CALLEE_SAVE(xen_make_pte), >> + .make_pte = PV_CALLEE_SAVE(xen_make_pte_init), >> .make_pgd = PV_CALLEE_SAVE(xen_make_pgd), >> >> #ifdef CONFIG_X86_PAE >> > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |