I am working on a Linux kernel module to test Intel VMX operations. And my module could 'vmlaunch' successfully in RHEL 6.8 (Linux-2.6.32-642). But 'vmlaunch' failed in RHEL 7.1 (Linux-3.10.0).
Below is the failed log. [ 178.857991] VM-instruction error: 0 [ 178.857993] Exit Reason: 0x0 (0) [ 178.857996] Exit Qualif: 0 [ 178.858007] flags = 0x242 [ 178.858010] VMX-abort indicator = 0x0 And it shows, in eflags, Z bit is '1'. But from above log, I could NOT get what cause 'vmlauch' failed.
And I don't know why it worked in Linux-2.6.32, but failed in Linux-3.10.0.
Here is main code around vmlaunch, " vmlaunch \n" " movl $-1, retval \n" " pushf \n" " pop %rax \n" " movl %eax, saved_eflags \n" " jmp over \n" " \n" "vmx_vmm: \n" " movl $97, retval \n" " popfq \n"
vmx_vmm is set to vm_host_rip, so once vm exits, host shall continue from here. I got retval is setup to -1, not 97, so i think there is a failure in vmlaunch.
Thanks, -Tao
|