Skip to content

Commit

Permalink
Merge pull request #5 from gierens/fix-vmx-check-vmx_root
Browse files Browse the repository at this point in the history
Fix VMX Check (whiz-vmm-vmx_root)
  • Loading branch information
smallkirby authored and smallkirby-ymir[bot] committed Jan 15, 2025
1 parent ab3f372 commit 4fdca72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ymir/arch/x86/arch.zig
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn getCpuVendorId() [12]u8 {
/// Check if virtualization technology is supported.
pub fn isVmxSupported() bool {
// Check CPUID if VMX is supported.
const regs = cpuid.Leaf.query(.ext_feature, null);
const regs = cpuid.Leaf.query(.vers_and_feat_info, null);
const ecx: cpuid.FeatureInfoEcx = @bitCast(regs.ecx);
if (!ecx.vmx) return false;

Expand Down
4 changes: 2 additions & 2 deletions ymir/arch/x86/cpuid.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
pub const Leaf = enum(u32) {
/// Maximum input value for basic CPUID.
maximum_input = 0x0,
/// Version information.
version_info = 0x1,
/// Version and feature information.
vers_and_feat_info = 0x1,
/// Thermal and power management.
thermal_power = 0x6,
/// Structured extended feature enumeration.
Expand Down

0 comments on commit 4fdca72

Please sign in to comment.