[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] PAE PV guest kernel regression
----- Original Message ----- > Was the fix for the git commit 26c191788f18 (which I understand is in > RHEL6) > posted? Nope, it got rolled into 26c191788f18 before 26c191788f18 was committed. The fix was to not use __pmd, which is paravirtualized, when doing the final creation of the pmd_t retval. Here it is (the 2f88dfd2 referenced there is a rhel6 commit). Commit 2f88dfd2 introduces read_pmd_atomic which calls __pmd. __pmd is paravirtualized and for xen it calls xen_make_pmd(). xen_make_pmd may return a zero pmd in the case that the pfn's associated mfn is still invalid. However at the point when read_pmd_atomic is called the mfn can appear invalid when it isn't, if its creation was lazily deferred. If read_pmd_atomic returns zero in these cases then it can eventually lead to a crash. To resolve the issue we can avoid calling __pmd and just return the open coded compound literal (as native_make_pmd would do) instead. diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtabl index f2d473b..4f325a1 100644 --- a/arch/x86/include/asm/pgtable-3level.h +++ b/arch/x86/include/asm/pgtable-3level.h @@ -73,12 +73,13 @@ static inline pmd_t read_pmd_atomic(pmd_t *pmdp) ret |= ((pmdval_t)*(tmp + 1)) << 32; } - return __pmd(ret); + return (pmd_t) { ret }; } #else /* CONFIG_TRANSPARENT_HUGEPAGE */ static inline pmd_t read_pmd_atomic(pmd_t *pmdp) { - return __pmd(atomic64_read((atomic64_t *)pmdp)); + pmdval_t val = (pmdval_t)atomic64_read((atomic64_t *)pmdp); + return (pmd_t) { val }; } #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |