Bit 63 of writes to CR3 with PCIDs enabled

Kent Williams-King <[email protected]> Mon, 25 Dec 2017 00:41:34 -0700
Newsgroups gmane.comp.emulators.bochs.devel
Message-ID <CAGFdQe-5NM__NBcxOWMpdOdRU05uqLiwsJA1TiS_pLJ0Uh+Vhw@mail.gmail.com>
Hi,

I noticed what I believe is a discrepancy between the Bochs
implementation of PCIDs and the Intel SDM. Specifically, the Intel SDM
(October 2017 edition) states in ยง4.10.1.4 that the behaviour of a mov
to CR3 depends on the value of CR4.PCIDE. Specifically, if CR4.PCIDE
is set, then when bit 63 of the value to store in CR3 is set, it can
be treated as a hint to not clear the TLB (or other paging structure
caches).

Since clearing the caches is allowed even when CR4.PCIDE is set and
bit 63 of the value is set, a patch like the attached (which changes
the behaviour of MOV_CR3Rq() before the SetCR3() call) seems to
satisfy the letter of the law.

Thoughts? Am I missing something in the current implementation? :-)

Kent

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
bochs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bochs-developers
patch (application/octet-stream, 472 B) - not displayed