diff --git a/tools/test-runner.c b/tools/test-runner.c index 6ccf6751..b90c638b 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -245,12 +245,21 @@ static bool check_virtualization(void) #if defined(__GNUC__) && (defined(__i386__) || defined(__amd64__)) uint32_t ecx; - __asm__ __volatile__("cpuid" : "=c" (ecx) : "a" (1) : "memory"); + __asm__ __volatile__("cpuid" : "=c" (ecx) : + "a" (1) : "%ebx", "%edx"); if (!!(ecx & (1 << 5))) { l_info("Found support for Virtual Machine eXtensions"); return true; } + + __asm__ __volatile__("cpuid" : "=c" (ecx) : + "a" (0x80000001) : "%ebx", "%edx"); + + if (ecx & (1 << 2)) { + l_info("Found support for Secure Virtual Machine extension"); + return true; + } #endif return false; }