diff options
author | Mike Gilbert <floppym@gentoo.org> | 2017-12-30 12:48:20 -0500 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-05-30 07:49:46 +0200 |
commit | 7b0acd5d3752492b8fb182c59976fd1a0ee61031 (patch) | |
tree | c72e14b2e3e0fc61882f3d016a8f496f503e50de /src/shared/meson.build | |
parent | 9a38bf7862a8a1117805163eeb0fb752b2a2b4d6 (diff) |
basic: detect_vm_cpuid: fix hypervisor detection
The __get_cpuid() function only calls __cpuid() if __get_cpuid_max()
returns a value that is less than or equal to the leaf value.
In QEMU/KVM, I found that the special hypervisor leaf value (0x40000000U)
is always larger than the value retured by __get_cpuid_max().
Avoid this problem by calling the __cpuid() macro directly once we have
checked the hypervisor bit from leaf 1.
Fixes: d31b0033b7743393562a2e9d3c1e74afea981c13
Diffstat (limited to 'src/shared/meson.build')
0 files changed, 0 insertions, 0 deletions