Port-vax archive

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

Re: my simh-vax crashed: panic: pmap_enter on PG_SREF page



On 21/12/23 13:05, Greg Oster wrote:
On 2023-12-20 19.42, Johnny Billquist wrote:
Nothing concrete, except that that amount of memory did have issues in the past. We hope it had been fixed, but maybe there is some kind of issue with that much memory still? Could you try with less physical memory? Like 128M?

I've seen this error at least 3 times now too.... this last time was with 256MB, but I'm pretty sure the first two were with just 64MB RAM.

I've seen this also - from my notes it appeared to be due to stale entries in the translation buffer for the pages in system space holding the page table entries for P0 or P1 space.  Flushing the translation buffer when extending P0 or P1 space seems to have fixed it.  I'm attaching a patch for consideration.

cheers

kalvis
    arch/vax: PTEs for P1 and P0 space also appear in S0 space.
    Invalidate the translation buffer entries for S0 space when the
    PTEs are updated (e.g. when the size of P0 and P1 space is
    increased)

diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c
index 2420d8a6fddc..e68a6d14f14a 100644
--- a/sys/arch/vax/vax/pmap.c
+++ b/sys/arch/vax/vax/pmap.c
@@ -778,6 +778,7 @@ static int
 grow_p0(struct pmap *pm, int reqlen)
 {
 	vaddr_t nptespc;
+        vaddr_t addr;
 	char *from, *to;
 	int srclen, dstlen;
 	int inuse, len, p0lr;
@@ -815,6 +816,12 @@ grow_p0(struct pmap *pm, int reqlen)
 	pm->pm_p0lr = (len/PPTESZ);
 	update_pcbs(pm);
 
+        /*
+         * invalidate the pages holding the new PTEs
+         */
+        for (addr = nptespc; addr < nptespc + len; addr += VAX_NBPG)
+                mtpr(addr, PR_TBIS);
+
 	/* Remove the old after update_pcbs() (for multi-CPU propagation) */
 	if (inuse)
 		extent_free(ptemap, p0br, p0lr*PPTESZ, EX_WAITOK);
@@ -826,6 +833,7 @@ static int
 grow_p1(struct pmap *pm, int len)
 {
 	vaddr_t nptespc, optespc;
+        vaddr_t addr;
 	int nlen, olen;
 
 	PMDEBUG(("grow_p1: pm %p len %x\n", pm, len));
@@ -855,6 +863,12 @@ grow_p1(struct pmap *pm, int len)
 	pm->pm_p1lr = NPTEPERREG - nlen/PPTESZ;
 	update_pcbs(pm);
 
+        /*
+         * invalidate the pages holding the new PTEs
+         */
+        for (addr = nptespc; addr < nptespc + nlen; addr += VAX_NBPG)
+                mtpr(addr, PR_TBIS);
+
 	if (optespc)
 		extent_free(ptemap, optespc, olen, EX_WAITOK);
 	return 1;


Home | Main Index | Thread Index | Old Index