Skip to content

Commit

Permalink
start VPID from 1
Browse files Browse the repository at this point in the history
Signed-off-by: smallkirby <ssmallkirby@gmail.com>
  • Loading branch information
smallkirby committed Nov 6, 2024
1 parent c766530 commit 184259b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ymir/arch/x86/vmx/vcpu.zig
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub const Vcpu = struct {
/// ID of the logical processor.
id: usize = 0,
/// VPID of the virtual machine.
vpid: u16 = 0,
vpid: u16 = 1,
/// VMXON region.
vmxon_region: *VmxonRegion = undefined,
/// VMCS region.
Expand Down
2 changes: 1 addition & 1 deletion ymir/vmx.zig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const VmError = error{
pub const Error = VmError || impl.VmxError;

/// Next virtual processor ID.
var vpid_next: u16 = 0;
var vpid_next: u16 = 1;
/// Global VMX lock.
var global_lock = spin.SpinLock{};

Expand Down

0 comments on commit 184259b

Please sign in to comment.