[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Paravirtualization of the "HLT" instruction (for example) on x386
Hello, First, thanks Keir for your answer. >The point of paravirtualization is that such instructions are replaced >with explicit traps to the hypervisor in the OS. >Emulation of the raw instruction is not required. I had thought again about your answer and after probing the code and IA32 manuals I am not sure I understood you fully and correctly. I tried to look for such privileged instructions in the guest OS code (for IA32) which are replaced with explicit traps to the hypervisor and didn't find. I know that CLTS and WBINVD instructions, for example , should cause #GP(0) if run from CPL which is not 0; but grepping for an asm instruction which calls CLTS or WBINVD under the sparse tree gives no results. Can you give one example for such an instruction which cause a trap to the hypervisor when run in a guest OS and where in the code it causes such a trap ? (As far as I understand,if we try to issue a privilege instruction from CPL1 we should get a #GP(0) and reach the general protection handler in sparse/arch/xen/i386/kernel/traps.c , do_general_protection(). But I had looked at do_general_protection() in sparse/arch/xen/i386/kernel/traps.c and could not find there a mechanism which will trap to the hypervisor;maybe I had totally missed the point?) Regards, IB On 1/12/06, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> wrote: > > On 12 Jan 2006, at 09:27, Ian Brown wrote: > > > So I tried to find where in the Xen-3.0 code it is done. > > I saw in vmx.c the vmx_vmexit_do_hlt() method ,which is called > > when "HLT" is performed, but this is relevant when running a > > platform with VT-x. > > I am looking for tracing where this handling or modifying of > > the HLT instruction is done in a usual x386 (non-VTX) processor. > > > > Can anybody please point where in the code of Xen 3.0 this is done > > (for x86 processors)? > > The point of paravirtualizetion is that such instructions are replaced > with explicit traps to the hypervisor in the OS. Emulation of the raw > instruction is not required. > > In fact we do emulate some privileged instructions, just not HLT. > > -- Keir > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |