On 01/19/2010 01:09 AM, Matteo Signorini wrote:
Hi guys, I would like to intercept the vm-exit whenever the guest executes a lidt/sidt instruction. I know that lidt/sidt instructions cause a vm-exit if and only if these condition are satisfied: -commands are executed in vmx non-root environment -the "descriptor-table exiting" field of the secondary vm-execution control structure is enabled The first condition is satisfied because the guest OS executes the lidt/sidt in the boot routine so we are in the vmx non-root environment. To satisfy the second condition, I set up the 31th bit in the primary vm-execution control to 1 to enable the secondary vm-execution control, then I set up the 2nd bit of the secondary vm-execution control to 1 to enable the "descriptor-table exiting". The problem is that I never get the exit_code=46 (that should correspond to the IDTR access as shown in the Intel developer's manual). What I get is exit_code=0 and then the VM freezes. I wonder why I get 0 as exit reason instead of 46? Qemu gives me the following error message: "kvm: unhandled exit 7 kvm_run returned -22" The unhandled exit code correspond to the 7th vm-instruction error number referred to: "VM-Entry with invalid control field(s)"
Did you check whether your processor supports descriptor-table exiting? The 'vmxcap' script can help determine that. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html