Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Enable INVPCID instruction #471

Merged
merged 1 commit into from
Oct 18, 2022
Merged

Enable INVPCID instruction #471

merged 1 commit into from
Oct 18, 2022

Conversation

wcwang
Copy link
Contributor

@wcwang wcwang commented Oct 17, 2022

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.

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.

* Add ENABLE_INVPCID for secondary processor-based VM-execution
  controls
* Enable X86_FEATURE_INVPCID support in CPUID

Signed-off-by: Wenchao Wang <[email protected]>
@wcwang wcwang requested a review from hyuan3 October 17, 2022 09:27
@wcwang wcwang merged commit a831910 into master Oct 18, 2022
@wcwang wcwang deleted the invpcid branch October 18, 2022 07:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants