On 20.08.2024 16:42, oleksii.kuroc...@gmail.com wrote: > On Tue, 2024-08-20 at 15:47 +0200, Jan Beulich wrote: >> On 20.08.2024 15:18, oleksii.kuroc...@gmail.com wrote: >>> On Tue, 2024-08-13 at 12:31 +0200, Jan Beulich wrote: >>>> From all I can determine we also get here when making brand new >>>> entries. >>>> What am I overlooking? >>> Yes, but in this case an intermediate page tables should be >>> read_only, >>> so alloc_only will be true and it will be allowed to create new >>> intermediate page table. >> >> Hmm, so instead of "read-only" do you maybe mean page tables are not >> supposed to be modified? There's a difference here: When they're >> read-only, you can't write to them (or a fault will result). Whereas >> when in principle they can be modified, there still may be a rule >> saying "in this case they shouldn't be altered". > > There is such rule which checks that page tables aren't supposed to be > modified ( so that is why they are read-only ):
Hmm, you're saying "read-only" again in reply to me explaining that this isn't the correct term here. I find this increasingly confusing. Jan > ``` > /* Sanity check when modifying an entry. */ > if ( (flags & PTE_VALID) && mfn_eq(mfn, INVALID_MFN) ) > { > ... > > /* We don't allow modifying a table entry */ > if ( pte_is_table(entry) ) > { > printk("Modifying a table entry is not allowed.\n"); > return false; > } > ``` > > ~ Oleksii