summaryrefslogtreecommitdiff
path: root/src/hypervisor_check.ads
diff options
context:
space:
mode:
Diffstat (limited to 'src/hypervisor_check.ads')
-rw-r--r--src/hypervisor_check.ads24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/hypervisor_check.ads b/src/hypervisor_check.ads
index 9571393..b19bf70 100644
--- a/src/hypervisor_check.ads
+++ b/src/hypervisor_check.ads
@@ -19,16 +19,31 @@ package Hypervisor_Check is
function Hypervisor_Present return Boolean;
+ function Xen_Present return Boolean;
+
function DMI_Available return Boolean;
function Get_DMI_Vendor_Name return US.Unbounded_String;
+ function Known_DMI_HV_Vendor (Name : US.Unbounded_String) return Boolean;
+
+ -- Vendor names for human consumption
+ VMWare : constant String := "VMWare";
+ Xen_HVM : constant String := "Xen HVM";
+ Xen_PV : constant String := "Xen PV";
+ KVM : constant String := "KVM";
+ HyperV : constant String := "Microsoft Hyper-V";
+ VirtualBox : constant String := "VirtualBox";
+ Parallels : constant String := "Parallels";
+
private
Hypervisor_Leaf : constant := 16#40000000#;
type CPUID_Registers is array (1 .. 4) of Unsigned_32;
+ -- Linux-specific file names etc.
Linux_Sys_Vendor_File : constant String := "/sys/class/dmi/id/sys_vendor";
+ Linux_Sys_HV_Type_File : constant String := "/sys/hypervisor/type";
-- SMBIOS vendor strings
VMWare_DMI_Pattern : constant String := "VMware, Inc.";
@@ -36,15 +51,6 @@ private
VirtualBox_DMI_Pattern : constant String := "innotek GmbH";
Parallels_DMI_Pattern : constant String := "Parallels";
- -- Vendor names for human consumption
- VMWare : constant String := "VMWare";
- Xen : constant String := "Xen";
- KVM : constant String := "KVM";
- HyperV : constant String := "Microsoft Hyper-V";
- VirtualBox : constant String := "VirtualBox";
- Parallels : constant String := "Parallels";
-
-
function CPUID (Arg : Unsigned_32) return CPUID_Registers;
function String_of_U32 (Arg : Unsigned_32) return US.Unbounded_String;