Hm. But a Vx page is writable isn't it? It's just that its contents
can go away at any time. Or does the kernel treat Vx pages as strictly
RO cached copies of other things?
It also seems to me that given you talking about "potentially volatile"
as a distinct state, it would would be best to have a distinct
state-setting function associated with it, so there's a 1:1
correspondence between the code and the description.
No. I misunderstood and thought that stable_if_present sets the Px
state. I'd overlooked the writable flag on page_set_volatile().
So you mean it will change Vr/Pr to Sr but everything else will fail?
Are there there any other non-discarded states for Vx/Px?
Do mean just Vz here? You say that Pz is never used.
Mainly, use identical terminology in code and description so they can be
easily compared. I found the diagram was quite helpful in understanding
what's going on; feel free to include it in your documentation.
Updated .dot attached; I've updated it to include the page_set_volatile
writable argument and the stable_if_present transitions; commented it,
removed the self-edges which were cluttering things up.
Also, does a page go from Vz->Vr on guest memory write? If so, does a
clean page which goes from Pr->Vz->Vr lose its Px state in the process?
J