diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-30 13:23:54 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-30 13:23:54 -0400 |
| commit | 473badf5c478174754580bfa9d3207cf9b8d412e (patch) | |
| tree | 384a9c7942036b9d7685673ce655ec5bd5eb0ed3 /tools/testing/selftests/kvm/include/kvm_util.h | |
| parent | 6a137497178720da8f454c81d2e9fcebc3137b51 (diff) | |
| parent | df1f294013da715f32521b3d0a69773e660a1af5 (diff) | |
Merge tag 'kvm-x86-selftests-6.18' of https://github.com/kvm-x86/linux into HEAD
KVM selftests changes for 6.18
- Add #DE coverage in the fastops test (the only exception that's guest-
triggerable in fastop-emulated instructions).
- Fix PMU selftests errors encountered on Granite Rapids (GNR), Sierra
Forest (SRF) and Clearwater Forest (CWF).
- Minor cleanups and improvements
Diffstat (limited to 'tools/testing/selftests/kvm/include/kvm_util.h')
| -rw-r--r-- | tools/testing/selftests/kvm/include/kvm_util.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/testing/selftests/kvm/include/kvm_util.h b/tools/testing/selftests/kvm/include/kvm_util.h index 11b6c5aa3f12..26cc30290e76 100644 --- a/tools/testing/selftests/kvm/include/kvm_util.h +++ b/tools/testing/selftests/kvm/include/kvm_util.h @@ -263,13 +263,18 @@ int __open_path_or_exit(const char *path, int flags, const char *enoent_help); int open_path_or_exit(const char *path, int flags); int open_kvm_dev_path_or_exit(void); -bool get_kvm_param_bool(const char *param); -bool get_kvm_intel_param_bool(const char *param); -bool get_kvm_amd_param_bool(const char *param); +int kvm_get_module_param_integer(const char *module_name, const char *param); +bool kvm_get_module_param_bool(const char *module_name, const char *param); -int get_kvm_param_integer(const char *param); -int get_kvm_intel_param_integer(const char *param); -int get_kvm_amd_param_integer(const char *param); +static inline bool get_kvm_param_bool(const char *param) +{ + return kvm_get_module_param_bool("kvm", param); +} + +static inline int get_kvm_param_integer(const char *param) +{ + return kvm_get_module_param_integer("kvm", param); +} unsigned int kvm_check_cap(long cap); |