]>
git.saurik.com Git - apple/xnu.git/blob - tools/tests/testkext/testvmx.cpp
5 * Created by Shantonu Sen on 10/24/08.
6 * Copyright 2008 Apple Computer, Inc.. All rights reserved.
12 #if !(defined(__i386__) || defined(__x86_64__))
13 #error VMX only supported on i386/x86_64
16 #include <mach/boolean.h>
20 #define super IOService
21 OSDefineMetaClassAndStructors(testvmx
, super
);
24 testvmx::start( IOService
* provider
)
28 IOLog("%s\n", __PRETTY_FUNCTION__
);
30 if (!super::start(provider
)) {
34 IOLog("Attempting host_vmxon\n");
35 ret
= host_vmxon(FALSE
);
36 IOLog("host_vmxon: %d\n", ret
);
42 testvmx::stop( IOService
* provider
)
44 IOLog("%s\n", __PRETTY_FUNCTION__
);
46 super::stop(provider
);
48 IOLog("Attempting host_vmxoff\n");
50 IOLog("host_vmxoff called\n");