chiark / gitweb /
basic: detect_vm_cpuid: use gcc's __get_cpuid() function (#7758)
authorMike Gilbert <floppymaster@gmail.com>
Fri, 29 Dec 2017 18:30:38 +0000 (13:30 -0500)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:49:46 +0000 (07:49 +0200)
commit9376a8929700bfe3d2d45a41d9e66232ca9ec9dd
tree352fb0f77f14abe54bb8cedc0531868eba2cfc83
parentfcd59dd68aaaa7d0c288ee70c6dfb85b20ec1236
basic: detect_vm_cpuid: use gcc's __get_cpuid() function (#7758)

The __get_cpuid() function includes a safety check to ensure that
executing the cpuid instruction is valid/safe.

This method also works with clang.

https://lists.freedesktop.org/archives/systemd-devel/2017-December/040054.html
src/basic/virt.c