Skip to content

Commit b24b9cc

Browse files
committed
update terminology used in code
1 parent 74e1b18 commit b24b9cc

4 files changed

Lines changed: 43 additions & 36 deletions

File tree

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@
44

55
# Introduction
66

7-
VxM (pronounced as its individual letters) is a specialized hypervisor orchestrator for **Nitrux**. It transforms a multi-GPU workstation into a "Twin Engine" system, allowing you to run Linux (Host) and Windows (Guest) simultaneously on separate GPUs with near-native performance.
7+
VxM is a hypervisor orchestration utility for Nitrux, engineered to enable concurrent, hardware-accelerated guest execution on multi-GPU workstations. Leveraging VFIO PCI passthrough, it enforces IOMMU isolation to dedicate discrete graphics resources to guest domains.
88

9-
Unlike traditional virtual machines that emulate graphics or use translation layers, VxM uses **VFIO Passthrough** to give the Guest OS complete, exclusive control over your secondary GPU.
9+
This architecture circumvents virtualization overhead and emulation layers, granting the guest OS direct hardware control for bare-metal performance characteristics within Nitrux’s immutable infrastructure.
1010

1111
## Features
1212

13-
* Zero graphics virtualization.
14-
* Instantly toggle your keyboard and mouse without hardware switches.
15-
* Dynamically unbinds your dGPU from the host kernel and attaches it to the VM on demand.
13+
- **Evdev Input Arbitration**: Implements zero-latency input-linux passthrough with grab_all=on and ctrl-ctrl interrupt handling.
14+
15+
- **Dynamic VFIO Binding**: Runtime driver override to vfio-pci with automatic host rebinding, BDF normalization, and IOMMU group validation.
16+
17+
- **DDC/CI Automation**: Writes VCP 0x60 commands to the monitor bus to trigger input source switching on VM state changes.
18+
19+
- **Latency Optimization**: Auto-provisions hugepages and initializes IVSHMEM (/dev/shm/looking-glass) for low-latency frame relay.
20+
21+
- **Firmware/TPM Lifecycle**: Heuristic detection for matching OVMF CODE/VARS pairs and managed swtpm socket execution for guest OS compatibility.
22+
23+
- **Rootless Model**: Unprivileged QEMU execution with privileged pre-flight hardware preparation.
1624

1725
## System Requirements
1826

@@ -23,14 +31,14 @@ Unlike traditional virtual machines that emulate graphics or use translation lay
2331
* **Required:** Two separate GPUs (e.g., Integrated AMD/Intel + Discrete Radeon/Nvidia).
2432

2533
> [!WARNING]
26-
> VxM doesn't support Single-GPU setups.
34+
> VxM doesn't support single-GPU setups.
2735
2836
* **Motherboard:**
2937
* IOMMU (VT-d / AMD-Vi) enabled in BIOS.
3038
* UEFI Boot enabled.
3139

3240
* **Display:**
33-
* A monitor with two inputs (e.g., DP for Linux, HDMI for Windows) OR two separate monitors.
41+
* A monitor with two inputs (e.g., DP for host OS, HDMI for guest OS) OR two separate monitors.
3442

3543
# Licensing
3644

@@ -44,4 +52,4 @@ If you find problems with the contents of this repository, please create an issu
4452

4553
Before submitting a bug, you should look at the [existing bug reports](https://github.com/Nitrux/vxm/issues) to verify that no one has reported the bug already.
4654

47-
©2026 Nitrux Latinoamericana S.C.
55+
©2026 Nitrux Latinoamericana S.C.

src/Config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ namespace Config
2424
const std::filesystem::path RomsDir = VxmDir / "roms";
2525

2626
// Files
27-
const std::filesystem::path WindowsImage = ImageDir / "win.img";
28-
const std::filesystem::path WindowsIso = IsoDir / "win_install.iso";
27+
const std::filesystem::path GuestImage = ImageDir / "guest.img";
28+
const std::filesystem::path GuestIso = IsoDir / "guest_install.iso";
2929
const std::filesystem::path VirtioIso = IsoDir / "virtio_drivers.iso";
3030

3131
// OVMF Firmware Paths - Multiple possible locations

src/ProfileManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ struct Profile
3030
// DDC/CI monitor switching
3131
bool ddcEnabled = false; // Enable DDC/CI monitor switching
3232
std::string ddcMonitor; // Monitor identifier (e.g., "DP-1", "HDMI-1")
33-
uint8_t ddcHostInput = 0x0F; // Input source for Linux (default: DP-1)
34-
uint8_t ddcGuestInput = 0x11; // Input source for Windows (default: HDMI-1)
33+
uint8_t ddcHostInput = 0x0F; // Input source for host OS (default: DP-1)
34+
uint8_t ddcGuestInput = 0x11; // Input source for guest OS (default: HDMI-1)
3535
};
3636

3737
class ProfileManager

src/VirtualMachine.cpp

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ bool VirtualMachine::checkRequirements() const
222222
std::cout << "[VxM] Found OVMF CODE: " << Config::OvmfCodePath << std::endl;
223223
std::cout << "[VxM] Found OVMF VARS: " << Config::OvmfVarsTemplatePath << std::endl;
224224

