diff --git a/Makefile.am b/Makefile.am index 6ee6271..869f692 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,6 +28,11 @@ tests/esx4.1/sbin/dmidecode \ tests/esx4.1/sbin/id \ tests/esx4.1/sbin/virt-what-cpuid-helper \ + tests/hyperv/proc/cpuinfo \ + tests/hyperv/proc/self/status \ + tests/hyperv/sbin/dmidecode \ + tests/hyperv/sbin/id \ + tests/hyperv/sbin/virt-what-cpuid-helper \ tests/kvm/proc/cpuinfo \ tests/kvm/proc/self/status \ tests/kvm/sbin/dmidecode \ @@ -38,6 +43,11 @@ tests/linux-vserver/sbin/dmidecode \ tests/linux-vserver/sbin/id \ tests/linux-vserver/sbin/virt-what-cpuid-helper \ + tests/parallels-desktop/proc/cpuinfo \ + tests/parallels-desktop/proc/self/status \ + tests/parallels-desktop/sbin/dmidecode \ + tests/parallels-desktop/sbin/id \ + tests/parallels-desktop/sbin/virt-what-cpuid-helper \ tests/qemu/proc/cpuinfo \ tests/qemu/proc/self/status \ tests/qemu/sbin/dmidecode \ @@ -104,15 +114,17 @@ tests/zvm/sbin/virt-what-cpuid-helper \ tests/test-baremetal.sh \ tests/test-esx4.1.sh \ + tests/test-hyperv.sh \ tests/test-kvm.sh \ tests/test-linux-vserver.sh \ + tests/test-parallels-desktop.sh \ tests/test-qemu.sh \ tests/test-rhel5-xen-dom0.sh \ tests/test-rhel5-xen-domU-hvm.sh \ tests/test-rhel5-xen-domU-pv.sh \ tests/test-zvm.sh -CLEANFILES = virt-what.1 virt-what.txt +CLEANFILES = virt-what virt-what.1 virt-what.txt AM_CPPFLAGS = -Wall @@ -131,8 +143,10 @@ TESTS = \ tests/test-baremetal.sh \ tests/test-esx4.1.sh \ + tests/test-hyperv.sh \ tests/test-kvm.sh \ tests/test-linux-vserver.sh \ + tests/test-parallels-desktop.sh \ tests/test-qemu.sh \ tests/test-rhel5-xen-dom0.sh \ tests/test-rhel5-xen-domU-hvm.sh \ diff --git a/Makefile.in b/Makefile.in index 1eb3ccc..ba64781 100644 --- a/Makefile.in +++ b/Makefile.in @@ -219,6 +219,11 @@ tests/esx4.1/sbin/dmidecode \ tests/esx4.1/sbin/id \ tests/esx4.1/sbin/virt-what-cpuid-helper \ + tests/hyperv/proc/cpuinfo \ + tests/hyperv/proc/self/status \ + tests/hyperv/sbin/dmidecode \ + tests/hyperv/sbin/id \ + tests/hyperv/sbin/virt-what-cpuid-helper \ tests/kvm/proc/cpuinfo \ tests/kvm/proc/self/status \ tests/kvm/sbin/dmidecode \ @@ -229,6 +234,11 @@ tests/linux-vserver/sbin/dmidecode \ tests/linux-vserver/sbin/id \ tests/linux-vserver/sbin/virt-what-cpuid-helper \ + tests/parallels-desktop/proc/cpuinfo \ + tests/parallels-desktop/proc/self/status \ + tests/parallels-desktop/sbin/dmidecode \ + tests/parallels-desktop/sbin/id \ + tests/parallels-desktop/sbin/virt-what-cpuid-helper \ tests/qemu/proc/cpuinfo \ tests/qemu/proc/self/status \ tests/qemu/sbin/dmidecode \ @@ -295,23 +305,27 @@ tests/zvm/sbin/virt-what-cpuid-helper \ tests/test-baremetal.sh \ tests/test-esx4.1.sh \ + tests/test-hyperv.sh \ tests/test-kvm.sh \ tests/test-linux-vserver.sh \ + tests/test-parallels-desktop.sh \ tests/test-qemu.sh \ tests/test-rhel5-xen-dom0.sh \ tests/test-rhel5-xen-domU-hvm.sh \ tests/test-rhel5-xen-domU-pv.sh \ tests/test-zvm.sh -CLEANFILES = virt-what.1 virt-what.txt +CLEANFILES = virt-what virt-what.1 virt-what.txt AM_CPPFLAGS = -Wall sbin_SCRIPTS = virt-what man_MANS = virt-what.1 TESTS = \ tests/test-baremetal.sh \ tests/test-esx4.1.sh \ + tests/test-hyperv.sh \ tests/test-kvm.sh \ tests/test-linux-vserver.sh \ + tests/test-parallels-desktop.sh \ tests/test-qemu.sh \ tests/test-rhel5-xen-dom0.sh \ tests/test-rhel5-xen-domU-hvm.sh \ diff --git a/configure b/configure index 99aa938..4699d69 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.66 for virt-what 1.7. +# Generated by GNU Autoconf 2.66 for virt-what 1.8. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -548,8 +548,8 @@ # Identity of this package. PACKAGE_NAME='virt-what' PACKAGE_TARNAME='virt-what' -PACKAGE_VERSION='1.7' -PACKAGE_STRING='virt-what 1.7' +PACKAGE_VERSION='1.8' +PACKAGE_STRING='virt-what 1.8' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1190,7 +1190,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures virt-what 1.7 to adapt to many kinds of systems. +\`configure' configures virt-what 1.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1256,7 +1256,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of virt-what 1.7:";; + short | recursive ) echo "Configuration of virt-what 1.8:";; esac cat <<\_ACEOF @@ -1343,7 +1343,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -virt-what configure 1.7 +virt-what configure 1.8 generated by GNU Autoconf 2.66 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1435,7 +1435,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by virt-what $as_me 1.7, which was +It was created by virt-what $as_me 1.8, which was generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ @@ -2250,7 +2250,7 @@ # Define the identity of the package. PACKAGE='virt-what' - VERSION='1.7' + VERSION='1.8' cat >>confdefs.h <<_ACEOF @@ -4375,7 +4375,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by virt-what $as_me 1.7, which was +This file was extended by virt-what $as_me 1.8, which was generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4441,7 +4441,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -virt-what config.status 1.7 +virt-what config.status 1.8 configured by $0, generated by GNU Autoconf 2.66, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 318debd..50bad58 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -AC_INIT([virt-what],[1.7]) +AC_INIT([virt-what],[1.8]) AM_INIT_AUTOMAKE([foreign]) dnl Check for basic C environment. diff --git a/tests/hyperv/proc/cpuinfo b/tests/hyperv/proc/cpuinfo new file mode 100644 index 0000000..0559ab4 --- /dev/null +++ b/tests/hyperv/proc/cpuinfo @@ -0,0 +1,24 @@ +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 15 +model name : Intel(R) Xeon(R) CPU 5130 @ 2.00GHz +stepping : 6 +cpu MHz : 1977.298 +cache size : 4096 KB +physical id : 0 +siblings : 1 +core id : 0 +cpu cores : 1 +apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 6 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc up pni ssse3 cx16 lahf_lm +bogomips : 3954.59 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual +power management: + diff --git a/tests/hyperv/proc/self/status b/tests/hyperv/proc/self/status new file mode 100644 index 0000000..fd4a88e --- /dev/null +++ b/tests/hyperv/proc/self/status @@ -0,0 +1,36 @@ +Name: cat +State: R (running) +SleepAVG: 88% +Tgid: 4747 +Pid: 4747 +PPid: 3409 +TracerPid: 0 +Uid: 0 0 0 0 +Gid: 0 0 0 0 +FDSize: 256 +Groups: 0 1 2 3 4 6 10 +VmPeak: 58944 kB +VmSize: 58944 kB +VmLck: 0 kB +VmHWM: 528 kB +VmRSS: 528 kB +VmData: 180 kB +VmStk: 88 kB +VmExe: 20 kB +VmLib: 1448 kB +VmPTE: 36 kB +StaBrk: 19d39000 kB +Brk: 19d5a000 kB +StaStk: 7fff02c16930 kB +Threads: 1 +SigQ: 1/8191 +SigPnd: 0000000000000000 +ShdPnd: 0000000000000000 +SigBlk: 0000000000000000 +SigIgn: 0000000000000000 +SigCgt: 0000000000000000 +CapInh: 0000000000000000 +CapPrm: 00000000fffffeff +CapEff: 00000000fffffeff +Cpus_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,7fffffff,ffffffff +Mems_allowed: 00000000,00000001 diff --git a/tests/hyperv/sbin/dmidecode b/tests/hyperv/sbin/dmidecode new file mode 100755 index 0000000..d126757 --- /dev/null +++ b/tests/hyperv/sbin/dmidecode @@ -0,0 +1,965 @@ +#!/bin/sh - +cat <<'EOF' +# dmidecode 2.10 +SMBIOS 2.3 present. +67 structures occupying 3752 bytes. +Table at 0x000F8850. + +Handle 0x0000, DMI type 0, 20 bytes +BIOS Information + Vendor: American Megatrends Inc. + Version: 080002 + Release Date: 05/05/2008 + Address: 0xF0000 + Runtime Size: 64 kB + ROM Size: 256 kB + Characteristics: + ISA is supported + PCI is supported + PNP is supported + BIOS is upgradeable + BIOS shadowing is allowed + ESCD support is available + Boot from CD is supported + Selectable boot is supported + BIOS ROM is socketed + EDD is supported + 5.25"/360 kB floppy services are supported (int 13h) + 5.25"/1.2 MB floppy services are supported (int 13h) + 3.5"/720 kB floppy services are supported (int 13h) + 3.5"/2.88 MB floppy services are supported (int 13h) + Print screen service is supported (int 5h) + 8042 keyboard services are supported (int 9h) + Serial services are supported (int 14h) + Printer services are supported (int 17h) + CGA/mono video services are supported (int 10h) + AGP is supported + LS-120 boot is supported + ATAPI Zip drive boot is supported + BIOS boot specification is supported + +Handle 0x0001, DMI type 1, 25 bytes +System Information + Manufacturer: Microsoft Corporation + Product Name: Virtual Machine + Version: 5.0 + Serial Number: 9531-7949-1919-0512-8596-0146-27 + UUID: 87123C54-42BA-694D-90FF-FD3B05DCDB42 + Wake-up Type: Power Switch + +Handle 0x0002, DMI type 2, 8 bytes +Base Board Information + Manufacturer: Microsoft Corporation + Product Name: Virtual Machine + Version: 5.0 + Serial Number: 9531-7949-1919-0512-8596-0146-27 + +Handle 0x0003, DMI type 3, 17 bytes +Chassis Information + Manufacturer: Microsoft Corporation + Type: Desktop + Lock: Not Present + Version: 5.0 + Serial Number: 9531-7949-1919-0512-8596-0146-27 + Asset Tag: 4703-2669-3135-1081-7372-7632-77 + Boot-up State: Safe + Power Supply State: Safe + Thermal State: Other + Security Status: Other + OEM Information: 0x00000000 + +Handle 0x0004, DMI type 11, 5 bytes +OEM Strings + String 1: [MS_VM_CERT/SHA1/9b80ca0d5dd061ec9da4e494f4c3fd1196270c22] + String 2: 00000000000000000000000000000000 + String 3: To be filed by MSFT + +Handle 0x0005, DMI type 4, 35 bytes +Processor Information + Socket Designation: MKF_PROCESSOR_SOCKET_DESIGNATION_1 + Type: Central Processor + Family: Pentium III + Manufacturer: Intel + ID: F6 06 00 00 FF FB 8B 1F + Signature: Type 0, Family 6, Model 15, Stepping 6 + Flags: + FPU (Floating-point unit on-chip) + VME (Virtual mode extension) + DE (Debugging extension) + PSE (Page size extension) + TSC (Time stamp counter) + MSR (Model specific registers) + PAE (Physical address extension) + MCE (Machine check exception) + CX8 (CMPXCHG8 instruction supported) + APIC (On-chip APIC hardware supported) + SEP (Fast system call) + MTRR (Memory type range registers) + PGE (Page global enable) + MCA (Machine check architecture) + CMOV (Conditional move instruction supported) + PAT (Page attribute table) + PSE-36 (36-bit page size extension) + CLFSH (CLFLUSH instruction supported) + MMX (MMX technology supported) + FXSR (Fast floating-point save and restore) + SSE (Streaming SIMD extensions) + SSE2 (Streaming SIMD extensions 2) + SS (Self-snoop) + HTT (Hyper-threading technology) + Version: Genuine Intel(R) Processor + Voltage: 3.3 V 2.9 V + External Clock: 66 MHz + Max Speed: 333 MHz + Current Speed: 333 MHz + Status: Populated, Enabled + Upgrade: 370-pin Socket + L1 Cache Handle: 0x0006 + L2 Cache Handle: 0x0007 + L3 Cache Handle: 0x0008 + Serial Number: MKF_PROCESSOR_SERIAL_NO_1 + Asset Tag: MKF_PROCESSOR_ASSET_TAG_1 + Part Number: MKF_PROCESSOR_PART_NO_1 + +Handle 0x0006, DMI type 7, 19 bytes +Cache Information + Socket Designation: L1-Cache + Configuration: Disabled, Not Socketed, Level 1 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0007, DMI type 7, 19 bytes +Cache Information + Socket Designation: L2-cache + Configuration: Disabled, Not Socketed, Level 2 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0008, DMI type 7, 19 bytes +Cache Information + Socket Designation: L3-cache + Configuration: Disabled, Not Socketed, Level 3 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0009, DMI type 4, 35 bytes +Processor Information + Socket Designation: MKF_PROCESSOR_SOCKET_DESIGNATION_2 + Type: Other + Family: Other + Manufacturer: + ID: 00 00 00 00 00 00 00 00 + Version: + Voltage: 3.3 V 2.9 V + External Clock: Unknown + Max Speed: 500 MHz + Current Speed: Unknown + Status: Unpopulated + Upgrade: None + L1 Cache Handle: 0x000A + L2 Cache Handle: 0x000B + L3 Cache Handle: 0x000C + Serial Number: MKF_PROCESSOR_SERIAL_NO_2 + Asset Tag: MKF_PROCESSOR_ASSET_TAG_2 + Part Number: MKF_PROCESSOR_PART_NO_2 + +Handle 0x000A, DMI type 7, 19 bytes +Cache Information + Socket Designation: L1-Cache + Configuration: Disabled, Not Socketed, Level 1 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x000B, DMI type 7, 19 bytes +Cache Information + Socket Designation: L2-cache + Configuration: Disabled, Not Socketed, Level 2 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x000C, DMI type 7, 19 bytes +Cache Information + Socket Designation: L3-cache + Configuration: Disabled, Not Socketed, Level 3 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x000D, DMI type 4, 35 bytes +Processor Information + Socket Designation: MKF_PROCESSOR_SOCKET_DESIGNATION_3 + Type: Other + Family: Other + Manufacturer: + ID: 00 00 00 00 00 00 00 00 + Version: + Voltage: 3.3 V 2.9 V + External Clock: Unknown + Max Speed: 500 MHz + Current Speed: Unknown + Status: Unpopulated + Upgrade: None + L1 Cache Handle: 0x000E + L2 Cache Handle: 0x000F + L3 Cache Handle: 0x0010 + Serial Number: MKF_PROCESSOR_SERIAL_NO_3 + Asset Tag: MKF_PROCESSOR_ASSET_TAG_3 + Part Number: MKF_PROCESSOR_PART_NO_3 + +Handle 0x000E, DMI type 7, 19 bytes +Cache Information + Socket Designation: L1-Cache + Configuration: Disabled, Not Socketed, Level 1 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x000F, DMI type 7, 19 bytes +Cache Information + Socket Designation: L2-cache + Configuration: Disabled, Not Socketed, Level 2 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0010, DMI type 7, 19 bytes +Cache Information + Socket Designation: L3-cache + Configuration: Disabled, Not Socketed, Level 3 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0011, DMI type 4, 35 bytes +Processor Information + Socket Designation: MKF_PROCESSOR_SOCKET_DESIGNATION_4 + Type: Other + Family: Other + Manufacturer: + ID: 00 00 00 00 00 00 00 00 + Version: + Voltage: 3.3 V 2.9 V + External Clock: Unknown + Max Speed: 500 MHz + Current Speed: Unknown + Status: Unpopulated + Upgrade: None + L1 Cache Handle: 0x0012 + L2 Cache Handle: 0x0013 + L3 Cache Handle: 0x0014 + Serial Number: MKF_PROCESSOR_SERIAL_NO_4 + Asset Tag: MKF_PROCESSOR_ASSET_TAG_4 + Part Number: MKF_PROCESSOR_PART_NO_4 + +Handle 0x0012, DMI type 7, 19 bytes +Cache Information + Socket Designation: L1-Cache + Configuration: Disabled, Not Socketed, Level 1 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0013, DMI type 7, 19 bytes +Cache Information + Socket Designation: L2-cache + Configuration: Disabled, Not Socketed, Level 2 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0014, DMI type 7, 19 bytes +Cache Information + Socket Designation: L3-cache + Configuration: Disabled, Not Socketed, Level 3 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0015, DMI type 4, 35 bytes +Processor Information + Socket Designation: MKF_PROCESSOR_SOCKET_DESIGNATION_5 + Type: Other + Family: Other + Manufacturer: + ID: 00 00 00 00 00 00 00 00 + Version: + Voltage: 3.3 V 2.9 V + External Clock: Unknown + Max Speed: 500 MHz + Current Speed: Unknown + Status: Unpopulated + Upgrade: None + L1 Cache Handle: 0x0016 + L2 Cache Handle: 0x0017 + L3 Cache Handle: 0x0018 + Serial Number: MKF_PROCESSOR_SERIAL_NO_5 + Asset Tag: MKF_PROCESSOR_ASSET_TAG_5 + Part Number: MKF_PROCESSOR_PART_NO_5 + +Handle 0x0016, DMI type 7, 19 bytes +Cache Information + Socket Designation: L1-Cache + Configuration: Disabled, Not Socketed, Level 1 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0017, DMI type 7, 19 bytes +Cache Information + Socket Designation: L2-cache + Configuration: Disabled, Not Socketed, Level 2 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0018, DMI type 7, 19 bytes +Cache Information + Socket Designation: L3-cache + Configuration: Disabled, Not Socketed, Level 3 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0019, DMI type 4, 35 bytes +Processor Information + Socket Designation: MKF_PROCESSOR_SOCKET_DESIGNATION_6 + Type: Other + Family: Other + Manufacturer: + ID: 00 00 00 00 00 00 00 00 + Version: + Voltage: 3.3 V 2.9 V + External Clock: Unknown + Max Speed: 500 MHz + Current Speed: Unknown + Status: Unpopulated + Upgrade: None + L1 Cache Handle: 0x001A + L2 Cache Handle: 0x001B + L3 Cache Handle: 0x001C + Serial Number: MKF_PROCESSOR_SERIAL_NO_6 + Asset Tag: MKF_PROCESSOR_ASSET_TAG_6 + Part Number: MKF_PROCESSOR_PART_NO_6 + +Handle 0x001A, DMI type 7, 19 bytes +Cache Information + Socket Designation: L1-Cache + Configuration: Disabled, Not Socketed, Level 1 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x001B, DMI type 7, 19 bytes +Cache Information + Socket Designation: L2-cache + Configuration: Disabled, Not Socketed, Level 2 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x001C, DMI type 7, 19 bytes +Cache Information + Socket Designation: L3-cache + Configuration: Disabled, Not Socketed, Level 3 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x001D, DMI type 4, 35 bytes +Processor Information + Socket Designation: MKF_PROCESSOR_SOCKET_DESIGNATION_7 + Type: Other + Family: Other + Manufacturer: + ID: 00 00 00 00 00 00 00 00 + Version: + Voltage: 3.3 V 2.9 V + External Clock: Unknown + Max Speed: 500 MHz + Current Speed: Unknown + Status: Unpopulated + Upgrade: None + L1 Cache Handle: 0x001E + L2 Cache Handle: 0x001F + L3 Cache Handle: 0x0020 + Serial Number: MKF_PROCESSOR_SERIAL_NO_7 + Asset Tag: MKF_PROCESSOR_ASSET_TAG_7 + Part Number: MKF_PROCESSOR_PART_NO_7 + +Handle 0x001E, DMI type 7, 19 bytes +Cache Information + Socket Designation: L1-Cache + Configuration: Disabled, Not Socketed, Level 1 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x001F, DMI type 7, 19 bytes +Cache Information + Socket Designation: L2-cache + Configuration: Disabled, Not Socketed, Level 2 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0020, DMI type 7, 19 bytes +Cache Information + Socket Designation: L3-cache + Configuration: Disabled, Not Socketed, Level 3 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0021, DMI type 4, 35 bytes +Processor Information + Socket Designation: MKF_PROCESSOR_SOCKET_DESIGNATION_8 + Type: Other + Family: Other + Manufacturer: + ID: 00 00 00 00 00 00 00 00 + Version: + Voltage: 3.3 V 2.9 V + External Clock: Unknown + Max Speed: 500 MHz + Current Speed: Unknown + Status: Unpopulated + Upgrade: None + L1 Cache Handle: 0x0022 + L2 Cache Handle: 0x0023 + L3 Cache Handle: 0x0024 + Serial Number: MKF_PROCESSOR_SERIAL_NO_8 + Asset Tag: MKF_PROCESSOR_ASSET_TAG_8 + Part Number: MKF_PROCESSOR_PART_NO_8 + +Handle 0x0022, DMI type 7, 19 bytes +Cache Information + Socket Designation: L1-Cache + Configuration: Disabled, Not Socketed, Level 1 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0023, DMI type 7, 19 bytes +Cache Information + Socket Designation: L2-cache + Configuration: Disabled, Not Socketed, Level 2 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0024, DMI type 7, 19 bytes +Cache Information + Socket Designation: L3-cache + Configuration: Disabled, Not Socketed, Level 3 + Operational Mode: Unknown + Location: Internal + Installed Size: 0 kB + Maximum Size: 0 kB + Supported SRAM Types: + Unknown + Installed SRAM Type: Unknown + Speed: Unknown + Error Correction Type: Unknown + System Type: Unknown + Associativity: Unknown + +Handle 0x0025, DMI type 5, 24 bytes +Memory Controller Information + Error Detecting Method: 64-bit ECC + Error Correcting Capabilities: + None + Supported Interleave: One-way Interleave + Current Interleave: One-way Interleave + Maximum Memory Module Size: 512 MB + Maximum Total Memory Size: 2048 MB + Supported Speeds: + 70 ns + 60 ns + Supported Memory Types: + Other + Unknown + Standard + FPM + EDO + Parity + ECC + SIMM + DIMM + Burst EDO + SDRAM + Memory Module Voltage: 3.3 V + Associated Memory Slots: 4 + 0x0026 + 0x0027 + 0x0028 + 0x0029 + Enabled Error Correcting Capabilities: + None + +Handle 0x0026, DMI type 6, 12 bytes +Memory Module Information + Socket Designation: DIMM1 + Bank Connections: 0 0 + Current Speed: Unknown + Type: EDO DIMM + Installed Size: 16 MB (Single-bank Connection) + Enabled Size: 16 MB (Single-bank Connection) + Error Status: OK + +Handle 0x0027, DMI type 6, 12 bytes +Memory Module Information + Socket Designation: DIMM2 + Bank Connections: 0 0 + Current Speed: Unknown + Type: EDO DIMM + Installed Size: 16 MB (Single-bank Connection) + Enabled Size: 16 MB (Single-bank Connection) + Error Status: OK + +Handle 0x0028, DMI type 6, 12 bytes +Memory Module Information + Socket Designation: DIMM3 + Bank Connections: 0 0 + Current Speed: Unknown + Type: EDO DIMM + Installed Size: 16 MB (Single-bank Connection) + Enabled Size: 16 MB (Single-bank Connection) + Error Status: OK + +Handle 0x0029, DMI type 6, 12 bytes +Memory Module Information + Socket Designation: DIMM4 + Bank Connections: 0 0 + Current Speed: Unknown + Type: EDO DIMM + Installed Size: 16 MB (Single-bank Connection) + Enabled Size: 16 MB (Single-bank Connection) + Error Status: OK + +Handle 0x002A, DMI type 8, 9 bytes +Port Connector Information + Internal Reference Designator: USB + Internal Connector Type: Centronics + External Reference Designator: USB1 + External Connector Type: Centronics + Port Type: USB + +Handle 0x002B, DMI type 8, 9 bytes +Port Connector Information + Internal Reference Designator: USB + Internal Connector Type: Centronics + External Reference Designator: USB2 + External Connector Type: Centronics + Port Type: USB + +Handle 0x002C, DMI type 8, 9 bytes +Port Connector Information + Internal Reference Designator: COM1 + Internal Connector Type: DB-9 female + External Reference Designator: COM1 + External Connector Type: DB-9 female + Port Type: Serial Port 16550A Compatible + +Handle 0x002D, DMI type 8, 9 bytes +Port Connector Information + Internal Reference Designator: COM2 + Internal Connector Type: DB-9 female + External Reference Designator: COM2 + External Connector Type: DB-9 female + Port Type: Serial Port 16550A Compatible + +Handle 0x002E, DMI type 8, 9 bytes +Port Connector Information + Internal Reference Designator: Printer + Internal Connector Type: DB-25 male + External Reference Designator: Lpt1 + External Connector Type: DB-25 male + Port Type: Parallel Port ECP/EPP + +Handle 0x002F, DMI type 8, 9 bytes +Port Connector Information + Internal Reference Designator: Video + Internal Connector Type: DB-15 male + External Reference Designator: Video + External Connector Type: DB-15 female + Port Type: Video Port + +Handle 0x0030, DMI type 8, 9 bytes +Port Connector Information + Internal Reference Designator: Keyboard + Internal Connector Type: PS/2 + External Reference Designator: Keyboard + External Connector Type: PS/2 + Port Type: Keyboard Port + +Handle 0x0031, DMI type 8, 9 bytes +Port Connector Information + Internal Reference Designator: Mouse + Internal Connector Type: PS/2 + External Reference Designator: Mouse + External Connector Type: PS/2 + Port Type: Mouse Port + +Handle 0x0032, DMI type 10, 6 bytes +On Board Device Information + Type: Video + Status: Enabled + Description: To Be filled by O.E.M. + +Handle 0x0033, DMI type 12, 5 bytes +System Configuration Options + Option 1: To Be Filled By O.E.M. + Option 2: To Be Filled By O.E.M. + Option 3: To Be Filled By O.E.M. + +Handle 0x0034, DMI type 13, 22 bytes +BIOS Language Information + Installable Languages: 1 + enUS + Currently Installed Language: enUS + +Handle 0x0035, DMI type 18, 23 bytes +32-bit Memory Error Information + Type: Bad Read + Granularity: Device Level + Operation: Read + Vendor Syndrome: Unknown + Memory Array Address: Unknown + Device Address: Unknown + Resolution: Unknown + +Handle 0x0036, DMI type 16, 15 bytes +Physical Memory Array + Location: System Board Or Motherboard + Use: System Memory + Error Correction Type: None + Maximum Capacity: 3 GB + Error Information Handle: 0x0035 + Number Of Devices: 4 + +Handle 0x0037, DMI type 19, 15 bytes +Memory Array Mapped Address + Starting Address: 0x00000000000 + Ending Address: 0x100000003FF + Range Size: 1073741825 kB + Physical Array Handle: 0x0036 + Partition Width: 0 + +Handle 0x0038, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x0036 + Error Information Handle: 0x0035 + Total Width: 64 bits + Data Width: 72 bits + Size: 16 MB + Form Factor: DIMM + Set: None + Locator: DIMM1 + Bank Locator: BANK0 + Type: SDRAM + Type Detail: Synchronous + Speed: Unknown + Manufacturer: Manufacturer1 + Serial Number: SerNum1 + Asset Tag: AssetTagNum1 + Part Number: PartNum1 + +Handle 0x0039, DMI type 20, 19 bytes +Memory Device Mapped Address + Starting Address: 0x00000000000 + Ending Address: 0x000010003FF + Range Size: 16385 kB + Physical Device Handle: 0x0038 + Memory Array Mapped Address Handle: 0x0037 + Partition Row Position: 1 + Interleaved Data Depth: 1 + +Handle 0x003A, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x0036 + Error Information Handle: 0x0035 + Total Width: 64 bits + Data Width: 72 bits + Size: 16 MB + Form Factor: DIMM + Set: None + Locator: DIMM2 + Bank Locator: BANK1 + Type: SDRAM + Type Detail: Synchronous + Speed: Unknown + Manufacturer: Manufacturer2 + Serial Number: SerNum2 + Asset Tag: AssetTagNum2 + Part Number: PartNum2 + +Handle 0x003B, DMI type 20, 19 bytes +Memory Device Mapped Address + Starting Address: 0x00001000000 + Ending Address: 0x000020003FF + Range Size: 16385 kB + Physical Device Handle: 0x003A + Memory Array Mapped Address Handle: 0x0037 + Partition Row Position: 1 + Interleaved Data Depth: 1 + +Handle 0x003C, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x0036 + Error Information Handle: 0x0035 + Total Width: 64 bits + Data Width: 72 bits + Size: 16 MB + Form Factor: DIMM + Set: None + Locator: DIMM2 + Bank Locator: BANK1 + Type: SDRAM + Type Detail: Synchronous + Speed: Unknown + Manufacturer: Manufacturer2 + Serial Number: SerNum2 + Asset Tag: AssetTagNum2 + Part Number: PartNum2 + +Handle 0x003D, DMI type 20, 19 bytes +Memory Device Mapped Address + Starting Address: 0x00002000000 + Ending Address: 0x000030003FF + Range Size: 16385 kB + Physical Device Handle: 0x003C + Memory Array Mapped Address Handle: 0x0037 + Partition Row Position: 1 + Interleaved Data Depth: 1 + +Handle 0x003E, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x0036 + Error Information Handle: 0x0035 + Total Width: 64 bits + Data Width: 72 bits + Size: 16 MB + Form Factor: DIMM + Set: None + Locator: DIMM2 + Bank Locator: BANK1 + Type: SDRAM + Type Detail: Synchronous + Speed: Unknown + Manufacturer: Manufacturer2 + Serial Number: SerNum2 + Asset Tag: AssetTagNum2 + Part Number: PartNum2 + +Handle 0x003F, DMI type 20, 19 bytes +Memory Device Mapped Address + Starting Address: 0x00003000000 + Ending Address: 0x000040003FF + Range Size: 16385 kB + Physical Device Handle: 0x003E + Memory Array Mapped Address Handle: 0x0037 + Partition Row Position: 1 + Interleaved Data Depth: 1 + +Handle 0x0040, DMI type 23, 13 bytes +System Reset + Status: Disabled + Watchdog Timer: Not Present + +Handle 0x0041, DMI type 32, 20 bytes +System Boot Information + Status: No errors detected + +Handle 0x0042, DMI type 127, 4 bytes +End Of Table + +EOF diff --git a/tests/hyperv/sbin/id b/tests/hyperv/sbin/id new file mode 100755 index 0000000..6c704ac --- /dev/null +++ b/tests/hyperv/sbin/id @@ -0,0 +1,2 @@ +#!/bin/sh - +echo 0 diff --git a/tests/hyperv/sbin/virt-what-cpuid-helper b/tests/hyperv/sbin/virt-what-cpuid-helper new file mode 100755 index 0000000..1604462 --- /dev/null +++ b/tests/hyperv/sbin/virt-what-cpuid-helper @@ -0,0 +1,3 @@ +#!/bin/sh - +echo "Microsoft Hv" + diff --git a/tests/parallels-desktop/proc/cpuinfo b/tests/parallels-desktop/proc/cpuinfo new file mode 100644 index 0000000..e97e64a --- /dev/null +++ b/tests/parallels-desktop/proc/cpuinfo @@ -0,0 +1,19 @@ +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 23 +model name : Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz +stepping : 10 +cpu MHz : 2400.113 +cache size : 3072 KB +fpu : yes +fpu_exception : yes +cpuid level : 13 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc up arch_perfmon rep_good aperfmperf pni ssse3 cx16 sse4_1 x2apic hypervisor lahf_lm +bogomips : 4800.22 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual +power management: + diff --git a/tests/parallels-desktop/proc/self/status b/tests/parallels-desktop/proc/self/status new file mode 100644 index 0000000..515c3be --- /dev/null +++ b/tests/parallels-desktop/proc/self/status @@ -0,0 +1,39 @@ +Name: cat +State: R (running) +Tgid: 3437 +Pid: 3437 +PPid: 3370 +TracerPid: 0 +Uid: 0 0 0 0 +Gid: 0 0 0 0 +Utrace: 0 +FDSize: 256 +Groups: 0 1 2 3 4 6 10 +VmPeak: 101052 kB +VmSize: 101052 kB +VmLck: 0 kB +VmHWM: 480 kB +VmRSS: 480 kB +VmData: 184 kB +VmStk: 136 kB +VmExe: 44 kB +VmLib: 1772 kB +VmPTE: 48 kB +VmSwap: 0 kB +Threads: 1 +SigQ: 0/3797 +SigPnd: 0000000000000000 +ShdPnd: 0000000000000000 +SigBlk: 0000000000000000 +SigIgn: 0000000000000000 +SigCgt: 0000000000000000 +CapInh: 0000000000000000 +CapPrm: ffffffffffffffff +CapEff: ffffffffffffffff +CapBnd: ffffffffffffffff +Cpus_allowed: ffff +Cpus_allowed_list: 0-15 +Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 +Mems_allowed_list: 0 +voluntary_ctxt_switches: 0 +nonvoluntary_ctxt_switches: 0 diff --git a/tests/parallels-desktop/sbin/dmidecode b/tests/parallels-desktop/sbin/dmidecode new file mode 100755 index 0000000..b6f1d3a --- /dev/null +++ b/tests/parallels-desktop/sbin/dmidecode @@ -0,0 +1,249 @@ +#!/bin/sh - +cat <<'EOF' +# dmidecode 2.11 +SMBIOS 2.3 present. +20 structures occupying 896 bytes. +Table at 0x000F6120. + +Handle 0x0000, DMI type 0, 20 bytes +BIOS Information + Vendor: Parallels Software International Inc. + Version: 6.0.11992.625164 + Release Date: 10/26/2007 + Address: 0xF0000 + Runtime Size: 64 kB + ROM Size: 64 kB + Characteristics: + ISA is supported + PCI is supported + PNP is supported + APM is supported + VLB is supported + Boot from CD is supported + 8042 keyboard services are supported (int 9h) + Serial services are supported (int 14h) + Printer services are supported (int 17h) + CGA/mono video services are supported (int 10h) + ACPI is supported + +Handle 0x0001, DMI type 1, 25 bytes +System Information + Manufacturer: Parallels Software International Inc. + Product Name: Parallels Virtual Platform + Version: None + Serial Number: Parallels-1C 6B FF 34 0F 96 46 DF A0 F6 60 D1 53 56 B8 5A + UUID: 1C6BFF34-0F96-46DF-A0F6-60D15356B85A + Wake-up Type: Power Switch + +Handle 0x0002, DMI type 2, 8 bytes +Base Board Information + Manufacturer: Parallels Software International Inc. + Product Name: Parallels Virtual Platform + Version: None + Serial Number: None + +Handle 0x0003, DMI type 3, 18 bytes +Chassis Information + Manufacturer: Parallels Software International Inc. + Type: Unknown + Lock: Not Present + Version: + Serial Number: + Asset Tag: + Boot-up State: Safe + Power Supply State: Safe + Thermal State: Safe + Security Status: None + OEM Information: 0x00000000 + +Handle 0x0004, DMI type 4, 35 bytes +Processor Information + Socket Designation: CPU Socket #0 + Type: Central Processor + Family: Unknown + Manufacturer: GenuineIntel + ID: 7A 06 01 00 FF FB EB BF + Version: Not Specified + Voltage: 3.3 V + External Clock: 400 MHz + Max Speed: 2400 MHz + Current Speed: 2400 MHz + Status: Populated, Enabled + Upgrade: Other + L1 Cache Handle: Not Provided + L2 Cache Handle: Not Provided + L3 Cache Handle: Not Provided + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + +Handle 0x0005, DMI type 9, 13 bytes +System Slot Information + Designation: ISA slot 1 + Type: 16-bit ISA + Current Usage: Unknown + Length: Unknown + Characteristics: + 3.3 V is provided + +Handle 0x0006, DMI type 9, 13 bytes +System Slot Information + Designation: PCI slot 1 + Type: 32-bit PCI + Current Usage: Unknown + Length: Unknown + ID: 1 + Characteristics: + 3.3 V is provided + +Handle 0x0007, DMI type 9, 13 bytes +System Slot Information + Designation: PCI slot 2 + Type: 32-bit PCI + Current Usage: Unknown + Length: Unknown + ID: 2 + Characteristics: + 3.3 V is provided + +Handle 0x0008, DMI type 9, 13 bytes +System Slot Information + Designation: PCI slot 3 + Type: 32-bit PCI + Current Usage: Unknown + Length: Unknown + ID: 3 + Characteristics: + 3.3 V is provided + +Handle 0x0009, DMI type 9, 13 bytes +System Slot Information + Designation: PCI slot 4 + Type: 32-bit PCI + Current Usage: Unknown + Length: Unknown + ID: 4 + Characteristics: + 3.3 V is provided + +Handle 0x000A, DMI type 9, 13 bytes +System Slot Information + Designation: PCI slot 5 + Type: 32-bit PCI + Current Usage: Unknown + Length: Unknown + ID: 5 + Characteristics: + 3.3 V is provided + +Handle 0x000B, DMI type 10, 8 bytes +On Board Device 1 Information + Type: Video + Status: Disabled + Description: Parallels Video Adapter +On Board Device 2 Information + Type: Sound + Status: Disabled + Description: Parallels Sound Adapter + +Handle 0x000C, DMI type 16, 15 bytes +Physical Memory Array + Location: System Board Or Motherboard + Use: System Memory + Error Correction Type: None + Maximum Capacity: 8 GB + Error Information Handle: Not Provided + Number Of Devices: 4 + +Handle 0x000D, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x000C + Error Information Handle: Not Provided + Total Width: 32 bits + Data Width: 32 bits + Size: 512 MB + Form Factor: DIMM + Set: None + Locator: DIMM #0 + Bank Locator: BANK #0 + Type: DRAM + Type Detail: EDO + Speed: 667 MHz + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + +Handle 0x000E, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x000C + Error Information Handle: Not Provided + Total Width: 32 bits + Data Width: 32 bits + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM #1 + Bank Locator: BANK #1 + Type: DRAM + Type Detail: EDO + Speed: 667 MHz + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + +Handle 0x000F, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x000C + Error Information Handle: Not Provided + Total Width: 32 bits + Data Width: 32 bits + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM #2 + Bank Locator: BANK #2 + Type: DRAM + Type Detail: EDO + Speed: 667 MHz + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + +Handle 0x0010, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x000C + Error Information Handle: Not Provided + Total Width: 32 bits + Data Width: 32 bits + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM #3 + Bank Locator: BANK #3 + Type: DRAM + Type Detail: EDO + Speed: 667 MHz + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + +Handle 0x0011, DMI type 19, 15 bytes +Memory Array Mapped Address + Starting Address: 0x00000000000 + Ending Address: 0x0001FFFFFFF + Range Size: 512 MB + Physical Array Handle: 0x000C + Partition Width: 2 + +Handle 0x0012, DMI type 32, 20 bytes +System Boot Information + Status: No errors detected + +Handle 0x0013, DMI type 127, 4 bytes +End Of Table + +EOF diff --git a/tests/parallels-desktop/sbin/id b/tests/parallels-desktop/sbin/id new file mode 100755 index 0000000..6c704ac --- /dev/null +++ b/tests/parallels-desktop/sbin/id @@ -0,0 +1,2 @@ +#!/bin/sh - +echo 0 diff --git a/tests/parallels-desktop/sbin/virt-what-cpuid-helper b/tests/parallels-desktop/sbin/virt-what-cpuid-helper new file mode 100755 index 0000000..e918937 --- /dev/null +++ b/tests/parallels-desktop/sbin/virt-what-cpuid-helper @@ -0,0 +1,3 @@ +#!/bin/sh - +# It's unknown why Parallels reports itself as KVM. +echo KVMKVMKVM diff --git a/tests/test-hyperv.sh b/tests/test-hyperv.sh new file mode 100755 index 0000000..5015cc5 --- /dev/null +++ b/tests/test-hyperv.sh @@ -0,0 +1,34 @@ +# Test for Microsoft HyperV. +# Copyright (C) 2008-2011 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +root=tests/hyperv + +output="$(./virt-what --test-root=$root 2>&1)" +expected="hyperv" + +if [ "$output" != "$expected" ]; then + echo "$0: test failed because output did not match expected" + echo "Expected output was:" + echo "----------------------------------------" + echo "$expected" + echo "----------------------------------------" + echo "But the actual output of the program was:" + echo "----------------------------------------" + echo "$output" + echo "----------------------------------------" + exit 1 +fi diff --git a/tests/test-parallels-desktop.sh b/tests/test-parallels-desktop.sh new file mode 100755 index 0000000..20701fe --- /dev/null +++ b/tests/test-parallels-desktop.sh @@ -0,0 +1,35 @@ +# Test for Parallels Desktop (data contributed by Justin Clift). +# Data taken from Fedora 14 guest running in Parallels on a Mac Mini. +# Copyright (C) 2008-2011 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +root=tests/parallels-desktop + +output="$(./virt-what --test-root=$root 2>&1)" +expected="parallels" + +if [ "$output" != "$expected" ]; then + echo "$0: test failed because output did not match expected" + echo "Expected output was:" + echo "----------------------------------------" + echo "$expected" + echo "----------------------------------------" + echo "But the actual output of the program was:" + echo "----------------------------------------" + echo "$output" + echo "----------------------------------------" + exit 1 +fi diff --git a/virt-what-cpuid-helper.c b/virt-what-cpuid-helper.c index 3024c37..8b81be3 100644 --- a/virt-what-cpuid-helper.c +++ b/virt-what-cpuid-helper.c @@ -24,40 +24,60 @@ #include #if defined(__i386__) || defined(__x86_64__) -void -cpu_sig (char *sig) + +static unsigned int +cpuid (unsigned int eax, char *sig) { - unsigned int eax = 0x40000000; - unsigned int *sig32 = (unsigned int *)sig; + unsigned int *sig32 = (unsigned int *) sig; + asm volatile ( "xor %%ebx, %%ebx; cpuid" : "=a" (eax), "=b" (sig32[0]), "=c" (sig32[1]), "=d" (sig32[2]) : "0" (eax)); sig[12] = 0; + + return eax; } -#else -void -cpu_sig (char *sig) + +static void +cpu_sig (void) +{ + char sig[13]; + unsigned int base = 0x40000000, leaf = base; + unsigned int max_entries; + + memset (sig, 0, sizeof sig); + max_entries = cpuid (leaf, sig); + puts (sig); + + /* Most hypervisors only have information in leaf 0x40000000, but + * upstream Xen contains further leaf entries (in particular when + * used with Viridian [HyperV] extensions). CPUID is supposed to + * return the maximum leaf offset in %eax, so that's what we use, + * but only if it looks sensible. + */ + if (max_entries > 3 && max_entries < 0x10000) { + for (leaf = base + 0x100; leaf <= base + max_entries; leaf += 0x100) { + memset (sig, 0, sizeof sig); + cpuid (leaf, sig); + puts (sig); + } + } +} + +#else /* !i386, !x86_64 */ + +static void +cpu_sig (void) { /* nothing for other architectures */ } + #endif int main() { - char sig[13]; - - memset (sig, 0, sizeof sig); - - cpu_sig (sig); - - puts (sig); - /* Possible values: - * KVMKVMKVM KVM guest - * XenVMMXenVMM Xen HVM guest - * VMwareVMware VMware guest - */ - + cpu_sig (); return 0; } diff --git a/virt-what.in b/virt-what.in index 627f961..870c09b 100644 --- a/virt-what.in +++ b/virt-what.in @@ -100,8 +100,10 @@ fi # Check for VirtualPC. - -if echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation'; then +# The negative check for cpuid is to distinguish this from Hyper-V +# which also has the same manufacturer string in the SM-BIOS data. +if [ "$cpuid" != "Microsoft Hv" ] && + echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation'; then echo virtualpc fi @@ -156,6 +158,11 @@ echo ibm_systemz-direct fi fi +fi + +# Check for Parallels. +if echo "$dmi" | grep -q 'Vendor: Parallels'; then + echo parallels fi # Check for Xen. diff --git a/virt-what.pod b/virt-what.pod index 2e4a8b3..0a724d4 100644 --- a/virt-what.pod +++ b/virt-what.pod @@ -27,18 +27,19 @@ =item B -This is Hyper-V. - -Status: from MSDN description, not tested. +This is Microsoft Hyper-V hypervisor. + +Status: confirmed by RWMJ =item B -This is an IBM SystemZ (or other S/390) mainframe. Additional -facts listed below may also be printed. +This is an IBM SystemZ (or other S/390) hardware partitioning system. +Additional facts listed below may also be printed. =item B -This is Linux running directly on a IBM SystemZ mainframe. +This is Linux running directly on a IBM SystemZ hardware partitioning +system. This is expected to be a highly unusual configuration - if you see this result you should treat it with suspicion. @@ -47,13 +48,15 @@ =item B -This is Linux running directly on an LPAR on an IBM SystemZ mainframe. +This is Linux running directly on an LPAR on an IBM SystemZ +hardware partitioning system. Status: not confirmed =item B -This is a z/VM guest running in an LPAR on an IBM SystemZ mainframe. +This is a z/VM guest running in an LPAR on an IBM SystemZ +hardware partitioning system. Status: confirmed by RWMJ using a Fedora guest running in z/VM @@ -65,7 +68,12 @@ =item B -This is KVM. +This guest is running on the KVM hypervisor using hardware +acceleration. + +Note that if the hypervisor is using software acceleration +you should I see this, but should see the C fact +instead. Status: confirmed by RWMJ. @@ -76,6 +84,13 @@ Status: contributed by Evgeniy Sokolov +=item B + +The guest is running inside Parallels Virtual Platform +(Parallels Desktop, Parallels Server). + +Status: contributed by Justin Clift + =item B The guest is running inside IBM PowerVM Lx86 Linux/x86 emulator. @@ -84,7 +99,7 @@ =item B -This is QEMU using software emulation. +This is QEMU hypervisor using software emulation. Note that for KVM (hardware accelerated) guests you should I see this. @@ -99,7 +114,8 @@ =item B -This is Hitachi Virtualization Manager (HVM) Virtage logical partitioning. +This is Hitachi Virtualization Manager (HVM) Virtage +hardware partitioning system. Status: data supplied by Bhavna Sarathy, not confirmed @@ -117,13 +133,13 @@ =item B -The guest appears to be running on VMware. +The guest appears to be running on VMware hypervisor. Status: confirmed by RWMJ =item B -The guest appears to be running on Xen. +The guest appears to be running on Xen hypervisor. Status: confirmed by RWMJ