Skip to content

Commit

Permalink
fixed compilation without SVM configured in
Browse files Browse the repository at this point in the history
  • Loading branch information
Shwartsman committed Nov 20, 2023
1 parent 0cc21d1 commit bd4cb7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bochs/cpu/crregs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1789,8 +1789,10 @@ Bit32u BX_CPU_C::get_efer_allow_mask(void)
efer_allowed_mask |= (BX_EFER_SCE_MASK | BX_EFER_LME_MASK | BX_EFER_LMA_MASK);
if (BX_CPUID_SUPPORT_ISA_EXTENSION(BX_ISA_FFXSR))
efer_allowed_mask |= BX_EFER_FFXSR_MASK;
#if BX_SUPPORT_SVM
if (BX_CPUID_SUPPORT_ISA_EXTENSION(BX_ISA_SVM))
efer_allowed_mask |= BX_EFER_SVME_MASK;
#endif
if (BX_CPUID_SUPPORT_ISA_EXTENSION(BX_ISA_TCE))
efer_allowed_mask |= BX_EFER_TCE_MASK;
}
Expand Down
2 changes: 2 additions & 0 deletions bochs/cpu/generic_cpuid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ bx_generic_cpuid_t::bx_generic_cpuid_t(BX_CPU_C *cpu): bx_cpuid_t(cpu)
#else
max_ext_leaf = 0x80000008;

#if BX_SUPPORT_SVM
if (BX_CPUID_SUPPORT_ISA_EXTENSION(BX_ISA_SVM))
max_ext_leaf = 0x8000000A;
#endif
#endif
}

void bx_generic_cpuid_t::get_cpuid_leaf(Bit32u function, Bit32u subfunction, cpuid_function_t *leaf) const
Expand Down

0 comments on commit bd4cb7f

Please sign in to comment.