Opened 12 years ago
Support for address space identifiers on amd64
|Reported by:||Jakub Jermář||Owned by:||Jakub Jermář|
|Blocker for:||Depends on:|
Modern amd64 processors (especially those manufactured by Intel) seem to support the idea of address space identifiers, PCIDs in Intel's terminology. Similar to other architectures that make use of ASIDs, PCIDs could be used to avoid TLB flushes on address space switches. Quoting from the Intel 64 and IA-32 Architectures Software Developer’s Manual Volume 3A: System Programming Guide, Part 1:
4.10.1 Process-Context Identifiers (PCIDs) Process-context identifiers (PCIDs) are a facility by which a logical processor may cache information for multiple linear-address spaces. The processor may retain cached information when software switches to a different linear-address space with a different PCID (e.g., by loading CR3; see Section 188.8.131.52 for details). A PCID is a 12-bit identifier. Non-zero PCIDs are enabled by setting the PCIDE flag (bit 17) of CR4. If CR4.PCIDE = 0, the current PCID is always 000H; otherwise, the current PCID is the value of bits 11:0 of CR3. Not all processors allow CR4.PCIDE to be set to 1; see Section 4.1.4 for how to determine whether this is allowed.