From 139ec7d53886a6918e0445763a617cb55680b3dd Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Wed, 17 Apr 2013 20:24:12 +0000 Subject: [PATCH] PANIC on options which require P6 when CPU_LEVEL is set to 5 instead of ignoring them --- bochs/cpu/generic_cpuid.cc | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/bochs/cpu/generic_cpuid.cc b/bochs/cpu/generic_cpuid.cc index 9a568546b..b48d28c7c 100644 --- a/bochs/cpu/generic_cpuid.cc +++ b/bochs/cpu/generic_cpuid.cc @@ -1020,27 +1020,27 @@ void bx_generic_cpuid_t::init_cpu_extensions_bitmask(void) features_bitmask |= BX_CPU_PGE; features_bitmask |= BX_CPU_MTRR; features_bitmask |= BX_CPU_PAT; + } - static bx_bool misaligned_sse_enabled = SIM->get_param_bool(BXPN_CPUID_MISALIGNED_SSE)->get(); - if (misaligned_sse_enabled) { - features_bitmask |= BX_CPU_MISALIGNED_SSE; - if (cpu_level < 6) - BX_PANIC(("PANIC: Misaligned SSE emulation requires P6 CPU level support !")); - } + static bx_bool misaligned_sse_enabled = SIM->get_param_bool(BXPN_CPUID_MISALIGNED_SSE)->get(); + if (misaligned_sse_enabled) { + features_bitmask |= BX_CPU_MISALIGNED_SSE; + if (cpu_level < 6) + BX_PANIC(("PANIC: Misaligned SSE emulation requires P6 CPU level support !")); + } - static bx_bool smep_enabled = SIM->get_param_bool(BXPN_CPUID_SMEP)->get(); - if (smep_enabled) { - features_bitmask |= BX_CPU_SMEP; - if (cpu_level < 6) - BX_PANIC(("PANIC: SMEP emulation requires P6 CPU level support !")); - } + static bx_bool smep_enabled = SIM->get_param_bool(BXPN_CPUID_SMEP)->get(); + if (smep_enabled) { + features_bitmask |= BX_CPU_SMEP; + if (cpu_level < 6) + BX_PANIC(("PANIC: SMEP emulation requires P6 CPU level support !")); + } - static bx_bool smap_enabled = SIM->get_param_bool(BXPN_CPUID_SMAP)->get(); - if (smap_enabled) { - features_bitmask |= BX_ISA_SMAP; - if (cpu_level < 6) - BX_PANIC(("PANIC: SMAP emulation requires P6 CPU level support !")); - } + static bx_bool smap_enabled = SIM->get_param_bool(BXPN_CPUID_SMAP)->get(); + if (smap_enabled) { + features_bitmask |= BX_ISA_SMAP; + if (cpu_level < 6) + BX_PANIC(("PANIC: SMAP emulation requires P6 CPU level support !")); } #if BX_SUPPORT_X86_64