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] Interrupt for HVM guests

To: Emre Can Sezer <ecsezer@xxxxxxxx>
Subject: Re: [Xen-devel] Interrupt for HVM guests
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 05 Jun 2009 19:58:40 +0100
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 05 Jun 2009 11:59:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A296746.3050204@xxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnmDY7kUqC1x4IXTm+h6iVMhTWZ7QAAhSuD
Thread-topic: [Xen-devel] Interrupt for HVM guests
User-agent: Microsoft-Entourage/12.17.0.090302
On 05/06/2009 19:43, "Emre Can Sezer" <ecsezer@xxxxxxxx> wrote:

> I am trying to figure out how an HVM guest is passed an interrupt.  Say
> that a network packet has arrived and the QEMU driver in dom0 has to
> notify an HVM guest of the packet's arrival.  Could someone please give
> a brief, high-level description of this process?  I read the Intel
> Architectures Software Developer's Guide on VM Execution bits and
> Virtual interrupts and also some Xenwiki stuff about it but I'm still
> not sure what's going on.  I don't have any device pass-through or
> stubdom or PV Drivers for my HVM guest.  I would also appreciate
> references to some Xen files/functions related to this process.

Following will give you enough to grep around for the details:
Hypercall is HVMOP_set_pci_intx_level: qemu-dm uses this to assert a PCI
INTx virtual interrupt line. Handled by hvm_pci_intx_assert() ->
vioapic_irq_positive_edge() -> vioapic_deliver() -> ioapic_inj_irq() ->
vlapic_set_irq()&vcpu_kick(). Final function there wakes the guest vcpu
which on vmentry calls vmx_intr_assist() -> hvm_vcpu_has_pending_irq() ->
vlapic_has_pending_irq(), which will return a pending vector.
Vmx_intr_assist() then delivers that vector via vmx_inject_extint().
Hardware then delivers the interrupt automatically during vmentry.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>