OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 7:34 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: vmlaunch failed in RHEL 7.1(Linux-3.10.0)
PostPosted: Wed Feb 28, 2018 7:44 pm 
Offline

Joined: Fri Nov 17, 2017 7:02 am
Posts: 20
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: akasei, DotBot [Bot], SemrushBot [Bot] and 107 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group