RFR: JDK-8301050: Detect Xen Virtualization on Linux aarch64 [v3]

David Holmes dholmes at openjdk.org
Fri Feb 3 04:37:54 UTC 2023


On Thu, 2 Feb 2023 09:14:03 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.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Move more coding into check_info_file

Changes seem fine as-is, but one small tweak if possible. Thanks.

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

> 568: static bool check_info_file(const char* fpath,
> 569:                             const char* virt1, VirtualizationType vt1,
> 570:                             const char* virt2, VirtualizationType vt2) {

We should (future RFE) convert VirtualizationType to a class/struct so that we don't need to manually pair the name with the value.

src/hotspot/share/runtime/abstract_vm_version.hpp line 74:

> 72:   static unsigned int _data_cache_line_flush_size;
> 73: 
> 74:  public:

Would protected work here instead of public?

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

Marked as reviewed by dholmes (Reviewer).

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


More information about the hotspot-dev mailing list