RFR: JDK-8301050: Detect Xen Virtualization on Linux aarch64

David Holmes dholmes at openjdk.org
Wed Feb 1 09:15:53 UTC 2023


On Thu, 26 Jan 2023 13:22:48 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> With https://bugs.openjdk.org/browse/JDK-8300266 KVM and VMWare virtualization detection has been added; this should be enhanced by Xen detection.
> However it seems that for Xen we should look at other file system locations compared to the other virtualizations.
> more /sys/hypervisor/type
> xen
> seems to be available there.

This seems inefficient as we now open and read the file twice.

src/hotspot/cpu/aarch64/vm_version_aarch64.cpp line 590:

> 588:   const char* tname_file = "/sys/hypervisor/type";
> 589:   if (check_info_file(pname_file, "KVM")) {
> 590:     Abstract_VM_Version::_detected_virtualization = KVM; return;

Please put the return on a new line. Thanks

-------------

PR: https://git.openjdk.org/jdk/pull/12217


More information about the hotspot-dev mailing list