]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/i386/kvm: Clean up return values of MSR filter related functions
authorZhao Liu <zhao1.liu@intel.com>
Wed, 6 Nov 2024 03:07:25 +0000 (11:07 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jan 2025 22:34:44 +0000 (23:34 +0100)
commitfb81c9cfdd9fc37687a36f41ca07ab0e8a6d9899
treeea77ad3ff54e6f979c0ec4b0b5fb0ec54e0eba30
parent26824f9cac69979586b30410ffac8bca4157909e
target/i386/kvm: Clean up return values of MSR filter related functions

Before commit 0cc42e63bb54 ("kvm/i386: refactor kvm_arch_init and split
it into smaller functions"), error_report() attempts to print the error
code from kvm_filter_msr(). However, printing error code does not work
due to kvm_filter_msr() returns bool instead int.

0cc42e63bb54 fixed the error by removing error code printing, but this
lost useful error messages. Bring it back by making kvm_filter_msr()
return int.

This also makes the function call chain processing clearer, allowing for
better handling of error result propagation from kvm_filter_msr() to
kvm_arch_init(), preparing for the subsequent cleanup work of error
handling in kvm_arch_init().

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Zide Chen <zide.chen@intel.com>
Link: https://lore.kernel.org/r/20241106030728.553238-9-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/kvm/kvm.c