On Fri, May 29, 2026 at 16:12:14 +0200, Jiri Denemark via Devel wrote:
From: Jiri Denemark <jdenemar@redhat.com>
The function will later be called when probing QEMU capabilities.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 2: - no change
src/libvirt_private.syms | 1 + src/util/virhostcpu.c | 16 +++++++++++++++- src/util/virhostcpu.h | 3 +++ tests/qemucpumock.c | 22 ++++++++++++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-)
[...]
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 60743765a4..afa9ee3849 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -1376,7 +1376,12 @@ virHostCPUGetMicrocodeVersion(virArch hostArch G_GNUC_UNUSED)
#if WITH_LINUX_KVM_H && defined(KVM_GET_MSRS) && \ (defined(__i386__) || defined(__x86_64__)) -static int +/* + * Returns 0 on success, + * 1 when the MSR is not supported by the host CPU, + * -1 on error. + */ +int virHostCPUGetMSRFromKVM(unsigned long index, uint64_t *result)
Document also the arguments; Reviewed-by: Peter Krempa <pkrempa@redhat.com>