From: "Ashish Bijlani" Subject: Re: Hypercalls in Intel-VT Date: Thu, 25 Oct 2007 20:19:44 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1924507625==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1924507625== Content-Type: multipart/alternative; boundary="----=_Part_2369_16374337.1193357984150" ------=_Part_2369_16374337.1193357984150 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Content-Disposition: inline could there be a way to make a transition into xen without a vmexit upon executing an iret inside a guest os krnl? On 10/25/07, Cui, Dexuan wrote: > > > From: xen-devel-bounces@lists.xensource.com [mailto: > xen-devel-bounces@lists.xensource.com] On Behalf Of Ashish Bijlani > > Sent: 2007年10月26日 7:44 > > To: xen-devel@lists.xensource.com > > Subject: Re: [Xen-devel] Hypercalls in Intel-VT > > > if I push xen's some addr (cs & eip) on the target guest os krnl stack > when an interrupt occurs, would the guest os krnl return to xen > > immediately upon executing iret (as iret pops cs, eip from the krnl > stack)? or would it make a vmexit coz of some illegal addr access > > I assume you're only talking about Intel VMX guest. The answer is NO. > For instance, a VMX guest is running in "non-root mode"; it can only use > its (shadowed) page table; it can't use IRET to return to Xen that's running > on "root mode". > If you did that, what would happen is, i.e., a 32-bit protection-mode > guest uses its own GDT -- the guest may find the GDT entry indexed by Xen's > CS is invalid, so a #GP is generated in guest directly, and guest handles > this (No VMexit). > > -- Dexuan > ------=_Part_2369_16374337.1193357984150 Content-Type: text/html; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Content-Disposition: inline could there be a way to make a transition into xen without a vmexit upon executing an iret inside a guest os krnl?

On 10/25/07, Cui, Dexuan < dexuan.cui@intel.com> wrote:
> From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Ashish Bijlani
> Sent: 2007年10月26日 7:44
> To: xen-devel@lists.xensource.com
> Subject: Re: [Xen-devel] Hypercalls in Intel-VT

> if I push xen's some addr (cs & eip) on the target guest os krnl stack when an interrupt occurs, would the guest os krnl return to xen
> immediately upon executing iret (as iret pops cs, eip from the krnl stack)? or would it make a vmexit coz of some illegal addr access

I assume you're only talking about Intel VMX guest. The answer is NO.
For instance, a VMX guest is running in "non-root mode"; it can only use its (shadowed) page table; it can't use IRET to return to Xen that's running on "root mode".
If you did that, what would happen is, i.e., a 32-bit protection-mode guest uses its own GDT -- the guest may find the GDT entry indexed by Xen's CS is invalid, so a #GP is generated in guest directly, and guest handles this (No VMexit).

-- Dexuan

------=_Part_2369_16374337.1193357984150-- --===============1924507625== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1924507625==--