Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

i386 lazy pmap switching in trap.c




To: port-i386%netbsd.org@localhost

Subject: i386 lazy pmap switching in trap.c

From: David Laight <david%l8s.co.uk@localhost>

Date: Fri, 8 Feb 2008 20:00:17 +0000


There seems to be copy in i386/i386/trap.c (and amd64) to do a deferred
pmap_load() in response to a T_PAGEFLT trap. (eg line 666)

Now I think that if the pmap hasn't been switched, then the active pmap
is going to to be that of a different process - so we will have just
copied to/from the wrong one (a trap from userspace will always have the
correct pmap loaded!).

At the same time as this code was added, code was added to (what is now)
copy.S to do the deferred pmap switch just before the copyin/out.
This would ensure that the pmap for the correct process was loaded, and
mean that curcpu()->ci_want_pmapload must always be false in the trap code.

Am I missing something?

        David

-- 
David Laight: david%l8s.co.uk@localhost



Follow-Ups:

Re: i386 lazy pmap switching in trap.c
From: David Laight




Prev by Date: Re: major problems with ataraid(4) on an Asus PSCH-SR/SATA motherboard with Intel 6300ESB

Next by Date: Custom Kernel setback...

Previous by Thread: major problems with ataraid(4) on an Asus PSCH-SR/SATA motherboard with Intel 6300ESB

Next by Thread: Re: i386 lazy pmap switching in trap.c

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index