From f3f67d4ecdd3d8d4af5f41f8550098fa846952c3 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Fri, 15 Oct 2021 17:28:00 +0200 Subject: [PATCH] virQEMUCapsCachePriv: Add host cpuid information Signed-off-by: Tim Wiederhake Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b2d5242264..5fa3111201 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4023,6 +4023,7 @@ struct _virQEMUCapsCachePriv { gid_t runGid; virArch hostArch; unsigned int microcodeVersion; + virCPUData *cpuData; char *kernelVersion; char *hostCPUSignature; @@ -4040,6 +4041,7 @@ virQEMUCapsCachePrivFree(void *privData) g_free(priv->libDir); g_free(priv->kernelVersion); + virCPUDataFree(priv->cpuData); g_free(priv->hostCPUSignature); g_free(priv); } @@ -5568,6 +5570,8 @@ virQEMUCapsCacheNew(const char *libDir, if (uname(&uts) == 0) priv->kernelVersion = g_strdup_printf("%s %s", uts.release, uts.version); + priv->cpuData = virCPUDataGetHost(); + cleanup: return cache;