]> xenbits.xensource.com Git - libvirt.git/commit
virhostcpu: Make virHostCPUGetMSR() work only on x86
authorMichal Privoznik <mprivozn@redhat.com>
Sat, 13 Apr 2019 20:38:55 +0000 (22:38 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 15 Apr 2019 07:46:27 +0000 (09:46 +0200)
commitae3d812b006b84c6d06605868d19554ea0156392
tree8c3d0c8bfafdb4d43e5334722b5ff349eefd2bfa
parentb9991e8386568b6be8983874bceba2f6a1ade634
virhostcpu: Make virHostCPUGetMSR() work only on x86

Model specific registers are a thing only on x86. Also, the
/dev/cpu/0/msr path exists only on Linux and the fallback
mechanism (asking KVM) exists on Linux and FreeBSD only.

Therefore, move the function within #ifdef that checks all
aforementioned constraints and provide a dummy stub for all
other cases.

This fixes the build on my arm box, mingw-* builds, etc.

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