intel / haxm

Intel® Hardware Accelerated Execution Manager (Intel® HAXM)
BSD 3-Clause "New" or "Revised" License
3.18k stars 853 forks source link

Enable INVPCID instruction #471

Closed wcwang closed 1 year ago

wcwang commented 1 year ago

When running a Linux virtual machine on top of hardware that suffers from meltdown vulnerabilities (i.e., the processor does not advertise the "No Rogue Data Cache Load" bit in the IA32_ARCH_CAPABILITIES MSR), the Linux guest will enable "Kernel Page Table Isolation" (aka KPTI).

This has performance impacts because the page tables need to be adjusted on each jump between user mode and kernel mode. The Linux kernel will perform it more efficiently if it has the ability to use the INVPCID instruction.