225-
// 2. Check Windows ISO
226-
if (!fs::exists(Config::WindowsIso)) {
227-
std::cerr << "[Error] Windows ISO not found at: " << Config::WindowsIso << std::endl;
225+
// 2. Check Guest OS ISO
226+
if (!fs::exists(Config::GuestIso)) {
227+
std::cerr << "[Error] Guest OS ISO not found at: " << Config::GuestIso << std::endl;
228228
return false;
229229
}
230230

@@ -589,7 +589,7 @@ void VirtualMachine::initializeCrate()
589589
fs::create_directories(Config::TpmStateDir);
590590

591591
// Create C: Drive using fork/exec to avoid command injection
592-
if (!fs::exists(Config::WindowsImage)) {
592+
if (!fs::exists(Config::GuestImage)) {
593593
std::cout << "[VxM] Creating C: Drive (" << Config::DiskSizeGb << "GB)..." << std::endl;
594594

595595
pid_t pid = fork();
@@ -600,7 +600,7 @@ void VirtualMachine::initializeCrate()
600600
std::string sizeArg = std::to_string(Config::DiskSizeGb) + "G";
601601
execlp("qemu-img", "qemu-img", "create", "-f", "raw",
602602
"-o", "preallocation=full",
603-
Config::WindowsImage.string().c_str(),
603+
Config::GuestImage.string().c_str(),
604604
sizeArg.c_str(), nullptr);
605605
// If execlp returns, it failed
606606
std::cerr << "[Error] Failed to execute qemu-img" << std::endl;
@@ -612,7 +612,7 @@ void VirtualMachine::initializeCrate()
612612
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
613613
throw std::runtime_error("Failed to create disk image.");
614614
}
615-
fixFileOwnership(Config::WindowsImage);
615+
fixFileOwnership(Config::GuestImage);
616616
}
617617
}
618618

@@ -662,20 +662,19 @@ void VirtualMachine::initializeCrate()
662662
}
663663
}
664664

665-
// Check for Windows ISO and provide guidance
666-
if (!fs::exists(Config::WindowsIso)) {
667-
std::cout << "\n[VxM] Windows ISO not found." << std::endl;
668-
std::cout << " Please obtain a Windows installation ISO and place it at:" << std::endl;
669-
std::cout << " " << Config::WindowsIso << std::endl;
670-
std::cout << "\n You can download Windows 11 from:" << std::endl;
671-
std::cout << " https://www.microsoft.com/software-download/windows11" << std::endl;
672-
std::cout << "\n For Windows 10:" << std::endl;
673-
std::cout << " https://www.microsoft.com/software-download/windows10ISO" << std::endl;
674-
675-
std::cout << "\n [Tip] For better VM performance, consider using a playbook to" << std::endl;
676-
std::cout << " debloat Windows, such as:" << std::endl;
677-
std::cout << " - AtlasOS: https://atlasos.net" << std::endl;
678-
std::cout << " - ReviOS: https://revi.cc" << std::endl;
665+
// Check for Guest OS ISO and provide guidance
666+
if (!fs::exists(Config::GuestIso)) {
667+
std::cout << "\n[VxM] Guest OS ISO not found." << std::endl;
668+
std::cout << " Please obtain an installation ISO and place it at:" << std::endl;
669+
std::cout << " " << Config::GuestIso << std::endl;
670+
std::cout << "\n For a guest OS, you can use:" << std::endl;
671+
std::cout << " - Windows 11: https://www.microsoft.com/software-download/windows11" << std::endl;
672+
std::cout << " - Windows 10: https://www.microsoft.com/software-download/windows10ISO" << std::endl;
673+
std::cout << " - Or any other OS that supports UEFI boot" << std::endl;
674+
675+
std::cout << "\n [Tip] For better VM performance, consider optimized OS variants:" << std::endl;
676+
std::cout << " - AtlasOS: https://atlasos.net (Windows-based)" << std::endl;
677+
std::cout << " - ReviOS: https://revi.cc (Windows-based)" << std::endl;
679678
}
680679

681680
// Provide guidance about GPU ROM files for reset bug
@@ -925,10 +924,10 @@ void VirtualMachine::start()
925924
std::cerr << "[Warning] No input devices found. You will have no control over the VM!" << std::endl;
926925
}
927926

928-
// 4. Start TPM 2.0 emulator for Windows 11 compatibility
927+
// 4. Start TPM 2.0 emulator for guest OS compatibility
929928
m_tpmPid = startTpmEmulator();
930929
if (m_tpmPid < 0) {
931-
std::cerr << "[Warning] Failed to start TPM emulator. Windows 11 may not install." << std::endl;
930+
std::cerr << "[Warning] Failed to start TPM emulator. Some guest OSes may require TPM support." << std::endl;
932931
}
933932

934933
// STATE PERSISTENCE:
@@ -1000,12 +999,12 @@ void VirtualMachine::start()
1000999

10011000
// Disk (using virtio-blk, no SCSI controller needed)
10021001
args.push_back("-drive");
1003-
args.push_back("if=none,id=disk0,cache=none,format=raw,aio=native,file=" + Config::WindowsImage.string());
1002+
args.push_back("if=none,id=disk0,cache=none,format=raw,aio=native,file=" + Config::GuestImage.string());
10041003
args.push_back("-device"); args.push_back("virtio-blk-pci,drive=disk0");
10051004

10061005
// ISOs
10071006
args.push_back("-drive");
1008-
args.push_back("file=" + Config::WindowsIso.string() + ",media=cdrom,index=0");
1007+
args.push_back("file=" + Config::GuestIso.string() + ",media=cdrom,index=0");
10091008
args.push_back("-drive");
10101009
args.push_back("file=" + Config::VirtioIso.string() + ",media=cdrom,index=1");
10111010

0 commit comments

Comments
 (0)