Re: [PATCH urgent] x86: Save cr4 to mmu_cr4_features at boot time

From: Stefano Stabellini
Date: Fri Apr 01 2011 - 07:29:58 EST


On Fri, 1 Apr 2011, Ingo Molnar wrote:
>
> * Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> wrote:
>
> > Save cr4 to mmu_cr4_features at boot time
> >
> > This patch fixes a freeze when resuming from hibernation, introduced by
> > "x86: Cleanup highmap after brk is concluded", commit id
> > e5f15b45ddf3afa2bbbb10c7ea34fb32b6de0a0e.
> > This patch should be backported to all the stable tree where the
> > offending commit is present.
>
> No, the offending commit should be reverted from -stable. It's not at all clear
> yet why this fix patch helps.

e5f15b45ddf3afa2bbbb10c7ea34fb32b6de0a0e removes cleanup_highmap_brk_end
because the initial mapping of the region between _brk_end and _end is
going to be cleared by cleanup_highmap instead.

However cleanup_highmap_brk_end was not only clearing mappings, it was
also setting mmu_cr4_features, and this bit was lost with the removal of
cleanup_highmap_brk_end.

So this fix patch restores things back to how they were before
e5f15b45ddf3afa2bbbb10c7ea34fb32b6de0a0e (apart from the fact that
mappings between _brk_end and _end are cleared in cleanup_highmap now).

Obviously settings mmu_cr4_features shouldn't have been done in
cleanup_highmap_brk_end, since it doesn't have anything to do with
mappings.



P.S.
I asked for a backport of e5f15b45ddf3afa2bbbb10c7ea34fb32b6de0a0e to
the stable trees because I forgot to add "CC stable@xxxxxxxxxx" to the
commit message and this commit is needed to fix a critical crash on boot
on xen.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/