|
362 | 362 | #include <psapi.h> |
363 | 363 | #include <shlwapi.h> |
364 | 364 | #include <shlobj_core.h> |
365 | | -#include <dshow.h> |
366 | | -#include <io.h> |
367 | 365 | #include <winspool.h> |
368 | 366 | #include <powerbase.h> |
369 | 367 | #include <setupapi.h> |
370 | | -#include <mmdeviceapi.h> |
371 | | -#include <Functiondiscoverykeys_devpkey.h> |
372 | 368 | #include <mmsystem.h> |
373 | | -#include <queue> |
374 | 369 | #include <dxgi.h> |
375 | 370 | #include <d3d9.h> |
376 | 371 |
|
@@ -649,7 +644,6 @@ struct VM { |
649 | 644 | PROCESSOR_NUMBER, |
650 | 645 | NUMBER_OF_CORES, |
651 | 646 | ACPI_TEMPERATURE, |
652 | | - PROCESSOR_ID, |
653 | 647 | SYS_QEMU, |
654 | 648 | LSHW_QEMU, |
655 | 649 | VIRTUAL_PROCESSORS, |
@@ -1936,7 +1930,7 @@ struct VM { |
1936 | 1930 |
|
1937 | 1931 | #ifdef __VMAWARE_DEBUG__ |
1938 | 1932 | if (result) { |
1939 | | - core_debug("HYPER_X: root partition returned true"); |
| 1933 | + core_debug("HYPER_X: running under root partition"); |
1940 | 1934 | } |
1941 | 1935 | #endif |
1942 | 1936 | return result; |
@@ -7831,103 +7825,6 @@ struct VM { |
7831 | 7825 | } |
7832 | 7826 |
|
7833 | 7827 |
|
7834 | | - /** |
7835 | | - * @brief Check if any processor has an empty Processor ID using SMBIOS data |
7836 | | - * @category Windows |
7837 | | - * @author Requiem (https://github.com/NotRequiem) |
7838 | | - * @note https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.8.0.pdf (Section 7.5.3, page 54) |
7839 | | - * @implements VM::PROCESSOR_ID |
7840 | | - */ |
7841 | | - [[nodiscard]] static bool processor_id() { |
7842 | | -#if (!WINDOWS) |
7843 | | - return false; |
7844 | | -#else |
7845 | | -#pragma pack(push, 1) |
7846 | | - struct RawSMBIOSData { |
7847 | | - BYTE Used20CallingMethod; |
7848 | | - BYTE SMBIOSMajorVersion; |
7849 | | - BYTE SMBIOSMinorVersion; |
7850 | | - BYTE DmiRevision; |
7851 | | - DWORD Length; |
7852 | | - BYTE SMBIOSTableData[1]; |
7853 | | - }; |
7854 | | -#pragma pack(pop) |
7855 | | - |
7856 | | - UINT bufferSize = GetSystemFirmwareTable('RSMB', 0, nullptr, 0); |
7857 | | - if (bufferSize == 0) |
7858 | | - return false; |
7859 | | - |
7860 | | - std::vector<BYTE> buffer(bufferSize); |
7861 | | - if (GetSystemFirmwareTable('RSMB', 0, buffer.data(), bufferSize) != bufferSize) |
7862 | | - return false; |
7863 | | - |
7864 | | - if (buffer.size() < sizeof(RawSMBIOSData)) |
7865 | | - return false; |
7866 | | - |
7867 | | - RawSMBIOSData* raw = reinterpret_cast<RawSMBIOSData*>(buffer.data()); |
7868 | | - BYTE* tableData = raw->SMBIOSTableData; |
7869 | | - DWORD tableLength = raw->Length; |
7870 | | - BYTE* tableEnd = tableData + tableLength; |
7871 | | - BYTE* p = tableData; |
7872 | | - |
7873 | | - while (p < tableEnd) { |
7874 | | - // header: [Type (1B), Length (1B), Handle (2B)] |
7875 | | - if (p + 4 > tableEnd) |
7876 | | - break; |
7877 | | - |
7878 | | - BYTE type = p[0]; |
7879 | | - BYTE length = p[1]; |
7880 | | - |
7881 | | - if (length < 4 || (p + length) > tableEnd) |
7882 | | - break; |
7883 | | - |
7884 | | - // Processor Information (Type 4) structures, Processor ID field |
7885 | | - if (type == 4) { |
7886 | | - // the Processor ID is an 8‑byte field starting at offset 8 in the structure |
7887 | | - // Therefore, the structure must be at least 16 bytes long |
7888 | | - if (length >= 16) { |
7889 | | - BYTE* procId = p + 8; |
7890 | | - |
7891 | | -#ifdef __VMAWARE_DEBUG__ |
7892 | | - std::ostringstream oss; |
7893 | | - oss << "PROCESSOR_ID: "; |
7894 | | - for (int i = 0; i < 8; ++i) { |
7895 | | - oss << std::hex << std::setw(2) << std::setfill('0') |
7896 | | - << static_cast<int>(procId[i]) << " "; |
7897 | | - } |
7898 | | - debug(oss.str()); |
7899 | | -#endif |
7900 | | - bool allZero = true; |
7901 | | - for (int i = 0; i < 8; ++i) { |
7902 | | - if (procId[i] != 0) { |
7903 | | - allZero = false; |
7904 | | - break; |
7905 | | - } |
7906 | | - } |
7907 | | - if (allZero) { |
7908 | | - return true; |
7909 | | - } |
7910 | | - } |
7911 | | - } |
7912 | | - |
7913 | | - // Skip the formatted section |
7914 | | - BYTE* next = p + length; |
7915 | | - // Then skip the unformatted string-set (terminated by double-null) |
7916 | | - while (next < tableEnd - 1) { |
7917 | | - if (next[0] == 0 && next[1] == 0) { |
7918 | | - next += 2; |
7919 | | - break; |
7920 | | - } |
7921 | | - ++next; |
7922 | | - } |
7923 | | - p = next; |
7924 | | - } |
7925 | | - |
7926 | | - return false; |
7927 | | -#endif |
7928 | | - } |
7929 | | - |
7930 | | - |
7931 | 7828 | /** |
7932 | 7829 | * @brief Check for timing anomalies in the system |
7933 | 7830 | * @category x86 |
@@ -11339,7 +11236,6 @@ struct VM { |
11339 | 11236 | case PROCESSOR_NUMBER: return "PROCESSOR_NUMBER"; |
11340 | 11237 | case NUMBER_OF_CORES: return "NUMBER_OF_CORES"; |
11341 | 11238 | case ACPI_TEMPERATURE: return "ACPI_TEMPERATURE"; |
11342 | | - case PROCESSOR_ID: return "PROCESSOR_ID"; |
11343 | 11239 | case SYS_QEMU: return "SYS_QEMU"; |
11344 | 11240 | case LSHW_QEMU: return "LSHW_QEMU"; |
11345 | 11241 | case VIRTUAL_PROCESSORS: return "VIRTUAL_PROCESSORS"; |
@@ -11901,7 +11797,6 @@ std::pair<VM::enum_flags, VM::core::technique> VM::core::technique_list[] = { |
11901 | 11797 | std::make_pair(VM::PROCESSOR_NUMBER, VM::core::technique(50, VM::processor_number)), |
11902 | 11798 | std::make_pair(VM::NUMBER_OF_CORES, VM::core::technique(50, VM::number_of_cores)), |
11903 | 11799 | std::make_pair(VM::ACPI_TEMPERATURE, VM::core::technique(25, VM::acpi_temperature)), |
11904 | | - std::make_pair(VM::PROCESSOR_ID, VM::core::technique(25, VM::processor_id)), |
11905 | 11800 | std::make_pair(VM::SYS_QEMU, VM::core::technique(70, VM::sys_qemu_dir)), |
11906 | 11801 | std::make_pair(VM::LSHW_QEMU, VM::core::technique(80, VM::lshw_qemu)), |
11907 | 11802 | std::make_pair(VM::VIRTUAL_PROCESSORS, VM::core::technique(50, VM::virtual_processors)), |
|
0 commit comments