[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] there is no sysret in X86_emulate, why?
> -----原始邮件----- > 发件人: "Jan Beulich" <JBeulich@xxxxxxxx> > 发送时间: 2014年10月30日 星期四 > 收件人: "Christoph Egger" <chegger@xxxxxxxxx>, hanyandong <hanyandong@xxxxxxxxx> > 抄送: xen-devel@xxxxxxxxxxxxx > 主题: Re: [Xen-devel] there is no sysret in X86_emulate, why? > > >>> On 30.10.14 at 02:46, <hanyandong@xxxxxxxxx> wrote: > > (1)In x86_emulate(), there are sysenter/sysexit, syscall. But why no sysret? > > Perhaps on the basis that this already when introduced was only > meant to be usable on 64-bit hypervisors, and 64-bit capable CPUs > always support SYSRET (whereas the scope of support for the > other three varies)? Christoph, you added that code years ago - is > there any other explanation for this? > > > (2)I want to iuntercept syscall/sysret, so I unset the EFER.SCE, so > > syscall/sysret will trap into Xen, then I emulate syscall/sysret. > > But I only see syscall and did not see one sysret, the guest run as usual. > > any one can give me an hint? > > Assuming you did everything correctly, this seems odd. But in any > event I'd suggest confirming such behavior in a native environment > first. > > Jan > thanks for your reply. the guest VM is xubuntu_14_x64 running on Xen-4.1.4. the code is as below , I only did a little modification , anything is wrong? the code to unset EFER.SCE is as below case HVM_MIT_SYSCALL_ring : the code to handle #UP is as below case TRAP_invalid_op: } the code to emulate syscall and sysret is as below, this is the source code of Xen. I only annotate the " generate_exception_if((msr_content & EFER_SCE) == 0, EXC_UD, -1);" case 0x05: /* syscall */ { > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel -- 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 |