Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7247714
added Red Hat, QEMU, vGPUs, and Parallels PCI IDs to VM::PCI_VM_DEVIC…
kernelwernel May 2, 2025
a4afa8b
performance improvements
May 2, 2025
d5fec75
Merge branch 'dev' of https://github.com/NotRequiem/VMAware into dev
May 2, 2025
5080cdc
always the same shit
May 2, 2025
68d427c
updated CPP directive in conclusion template argument handler
May 2, 2025
026bb4d
removed nettitude_vm_memory
May 2, 2025
6e67421
Merge pull request #368 from NotRequiem/dev
NotRequiem May 2, 2025
3ed9e37
small PR modifications
kernelwernel May 3, 2025
420d599
First detection ever for GPU passthrough on QEMU
May 3, 2025
c15507f
fixed linux compatibility and renamed function
kernelwernel May 3, 2025
5c0ad70
updated MIT
kernelwernel May 3, 2025
ab708ac
Merge pull request #369 from NotRequiem/dev
kernelwernel May 3, 2025
2f9cd11
updated VM::PCI_VM_DEVICE_ID and removed VM::PCI_VM
kernelwernel May 4, 2025
6a88ebf
updated VM::PCI_VM_DEVICE_ID and removed VM::PCI_VM
kernelwernel May 4, 2025
0dd487e
very minor changes, ignore this
kernelwernel May 5, 2025
5b1ddc4
merged techniques
May 6, 2025
7f9cb57
Merge branch 'dev' of https://github.com/NotRequiem/VMAware into dev
May 6, 2025
e6f6884
Merge branch 'dev' into dev
NotRequiem May 6, 2025
cd46cf4
removed PCI_VM on my end
May 6, 2025
0e86854
sync dev
May 6, 2025
6a2c060
pci device reference fix
May 6, 2025
372efde
aligned call-site of lambda signature
May 6, 2025
de76995
modified debug for brand scoreboard
May 6, 2025
6586add
Merge pull request #370 from NotRequiem/dev
NotRequiem May 6, 2025
c5365c1
Swapped dword values when making kernel calls to fetch ACPI firmware …
May 7, 2025
5b306bc
fixed README typo
NotRequiem May 7, 2025
04a8ed4
Merge pull request #371 from NotRequiem/dev
NotRequiem May 7, 2025
e5b83eb
moved query for _OSI parameters and CPU signatures out of ACPI table …
May 7, 2025
bcd46e8
Merge branch 'dev' of https://github.com/NotRequiem/VMAware into dev
May 7, 2025
def2ae0
Merge pull request #372 from NotRequiem/dev
NotRequiem May 7, 2025
4664aa1
dsdt firmware scanning
May 7, 2025
c25f5d3
Merge pull request #373 from NotRequiem/dev
NotRequiem May 7, 2025
be13ea4
added extra PCI devices
kernelwernel May 9, 2025
eb23ac6
added pci devices
kernelwernel May 9, 2025
3c5850c
2.4.0 Update - Phase I
May 12, 2025
0bea762
Merge branch 'dev' into dev
NotRequiem May 12, 2025
057ed9d
cross-platform adapter info check
May 12, 2025
683ea2a
Merge branch 'dev' of https://github.com/NotRequiem/VMAware into dev
May 12, 2025
9c6b032
review resolved
May 12, 2025
015c71a
removed trailing MIT option in the CLI and replaced integral types to…
kernelwernel May 12, 2025
598cfa1
fixed compiler warnings
kernelwernel May 12, 2025
ab31960
sync with dev
May 13, 2025
463c823
Merge branch 'dev' of https://github.com/NotRequiem/VMAware into dev
May 13, 2025
231c89d
added binary tools
kernelwernel May 13, 2025
83f6d4e
added extra binaries
kernelwernel May 13, 2025
abedb58
removed VM::KVM_BITMASK and added --detected-only arg in CLI
kernelwernel May 13, 2025
4b0a51a
added qemu drivers/disk serials
May 13, 2025
e4d07ad
removed hyper-v driver checks
May 13, 2025
9d43de5
Merge pull request #375 from NotRequiem/dev
NotRequiem May 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*.li

# Executables
*.exe
*.out
*.app
main
Expand Down
67 changes: 32 additions & 35 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,42 @@ project(
LANGUAGES CXX
)


# set c++ standard
# set C++ standard
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 20)
endif()


# compiler flags
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if(MSVC)
# Globally disable specific MSVC warnings from external headers
add_compile_options(
/wd5039 # 'TpSetCallbackCleanupGroup' potentially throwing
/wd4820 # padding added after data member
/wd4626 # deleted assignment operator
/wd5045 # Spectre mitigation notice
/wd4668 # undefined macro replaced with '0'
)
endif()

