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] hvm iret [also xen interrupt handling deltails]

To: Xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] hvm iret [also xen interrupt handling deltails]
From: "Ashish Bijlani" <ashish.bijlani@xxxxxxxxx>
Date: Sun, 21 Oct 2007 09:59:12 -0400
Delivery-date: Sun, 21 Oct 2007 06:59:53 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=sKjtwZdl2wosSToWKxSgcXzdy60AYnWzOFxd/HEZhnA=; b=Rd0xQzN/H1FENy0oAEOo46RdbqWTU5mALfh/ablEvhojNhPzD4TTLV0To4p2z1U/GH7dhxZ8XGlWxU0stbD4cYduJ7jCw81M1aylGQgHnkyLtzsoxbUk8McZZbyHbqIWC7cIvw5mclAhHCGVpgsm+re3m+pvh9f3KxsVdqyz8jE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=jbVts5aro49SaSfUyYGQ9W+Vxw+H3YImHPrGMkJCwbh9kXuQUIiaJ0UH55lw+QXFUBRa+Q0yYJBymoouVzyzJfrsMIKJJdbBkC1HssDPhQ4q3Qjf6bLS7DvlM8s5Vd0av9CkNdNP0K6YP2cjMwW1m6AhSINW3sPebUjwqg2lBAM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
thanks for the response. i   understand the concept of events and xen event injection process. but what i'd like to know is what happens when a guest(hvm) OS krnl executes iret? does it trap to xen? would it _always_ trap to xen in paravirtualized environment ( i.e. no hardware assisted virtualization)?

also, i understand that when a physical interrupt comes, xen sets bits in some event bitmask to inject events (or virtual interrupts) into guest VMs, but when does xen send EOI to the IOAPIC? does it send after all the guest VMs have executed their ISRs or does it send immediately upon receiving a physical interrupt? thanks again.

On 10/21/07, Cui, Dexuan <dexuan.cui@xxxxxxxxx> wrote:

For HVM guest, i.e., VMX guest, the execution of IRET is similar to that on native system, but of course there are important differences :)  -- you should read the related chapters (i.e., "event injection") in Intel Software Developer's Manual 3B, and you should also look at the Xen code (i.e., the vioapic.c, vlapic.c, vmx/vmx.c, vmx/intr.c in the directory xen/arch/x86/hvm/).

 

Note: HVM guest doesn't touch physical interrupt (and the physical pic/ioapic /local_apic) --here we don't consider VT-d

Xen only "injects" *virtual* interrupts into HVM guest with the help of the emulation of Device Model.

When HVM vcpu is running, if a physical interrupt happens, a VMExit  will occur to interrupt the execution of the HVM vcpu, then Xen handles the physical interrupt.

 

-- Dexuan



From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Ashish Bijlani
Sent: 2007年10月21日 4:21
To: Xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] hvm iret

could anybody guide me to some pointers on iret execution by hvms. something like what happens when a HVM executes an iret instruction? when is the physical interrupt acknowledged so that IOAPIC can send more interrupts. thanks.

-a

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>