From ef692a5a846e287e3a509828cfcc339eec48ff1f Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sat, 22 Dec 2018 17:45:25 +0100 Subject: Add support for correctly detecting VirtualBox using KVM or Hyper-V as its backend. --- src/hvinfo.adb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/hvinfo.adb b/src/hvinfo.adb index e545427..342a53e 100644 --- a/src/hvinfo.adb +++ b/src/hvinfo.adb @@ -91,9 +91,15 @@ begin IO.Put_Line ("CPUID hypervisor bit is set"); UIO.Put_Line ("Hypervisor identifier is """ & Get_Vendor_String & """"); end if; - end; - Hypervisor_Name := Get_Vendor_Name; + Hypervisor_Name := Get_Vendor_Name; + + -- VirtualBox may use KVM or Hyper-V as its backend, + -- but still exposes its own graphics card so that setup can be detected + if VirtualBox_PCI_Present then + Hypervisor_Name := "VirtualBox (using " & Hypervisor_Name & ")"; + end if + end; elsif DMI_Available then -- VirtualBox, Parallels, and possible others only -- mark their presence by setting SMBIOS vendor string -- cgit v1.2.3