diff options
author | Sean Christopherson <seanjc@google.com> | 2024-01-10 03:23:40 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-02-23 03:03:56 +0300 |
commit | b1a3c366cbc783d6600b357ccfec2f440eed5453 (patch) | |
tree | 8d39c1014c757db8ed2aebcff1f8cc23c8ab6c98 /lib/test-string_helpers.c | |
parent | d7f0a00e438d2275d398536d78aab4097a3aa25e (diff) | |
download | linux-b1a3c366cbc783d6600b357ccfec2f440eed5453.tar.xz |
x86/cpu: Add a VMX flag to enumerate 5-level EPT support to userspace
Add a VMX flag in /proc/cpuinfo, ept_5level, so that userspace can query
whether or not the CPU supports 5-level EPT paging. EPT capabilities are
enumerated via MSR, i.e. aren't accessible to userspace without help from
the kernel, and knowing whether or not 5-level EPT is supported is useful
for debug, triage, testing, etc.
For example, when EPT is enabled, bits 51:48 of guest physical addresses
are consumed by the CPU if and only if 5-level EPT is enabled. For CPUs
with MAXPHYADDR > 48, KVM *can't* map all legal guest memory without
5-level EPT, making 5-level EPT support valuable information for userspace.
Reported-by: Yi Lai <yi1.lai@intel.com>
Cc: Tao Su <tao1.su@linux.intel.com>
Cc: Xudong Hao <xudong.hao@intel.com>
Link: https://lore.kernel.org/r/20240110002340.485595-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions