linux/Documentation/virt
Ben Gardon 084cc29f8b KVM: x86/MMU: Allow NX huge pages to be disabled on a per-vm basis
In some cases, the NX hugepage mitigation for iTLB multihit is not
needed for all guests on a host. Allow disabling the mitigation on a
per-VM basis to avoid the performance hit of NX hugepages on trusted
workloads.

In order to disable NX hugepages on a VM, ensure that the userspace
actor has permission to reboot the system. Since disabling NX hugepages
would allow a guest to crash the system, it is similar to reboot
permissions.

Ideally, KVM would require userspace to prove it has access to KVM's
nx_huge_pages module param, e.g. so that userspace can opt out without
needing full reboot permissions.  But getting access to the module param
file info is difficult because it is buried in layers of sysfs and module
glue. Requiring CAP_SYS_BOOT is sufficient for all known use cases.

Suggested-by: Jim Mattson <jmattson@google.com>
Reviewed-by: David Matlack <dmatlack@google.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Ben Gardon <bgardon@google.com>
Message-Id: <20220613212523.3436117-9-bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-24 04:51:49 -04:00
..
acrn docs: acrn: Introduce ACRN 2021-02-09 10:58:18 +01:00
coco virt: sevguest: Rename the sevguest dir and files to sev-guest 2022-04-27 13:29:56 +02:00
kvm KVM: x86/MMU: Allow NX huge pages to be disabled on a per-vm basis 2022-06-24 04:51:49 -04:00
uml docs: UML: Mention telnetd for port channel 2022-03-11 13:51:03 -07:00
guest-halt-polling.rst docs: virt: guest-halt-polling.txt convert to ReST 2020-02-12 20:10:08 +01:00
index.rst virt: sevguest: Rename the sevguest dir and files to sev-guest 2022-04-27 13:29:56 +02:00
ne_overview.rst nitro_enclaves: Update documentation for Arm64 support 2021-09-14 11:11:20 +02:00
paravirt_ops.rst