https://bugzilla.novell.com/show_bug.cgi?id=416251 User jbeulich@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=416251#c8 --- Comment #8 from Jan Beulich <jbeulich@novell.com> 2008-08-19 06:06:39 MDT ---
Sorry I just can't exactly see how it fits together -- I'd not followed the PAT stuff too closely. AFAIKS _PAGE_PAT/_PAGE_PSE (bit 7) is not set in _PAGE_CHG_MASK.
It's not for native, but it must be for Xen - native only uses the first 4 PAT entries, and hence doesn't really need the PAT bit. Xen (the hypervisor) doesn't permit updating of the PAT MSR, and hence we have to live with the fact that the WC type is accessible only with index 0b100 (i.e. 4), and thus in order to permit WC we have to make use of _PAGE_PAT (and consequently include it in _PAGE_CHG_MASK).
_PAGE_PROTNONE is only valid when _PAGE_PRESENT is clear, so really we can use any bit for it, it's no problem to change it somewhere else... but I'd just like to understand what I'm missing here.
The only valid bits _PAGE_PROTNONE could use are those not included in _PAGE_CHG_MASK (unless we change pte_modify() and pgprot_modify() to special-case _PAGE_NONE), and it also cannot be _PAGE_FILE (i.e. _PAGE_DIRTY). But indeed, since e.g. pte_young() only takes pte_present() (but not _PAGE_PRESENT) as prerequisite, using _PAGE_ACCESSED here indeed wouldn't work. On a second look it would seem, however, that _PAGE_USER could be used here (there's no accessor testing/modifying this bit, and it's not part of _PAGE_CHG_MASK). However, _PAGE_USER has special semantics on older 64-bit hypervisors, so it's not a good candidate if backward compatibility matters. Likewise, one could consider using _PAGE_GLOBAL (since the respective accessors are stubs on Xen, as the 32-bit hypervisor doesn't permit its use, and the 64-bit hypervisor only conditionally permits it, so it doesn't have the meaning the kernel would normally give it). All of the other bits (apart from _PAGE_UNUSED2) aren't candidates: - _PAGE_PRESENT for obvious reasons - _PAGE_RW because of pte_write() etc - _PAGE_PWT, _PAGE_PCD, _PAGE_PAT, _PAGE_UNUSED1 (_PAGE_SPECIAL) and _PAGE_UNUSED3 (_PAGE_IO) because they're part of _PAGE_CHG_MASK - _PAGE_DIRTY because it equals _PAGE_FILE and is also part of _PAGE_CHG_MASK. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.