Fix kvm_is_forced_enabled() to use get_kvm_param_bool() instead of get_kvm_param_integer() when reading the "force_emulation_prefix" kernel module parameter.
The force_emulation_prefix parameter is a boolean that accepts Y/N values, but the function was incorrectly trying to parse it as an integer using strtol(). Signed-off-by: Aqib Faruqui <aqi...@amazon.com> --- tools/testing/selftests/kvm/include/x86/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/include/x86/processor.h b/tools/testing/selftests/kvm/include/x86/processor.h index 3f93d1b4f..8edf48b5a 100644 --- a/tools/testing/selftests/kvm/include/x86/processor.h +++ b/tools/testing/selftests/kvm/include/x86/processor.h @@ -1323,7 +1323,7 @@ static inline bool kvm_is_pmu_enabled(void) static inline bool kvm_is_forced_emulation_enabled(void) { - return !!get_kvm_param_integer("force_emulation_prefix"); + return get_kvm_param_bool("force_emulation_prefix"); } static inline bool kvm_is_unrestricted_guest_enabled(void) -- 2.47.3