# compiler flags
if (MSVC)
set(CMAKE_CXX_FLAGS "/Wall /W4 /EHsc")
else()
# linux and apple
# Linux and Apple
set(CMAKE_CXX_FLAGS "-Wextra -Wall -Wextra -Wconversion -Wdouble-promotion -Wno-unused-parameter -Wno-unused-function -Wno-sign-conversion")
endif()

if(CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -lstdc++ -lm")
endif()


# find available compilers
if (LINUX)
find_program(CLANGPP_EXECUTABLE NAMES clang++)
find_program(GPP_EXECUTABLE NAMES g++)

# select compiler with preference for clang++ (just a personal choice of mine, i'm kinda obsessed with llvm honestly)
# select compiler with preference for clang++
if(CLANGPP_EXECUTABLE)
set(CMAKE_CXX_COMPILER "${CLANGPP_EXECUTABLE}")
get_filename_component(COMPILER_NAME ${CLANGPP_EXECUTABLE} NAME)
Expand All @@ -45,67 +52,59 @@ if (LINUX)
endif()

message(STATUS "Compiler: ${COMPILER_NAME}")
#message(STATUS "Compiler version: ${CMAKE_CXX_COMPILER_VERSION}")



# fetch and set build type
set(available_build_types Debug Release)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
endif()


# Define preprocessor macros based on the build type
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_definitions(__VMAWARE_DEBUG__)
add_compile_definitions(__VMAWARE_DEBUG__)
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_definitions(__VMAWARE_RELEASE__)
add_compile_definitions(__VMAWARE_RELEASE__)
endif()


# general variables
set(PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(BUILD_DIR "${PROJECT_DIR}/build")
set(TARGET "vmaware")


# debug/release CXX flag options
if (MSVC)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
MESSAGE(STATUS "Build set to debug mode")
message(STATUS "Build set to debug mode")
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
MESSAGE(STATUS "Build set to release mode")
message(STATUS "Build set to release mode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2")
endif()
elseif(APPLE)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
MESSAGE(STATUS "Build set to debug mode")
message(STATUS "Build set to debug mode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fsanitize=address")
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
MESSAGE(STATUS "Build set to release mode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g0 -O2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
message(STATUS "Build set to release mode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g0 -O2 -march=native -mtune=native")
endif()
elseif(LINUX)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
MESSAGE(STATUS "Build set to debug mode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fmax-errors=5 -DDEBUG -O0 -fsanitize=address,leak") # todo, add ubsan
message(STATUS "Build set to debug mode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fmax-errors=5 -DDEBUG -O0 -fsanitize=address,leak")
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
MESSAGE(STATUS "Build set to release mode")
message(STATUS "Build set to release mode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g0 -O2")
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
endif()
endif()
else()
MESSAGE(STATUS "Build set to release mode")
message(STATUS "Build set to release mode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
endif()


# add executable
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIR}")
add_executable(${TARGET} "src/cli.cpp")
Expand All @@ -114,19 +113,17 @@ if(NOT DEFINED CMAKE_CXX_STANDARD)
endif()
set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD_REQUIRED ON)


# CTest stuff
include(CTest)
enable_testing()
set(ARGUMENTS "--all")
if(MSVC)
add_test(executable, "${BUILD_DIR}/Release/${TARGET}")
add_test(executable "${BUILD_DIR}/Release/${TARGET}")
else()
add_test(NAME TARGET COMMAND "${BUILD_DIR}/${TARGET}" ${ARGUMENTS})
add_test(NAME TARGET COMMAND "${BUILD_DIR}/${TARGET}" ${ARGUMENTS})
endif()


# release stuff
# install rules
if (NOT MSVC)
if(CMAKE_BUILD_TYPE MATCHES "Release")
install(TARGETS ${TARGET} DESTINATION /usr/bin)
Expand All @@ -142,4 +139,4 @@ elseif(MSVC)
set(HEADER_INSTALL_PATH "C:\\Program Files (x86)\\YourLibrary\\include")
install(FILES "src/vmaware.hpp" DESTINATION "${HEADER_INSTALL_PATH}")
install(FILES "src/vmaware_MIT.hpp" DESTINATION "${HEADER_INSTALL_PATH}")
endif()
endif()
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ You can create an issue, and I will reply within 24 hours. We have too much free


## Extra
We have a tool that can update the MIT file and other details of the library with a python script for maintenance purposes. The script at `auxiliary/updater.py` will update:
We have a useful script at `auxiliary/updater.py` will update:
- the section line numbers in the header banner
- the date of the update
- the MIT file by copying the GPL file and removing every GPL code (so that you don't have to make the same changes on 2 different files separately, just focus on vmaware.hpp and let the script manage the vmaware_MIT.hpp file)

It's highly recommended to use this script before sending the PR so that all the above don't have to be manually updated, which can be time consuming and can potentially creep in some human errors.
Loading
Loading