Skip to content

Commit

Permalink
fixed compilation with SVM and VMX both disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Shwartsman committed Nov 26, 2023
1 parent 6c8a54d commit 4a3e1cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bochs/cpu/proc_ctrl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ Bit64u BX_CPU_C::get_TSC(void)
return tsc;
}

#if BX_SUPPORT_VMX || BX_SUPPORT_SVM
Bit64u BX_CPU_C::get_Virtual_TSC()
{
Bit64u tsc = BX_CPU_THIS_PTR get_TSC();
Expand All @@ -661,10 +660,11 @@ Bit64u BX_CPU_C::get_Virtual_TSC()
}
}
#endif
#if BX_SUPPORT_VMX || BX_SUPPORT_SVM
tsc += BX_CPU_THIS_PTR tsc_offset; // BX_CPU_THIS_PTR tsc_offset = 0 if not in VMX or SVM guest
#endif
return tsc;
}
#endif

void BX_CPU_C::set_TSC(Bit64u newval)
{
Expand Down

0 comments on commit 4a3e1cd

Please sign in to comment.