[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Paravirtualization of the "HLT" instruction (for example) on x386

On 12 Jan 2006, at 10:39, Ian Brown wrote:

1) Can you please give a pointer to where in code (xen 3.0) such privileged
instruction is  replaced
with a trap to the hypervisor ? (I have some assumption where it is done
but I am really not sure at all)

xen_idle() in arch/xen/i386/process.c. Uses the SCHEDOP_block hypercall, which is a fairly direct replacement for HLT.

2) Regarding HLT - what happens if a guest OS issue "HLT" ?
I assume that without intervention in Xen code, issuing HLT from a
guest domain can stop not only the guest domain, but also the
hypervisor (and in fact the machine).
is there somewhere in code special treatment to "HLT"?

HLT is only executable in ring 0. If the guest tries to execute it then it will receive a general protection fault.

 -- Keir

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.