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] details on /proc/interrupts

To: "Diwaker Gupta" <diwakergupta@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] details on /proc/interrupts
From: "Neugebauer, Rolf" <rolf.neugebauer@xxxxxxxxx>
Date: Wed, 22 Dec 2004 00:14:44 -0000
Delivery-date: Wed, 22 Dec 2004 00:16:31 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Thread-index: AcTnslU+sT/ZRlRwRi6O0Lj9HBMy2gABaXcA
Thread-topic: [Xen-devel] details on /proc/interrupts

> -----Original Message-----
> From: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx [mailto:xen-devel-
> admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Diwaker Gupta
> Sent: 21 December 2004 23:04
> To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
> Subject: [Xen-devel] details on /proc/interrupts
> 
> Hi devs,
> 
> Can someone shed some light on what the various interrupts (as seen
> from inside a guest OS) mean? Here's a sample:
> 
>            CPU0
> 128:          1     Dynamic-irq  misdirect
> 129:        199     Dynamic-irq  ctrl-if
> 130:     121843     Dynamic-irq  timer
> 131:       6675     Dynamic-irq  blkif
> 132:     136768     Dynamic-irq  eth0
> NMI:          0
> ERR:          0
> 
> AFAIK, the timer interrupts are the ones delivered by Xen to a guest
> OS on one of three events -- a periodic timer to the currently
> executing domain, an interrupt when a domain gets scheduled, and
> interrupts on events programmed by the guest OS itself.
> 
> Now, I'm guessing the eth0 interrupts are raised when a packet arrives
> for that particular guest OS. Is this interrupt flagged by the domain
> which is acting as the backend for that interface, or the Xen
> hypervisor itself?
> 
> The blkif and the ctrl-if are the ones that I'd like to know some more
> about -- what are these interrupts, who raises them and when. Same for
> the misdirect interrupt.

[my memory on some of the details is a bit hazy...]

Xen uses a generic event mechanism to represent three types of
asynchronous events to a guest:
- physical IRQs
- virtual IRQs 
- interdomain communication events
Each VM has 1024 event endpoints or ports.

In xenlinux these are mapped into the normal interrupt dispatch. IIRC
the first 128 "interrupts" are reserved for event endpoints bound to
physical IRQs. The remaining ones are dynamically allocated.  Note that
there is a level of indirection between port number and irq number.

The above sample looks like coming from a non-privileged as there are no
event endpoints of type physical IRQ. 

Virtual IRQs are generated directly by the Xen hypervisor. A good
example is the timer above. This is send to a well defined port (mapped
to IRQ 130) in this case. Other examples are NMI and ERR.

I don't know of the top if my head what misdirect is...

Blkif, eth0 and ctrl-if are inter VM communication events mapped to the
IRQ lines listed above. Another VM will send an asynchronous event on
the appropriate event channel to the guest and it will see this as an
interrupt on the corresponding IRQ.

The ctrlif is used for low bandwidth communication with dom0
(specifically xend). For example consoles messages are implemented using
this as well control interfaces to set up virtual network and block
devices.

Blkif and eth0 are device channels. Basically if the backend receives
data for this VM it will place this on a producer consumer ring and send
an event to the frontend driver. As these are mapped to IRQs in
xenolinux the frontend drivers can just use standard linux mechanisms to
request an IRQ etc.

There isn't really much written documentation about this but the publc
xen interfaces in xen/include/public/* contain some more info. xen.h is
a good starting point followed by events.h and io/*.h. also
linux-6.6.9-xen-sparse/arch/xen/kernel/evtchn.c

There is also some text written by andy in
docs/misc/blkif-drivers-explained.txt

rolf

> TIA
> --
> Diwaker Gupta
> http://resolute.ucsd.edu/diwaker
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real
users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/xen-devel


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

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