Many things can affect the availability of cpu features (e.g. software
upgrades, kernel versions, kernel command line, etc.) and invalidate the
cached capabilities without notice. Add CPUID information to the
capabilities cache.
Fixes
https://bugzilla.redhat.com/show_bug.cgi?id=1953389.
V1:
https://listman.redhat.com/archives/libvir-list/2021-August/msg00138.html
Tim Wiederhake (20):
cpu_x86: Simplify x86ParseCPUID
cpu_x86: Simplify x86ParseMSR
cpu_x86: Add x86ParseDataItemList
cpu: Change virCPUArchDataParse to take xmlNodePtr
cpu: Split up virCPUDataParse
cpu: Add virCPUDataIsIdentical
cpu_x86: Implement virCPUDataIsIdentical for x86
cpu_arm: No need to protect macro definitions
cpu_arm: Implement virCPUDataIsIdentical for arm
cpu_ppc64: Implement virCPUDataIsIdentical for ppc64
cpu: Add virCPUDataNewCopy
cpu_x86: Implement virCPUDataNewCopy for x86
cpu_arm: Implement virCPUDataNewCopy for arm
cpu_ppc64: Implement virCPUDataNewCopy for ppc64
virhostcpu: Add virHostCPUGetCPUID
cpu_x86: Add virCPUDataGetHost
cpu_x86: Implement virCPUDataGetHost for x86
virQEMUCaps: Add host cpuid information
virQEMUCapsCachePriv: Add host cpuid information
qemu: Invalidate capabilities cache on host cpuid mismatch
src/cpu/cpu.c | 97 +++++++++++-
src/cpu/cpu.h | 27 +++-
src/cpu/cpu_arm.c | 54 ++++++-
src/cpu/cpu_ppc64.c | 44 ++++++
src/cpu/cpu_x86.c | 296 +++++++++++++++++++++++------------
src/libvirt_private.syms | 5 +
src/qemu/qemu_capabilities.c | 33 +++-
src/qemu/qemu_capspriv.h | 3 +-
src/util/virhostcpu.c | 43 +++++
src/util/virhostcpu.h | 2 +
tests/qemucapsprobe.c | 2 +-
11 files changed, 486 insertions(+), 120 deletions(-)
--
2.31.1