summaryrefslogtreecommitdiff
path: root/testing/archboot/vmware-detect.c
blob: d242a388d52d59839c9a39a4022e1c4eb8102665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
int main() {
  unsigned char idtr[6];
  asm("sidt %0" : "=m" (idtr));
  if(0xff==idtr[5])
  {
    return 0;
  }
  else
  {
    return 1;
  }
}