RFR: 8250598: Hyper-V is detected in spite of running on host OS
Yasumasa Suenaga
suenaga at oss.nttdata.com
Mon Jul 27 04:24:57 UTC 2020
Hi all,
Please review this change:
JBS: https://bugs.openjdk.java.net/browse/JDK-8250598
webrev: http://cr.openjdk.java.net/~ysuenaga/JDK-8250598/webrev.00/
When I got hs_err log on Windows, I saw "HyperV virtualization detected" in it in spite of running on host OS.
Hypervisor detector has been introduced in JDK-8219241, but it has some problems as below:
- Hyper-V is detected on Windows in spite of running on host OS
- Call CPUID with other than EAX = 40000000h (it is not described in the spec [1])
- Does not check CPUID hypervisor present bit [1]
- Does not support x86 (32bit) platform
I've tested this change on submit repo, and have checked output from VM.info jcmd on following environment:
- Windows x64 (host)
- Windows x64 (Hyper-V guest)
- Fedora32 x64 (Hyper-V guest)
- 32 bit JDK on Fedora32 x64 (Hyper-V guest)
Thanks,
Yasumasa
[1] https://kb.vmware.com/s/article/1009458
More information about the hotspot-runtime-dev
mailing list