From: Rami Rosen Subject: Interrupts in Xen and GuestOS Date: Wed, 14 Sep 2005 07:55:58 -0400 Message-ID: Reply-To: rosenrami@gmail.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1785107002==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1785107002== Content-Type: multipart/alternative; boundary="----=_Part_9654_10231726.1126698958393" ------=_Part_9654_10231726.1126698958393 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, Something with interrupts in Xen and GuestOS in unclear to me: Let's take for example a case where a frame arrives and we have interrupt 1= 1=20 on the=20 physical device , the ETH NIC. we get to do_irq() in xen/arch/x86/irq.c=20 Now there ,after acknowledging the irq controller (the 8259 APIC) , as also is done in a NON-XEN kernel,it performs a check: if ( likely(desc->status & IRQ_GUEST) ) and delegates to guest OS if the condition is true. desc is an instance of irq_desc_t.=20 In most of cases, as the unlikely hints,the IRQ_GUEST is set. What I would like to know is , in which case the interrupt will reach do_irq() and the IRQ_GUEST **WILL NOT** be set.=20 It seems to me that all NIC interrutps should reach do_irq when desc->statu= s=20 & IRQ_GUEST=20 is TRUE. Am I right ?=20 Can it happen that ordinary interrupts of the NIC (interrupt 11 in this=20 example) will reach do_IRQ() without this flag set ?=20 Regards, Rami ------=_Part_9654_10231726.1126698958393 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello,

Something with interrupts in Xen and GuestOS in unclear to me:
 
Let's take for example a case where a frame arrives and we have interrupt 1= 1 on the
physical device , the ETH NIC.

we get to do_irq() in xen/arch/x86/irq.c
Now there ,after acknowledging the irq controller (the 8259 APIC) ,
as also is done in a NON-XEN kernel,it performs a check:

if ( likely(desc->status & IRQ_GUEST) )
and delegates to guest OS if the condition is true.

  desc is an instance of irq_desc_t.

 In most of cases, as the unlikely hints,the IRQ_GUEST is set.
 What I would like to know is , in which case the interrupt will reach=
 do_irq() and the IRQ_GUEST **WILL NOT** be set.

 It seems to me that all NIC interrutps should reach do_irq when desc-= >status & IRQ_GUEST
is TRUE. Am I right ?  
 Can it happen that ordinary interrupts of the NIC (interrupt 11 in th= is example)
 will reach do_IRQ() without this flag set ?

Regards,
Rami
------=_Part_9654_10231726.1126698958393-- --===============1785107002== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1785107002==--