diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-01-20 17:53:33 +0000 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-01-20 17:53:33 +0000 |
commit | 2f09010ac0f5c38ebc4ef351695fbcbd3599d14d (patch) | |
tree | 92fc9539e84d2a87b78677a5e34ac5cbe3ffa2ee /src/hvinfo.adb | |
parent | 0801a54b6c5d95ce6e18d6bbd525c66b9d7a6bdf (diff) | |
download | hvinfo-2f09010ac0f5c38ebc4ef351695fbcbd3599d14d.tar.gz hvinfo-2f09010ac0f5c38ebc4ef351695fbcbd3599d14d.zip |
Add a DMI-based check for QEMU vs KVM.
This enabled KVM detection on non-x86 machines.
Diffstat (limited to 'src/hvinfo.adb')
-rw-r--r-- | src/hvinfo.adb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hvinfo.adb b/src/hvinfo.adb index ec4ddcf..8133c3e 100644 --- a/src/hvinfo.adb +++ b/src/hvinfo.adb @@ -120,6 +120,12 @@ begin if SMBIOS_HV_Name /= Null_Unbounded_String then Hypervisor_Name := SMBIOS_HV_Name; Hypervisor_Detected := True; + + -- Special case: QEMU sets different product name for + -- emulated and KVM-accelerated machines + if Get_DMI_Product_Name = KVM then + Hypervisor_Name := US.To_Unbounded_String (KVM); + end if; else if Debug then UIO.Put_Line (IO.Standard_Error, "DMI vendor name is: """ & SMBIOS_Vendor & """"); |