linux/arch/powerpc
Paul Mackerras 65ba6cdc83 [POWERPC] Clear sub-page HPTE present bits when demoting page size
When we demote a slice from 64k to 4k, and we are about to insert an
HPTE for a 4k subpage and we notice that there is an existing 64k
HPTE, we first invalidate that HPTE before inserting the new 4k
subpage HPTE.  Since the bits that encode which hash bucket the old
HPTE was in overlap with the bits that encode which of the 16 subpages
have HPTEs, we need to clear out the subpage HPTE-present bits before
starting to insert HPTEs for the 4k subpages.  If we don't do that, we
can erroneously think that a subpage already has an HPTE when it
doesn't.

That in itself wouldn't be such a problem except that when we go to
update the HPTE that we think is present on machines with a
hypervisor, the hypervisor can tell us that the HPTE we think is there
is actually there even though it isn't, which can lead to a process
getting stuck in a loop, continually faulting.  The reason for the
confusion is that the AVPN (abbreviated virtual page number) we are
looking for in the HPTE for a 4k subpage can actually match the AVPN
in a stale HPTE for another 64k page.  For example, the HPTE for
the 4k subpage at 0x84000f000 will be in the same hash bucket and have
the same AVPN as the HPTE for the 64k page at 0x8400f0000.

This fixes the code to clear out the subpage HPTE-present bits.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-06-18 21:40:43 +10:00
..
boot [POWERPC] Fix bootwrapper builds with newer gcc versions 2008-06-16 15:00:52 +10:00
configs [POWERPC] Turn on ATA_SFF so we get SATA_SVW back in defconfigs 2008-06-16 21:14:12 +10:00
kernel [POWERPC] 4xx: Clear new TLB cache attribute bits in Data Storage vector 2008-06-18 21:40:43 +10:00
kvm KVM: ppc: Report bad GFNs 2008-06-06 21:22:41 +03:00
lib [POWERPC] Fix -Os kernel builds with newer gcc versions 2008-06-16 15:00:54 +10:00
math-emu [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
mm [POWERPC] Clear sub-page HPTE present bits when demoting page size 2008-06-18 21:40:43 +10:00
oprofile Merge branch 'linux-2.6' 2008-04-14 21:11:02 +10:00
platforms [POWERPC] Fix warning in pseries/eeh_driver.c 2008-06-16 15:00:44 +10:00
sysdev rtc-ds1374: rename device to just "ds1374" 2008-06-06 11:29:10 -07:00
xmon powerpc/spufs: remove class_0_dsisr from spu exception handling 2008-06-16 14:35:00 +10:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
Kconfig [RAPIDIO] Add RapidIO option to kernel configuration 2008-04-29 19:40:27 +10:00
Kconfig.debug [POWERPC] Add IRQSTACKS support on ppc32 2008-04-29 15:57:34 +10:00
Makefile [POWERPC] Fix -Os kernel builds with newer gcc versions 2008-06-16 15:00:54 +10:00