- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am working a Linux kernel module to test VMX operations.
The kernel module defines some Linux filesystem APIs which can be used by user space to start VMX operation. Here is the main sequence.
In Dev_open(), VMXe in CR4 is set to all online CPUs. And call VMXON, VMXPTRCLEAR, VMXPTRLD, VMXwrite to populate VMCS.
In Dev_Ioctl(), VMXON, VMXPTRLD, and VMLaunch or VMReume based on VM's state.
In Dev_release(), VMXOFF is called.
With this design, i always hit an error of 'invalid host state' when VMLaunch is called for the first time. Subsequent calls of VMlaunch or VMResume did NOT hit this issue.
I am suspecting if I missed something of VMX operations.
In stackoverflow, there was a post to say VMXe bit is not persistent in Linux. https://stackoverflow.com/questions/37380232/linux-kernel-module-setting-cr4-vmxe-does-not-persist.
I hit this issue also, and I am studying it.
Thanks,
-Tao
- Tags:
- Virtualization
Link Copied

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page