Skip to contentSkip to conversation

Virtual IRQ for HVM Guests

DISCUSSION Koripella Srinivas 2 participants 2 messages May 23, 2007

lore
Share & tools
lore
#0 lore raw

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.

Thanks

Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? Click here: http://in.messenger.yahoo.com/webmessengerpromo.php

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 10 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Koripella Srinivas
Sent: 23 May 2007 09:56
To: [email protected]
Subject: [Xen-devel] Virtual IRQ for HVM Guests

Quoted 7 lines

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

Quoted 13 lines

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>