[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [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)]. 

> 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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.