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] Virtual IRQ for HVM Guests

To: "Koripella Srinivas" <talkwithsrinivas@xxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] Virtual IRQ for HVM Guests
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Wed, 23 May 2007 11:40:19 +0200
Delivery-date: Wed, 23 May 2007 02:38:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <508522.25896.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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
Thread-index: AcedGE8lNaGZ5BRoT6KaEYU8yo1+/wAAQohg
Thread-topic: [Xen-devel] Virtual IRQ for HVM Guests
 

> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Koripella Srinivas
> Sent: 23 May 2007 09:56
> To: xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-devel] Virtual IRQ for HVM Guests
> 
> Hi,
> 
> My doubt is regarding event channels. Suppose i use the event 
> channel mechanism for injecting a virtual irq into a hvm 
> guest, does the hvm guest respond to the irq by executing 
> it's device driver or does it neglect it because hvm guests 
> look for interrupts only from theier emulated APIC or PIC.

In the fully-virtualized case, IRQ's are handled by using the mechanisms
to inject interrupts (by reading the {A,}PIC state) into the guest in
the VMC{B,S} - both AMD and Intel have fields for "event injection",
which includes interrupts. Exactly how this works is slightly different
for the two products, but essentially, what it does is tell the
processor core to perform the same internal operations as if an
IRQ-signal was given to the processor in the normal hardware case. That
is, check the interrupt flag if interrupts are allowed, read the vector
table, save stuff on the stack, potentially change the ring-level, and
jump to the ISR. It is the OS's (and drivers) responsibility to set up
the interrupt vector table to contain ISR's to handle the interrupt and
interact with other parts of the driver for example. 

In a para-virtual driver, the IRQ isn't related to a real interrupt
signal in a virtual device, but it's still working the same way - an
interrupt event is injected into the processor. 

This all has to work this way, since there's no other way to "wake" an
unmodified kernel - the kernel itself is completely unaware of
event-channels or their meaning - they only exist in Xen, not in the
guest OS itself (the PV driver will use event channels through
hypercalls, but it's still using a "real" irq to signal from the
hypervisor to the OS that "something happened". [Look at
.../unmodified_drivers/platform-pci/evtchn.c, it uses "request_irq" to
bind the IRQ handler (evtchn_interrupt) to a device IRQ (pdev->irq)]. 

--
Mats
> 
> 
> Thanks
> 
> 
> 
> ________________________________
> 
> Office firewalls, cyber cafes, college labs, don't allow you 
> to download CHAT? Here's a solution! 
> <http://us.rd.yahoo.com/mail/in/ymessenger/*http://in.messenge
> r.yahoo.com/webmessengerpromo.php>  
> 



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

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