_invpcid
Classification
Other, OS-Targeted, CPUID Test: INVPCID
Header File
Instruction
INVPCID r32, m128
Synopsis
_invpcid(unsigned int type, void* descriptor);
Description
Invalidate mappings in the Translation Lookaside Buffers (TLBs) and paging-structure caches for the processor context identifier (PCID) specified by "descriptor" based on the invalidation type specified in "type".
The PCID "descriptor" is specified as a 16-byte memory operand (with no alignment restrictions) where bits [11:0] specify the PCID, and bits [127:64] specify the linear address; bits [63:12] are reserved.
The types supported are:
0) Individual-address invalidation: If "type" is 0, the logical processor invalidates mappings for a single linear address and tagged with the PCID specified in "descriptor", except global translations. The instruction may also invalidate global translations, mappings for other linear addresses, or mappings tagged with other PCIDs.
1) Single-context invalidation: If "type" is 1, the logical processor invalidates all mappings tagged with the PCID specified in "descriptor" except global translations. In some cases, it may invalidate mappings for other PCIDs as well.
2) All-context invalidation: If "type" is 2, the logical processor invalidates all mappings tagged with any PCID.
3) All-context invalidation, retaining global translations: If "type" is 3, the logical processor invalidates all mappings tagged with any PCID except global translations, ignoring "descriptor". The instruction may also invalidate global translations as well.
Operation
CASE type[1:0] OF
0: // individual-address invalidation retaining global translations
OP_PCID := MEM[descriptor+11:descriptor]
ADDR := MEM[descriptor+127:descriptor+64]
BREAK
1: // single PCID invalidation retaining globals
OP_PCID := MEM[descriptor+11:descriptor]
// invalidate all mappings tagged with OP_PCID except global translations
BREAK
2: // all PCID invalidation
// invalidate all mappings tagged with any PCID
BREAK
3: // all PCID invalidation retaining global translations
// invalidate all mappings tagged with any PCID except global translations
BREAK
ESAC