WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Paravirtualization of the "HLT" instruction (for example) on x386
From: Ian Brown <ianbrn@xxxxxxxxx>
Date: Thu, 12 Jan 2006 12:39:56 +0200
Cc: Xen Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 12 Jan 2006 10:46:28 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NsjGN7IDHWfKswiUPzEw3LqanGLgM/1lrc95a+bmX+pChMISx/J+U1FQH/JPHrd05Y9Z2ahKA0WuLeDzPMJwmNlXTm2nJoflX+qmeX/pjN6pPTs5u+IjhICU9GEgNO/BtTB2BE14GTqM1DD73dMPe6WGgYkioodq+eEViQ6JHoA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <60c562438f7299b8b178aa9b70cd6997@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <d0383f90601120127g5994eedal71bac2a01fce5e87@xxxxxxxxxxxxxx> <60c562438f7299b8b178aa9b70cd6997@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hello,
Thnks, Keir.

>The point of paravirtualizetion is that such instructions are replaced
>with explicit traps to the hypervisor in the OS.

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)

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"?
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