[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] About set sysenter_cs to intercept SYSENTER/SYSEXIT
hi, I encounter a question. I want to intercept system call and its return value of VM, so I set MSR_SYSENTER_CS with Null segment selector(0) to raise a #GP every SYSENTER/SYSEXIT. Then the VM will trap into Xen. My question: I set MSR_SYSENTER_CS to 0, But I didnt get a #GP in vmx_vmexit_handler(). If I set MSR_SYSENTER_CS to 0x3e0 or 0x8, I will get a lot #GP and the VM frozen. My code is as below Step 1) first, I set Xen handle the #GP. In counstrcut_VMCS() and vmx_vmexit_handler() __vmwrite(EXCEPTION_BITMAP, __vmread(EXCEPTION_BITMAP) | (1U<<TRAP_gp_fault)); Step 2) set Xen to handle the GP. In vmx_vmexit_handler() switch ( exit_reason ) case TRAP_gp_fault: Step 3) set MSR_SYSENTER_CS with Null segment selector(0) to raise a #GP. In vmx_vmexit_handler() new_cs=0x0; vmx_write_sysenter_msr(GUEST_SYSENTER_CS, new_cs); -- Best Regards, yandong _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |