Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
Signed-off-by: smallkirby <ssmallkirby@gmail.com>
  • Loading branch information
smallkirby committed Aug 18, 2024
1 parent d811046 commit d41ea0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ymir/arch/x86/asm.zig
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,12 @@ pub const MsrFeatureControl = packed struct(u64) {
pub const MsrVmxBasic = packed struct(u64) {
/// VMCS revision identifier.
vmcs_revision_id: u31,
/// Reserved
_zero: u1 = 0,
/// VMXON region size.
vmxon_region_size: u16,
/// Reserved.
_reserved: u33, // TODO: VMXON region size
_reserved: u16,
};

pub const FlagsRegister = packed struct(u64) {
Expand Down
2 changes: 1 addition & 1 deletion ymir/arch/x86/vmx.zig
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn debugPrintVmxonValidity() void {
} else @panic("\t\tIA32_FEATURE_CONTROL is not locked");

const vmx_basic = am.readMsrVmxBasic();
log.debug("\t\tVMXON region size: 0x{X}", .{(vmx_basic._reserved >> 1) & 0xFFFF});
log.debug("\t\tVMXON region size: 0x{X}", .{vmx_basic.vmxon_region_size});

const vmx_cr0_fixed0: u32 = @truncate(am.readMsr(.vmx_cr0_fixed0));
const vmx_cr0_fixed1: u32 = @truncate(am.readMsr(.vmx_cr0_fixed1));
Expand Down

0 comments on commit d41ea0e

Please sign in to comment.