Re: Need help from a VAX abi expert (was: Reproducable kernel crash)

Anders Magnusson <[email protected]>
Newsgroups gmane.os.netbsd.ports.vax
Message-ID <[email protected]>
Den 2025-01-11 kl. 15:04, skrev Martin Husemann:
>> Followup question is: If this is not the correct way of working (which means
>> I misunderstood something sometime ? ), how should it work?
> What you describe is correct and all fine, this is probably something that
> didn't matter much some years ago but now is causing confusion (at least
> confusing me).
>
> I see pmap_activate(l) does basically two things:
>
>   - fiddle with the PCB of l (this is the part needed in the call that I
>     want to remove)
>
>   - if l == curlwp also switch the CPU to this pmap
>
> I think (but I am not sure) in modern semantics pmap_activate() should only
> do the l == curlwp part (and probably uncoditionally), and the first part
> should be moved elsewhere (that could be inline into the call I was trying
> to remove) and only be done once at lwp creation time.
I tried to understand how it should work, but it is not clear to me 
either :-)
The bugs section of the manpage says that it need to be clarified as well.
It do state that it is always called with the current lwp though.

Anyway; adding the settings of the page registers to cpu_lwp_fork() is
non-trivial (if the goal is just to remove the pmap_activate() call).
> Side note:
> what I don't undstand is why VAX needs a list of PCBs in its struct pmap.
> Doesn't this always map 1:1 to the list pcbs of all lwp's in the process?
> This list handling seems to be different to all other pmaps I have seen.
Do you mean the list in PCB; pcb_pmnext?  IIRC it had to do with the logic
for handling the page table resource map (since all lwp:s in a process share
the same page table but have different PCBs).

-- R
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.