]> git.ipfire.org Git - thirdparty/libvirt.git/commit
cpu_x86: Probe host CPU for all MSR features
authorJiri Denemark <jdenemar@redhat.com>
Thu, 16 Jan 2025 12:43:35 +0000 (13:43 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 17 Jan 2025 11:52:28 +0000 (12:52 +0100)
commit095760cddc25088cfd5afa7fdaa75ad43c303585
treed75416f33ea6b0d7da80828f72482651c2c5479e
parent3766891c5954c53370d7eb9c7a0a8e6ba3854ca4
cpu_x86: Probe host CPU for all MSR features

The list of CPU features we probe from various MSR grew significantly
over time and the CPU map currently mentions 11 distinct MSR indexes.
But the code for directly probing host CPU features was still reading
only the original 0x10a index. Thus the CPU model in host capabilities
was missing a lot of features.

Instead of specifying a static list of indexes to read (which we would
forget to update in the future), let's just read all indexes found in
the CPU map.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/cpu/cpu_x86.c