Subject: Re: pmap_unwire: wiring for pmap 0xfoo va 0xbar didn't change!
To: Chuck Silvers <chuq@chuq.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: current-users
Date: 08/29/2005 16:37:21
On Sun, Aug 28, 2005 at 08:11:13AM -0700, Chuck Silvers wrote:
> hi,
> 
> the attached patch fixes this problem, by removing an optimization that would
> incorrectly skip TLB flushes in some cases where a pmap mapping is replaced
> with another mapping of the same page, but with different permissions.
> skipping the TLB flush is incorrect if the new entry is supposed to be wired,
> since a stale read-only entry that's supposed to be writable might cause
> a fault which would replace the wired entry with a non-wired entry
> (which is what causes the warning messages).  increasing the permissions
> an entry is not a common occurance, so it doesn't seem worthwhile to
> complicate the code with the optimization, thus the proposal to just
> remove it rather than fix it.
> 
> any objections?

A similar change would be needed for xen/i386/pmap.c, isn't it ?

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--