gramineproject / gramine-tdx

A library OS for Linux multi-process applications, with Intel TDX support (experimental)
GNU Lesser General Public License v3.0
19 stars 5 forks source link

[PAL/TDX] Emulate hypervisor-specific CPUID leaves as all-zeros #41

Closed dimakuv closed 4 months ago

dimakuv commented 4 months ago

Description of the changes

Some workloads like Java query hypervisor-specific CPUID leaves 0x40000000 - 0x40010000. This commit adds emulation of these leaves as all-zeros (i.e., no hypervisor detected).

Detected on Java workload, see https://github.com/openjdk/jdk/blob/jdk-17%2B35/src/hotspot/cpu/x86/vm_version_x86.cpp#L1858

How to test this PR?

Java.


This change is Reviewable