All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] KVM: selftests: Fix force_emulation_prefix parameter type mismatch
@ 2025-08-29 14:12 Aqib Faruqui
  2025-08-29 14:18 ` Sean Christopherson
  0 siblings, 1 reply; 2+ messages in thread
From: Aqib Faruqui @ 2025-08-29 14:12 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini, Shuah Khan, kvm,
	linux-kselftest, linux-kernel
  Cc: nh-open-source, aqibaf

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 <aqibaf@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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-29 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29 14:12 [PATCH 1/1] KVM: selftests: Fix force_emulation_prefix parameter type mismatch Aqib Faruqui
2025-08-29 14:18 ` Sean Christopherson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.