hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/x86/include/asm/invpcid.h
....@@ -12,12 +12,9 @@
1212 * stale TLB entries and, especially if we're flushing global
1313 * mappings, we don't want the compiler to reorder any subsequent
1414 * memory accesses before the TLB flush.
15
- *
16
- * The hex opcode is invpcid (%ecx), %eax in 32-bit mode and
17
- * invpcid (%rcx), %rax in long mode.
1815 */
19
- asm volatile (".byte 0x66, 0x0f, 0x38, 0x82, 0x01"
20
- : : "m" (desc), "a" (type), "c" (&desc) : "memory");
16
+ asm volatile("invpcid %[desc], %[type]"
17
+ :: [desc] "m" (desc), [type] "r" (type) : "memory");
2118 }
2219
2320 #define INVPCID_TYPE_INDIV_ADDR 0