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

[Xen-devel] Re: [PATCH] IRQ: manually EOI migrating line interrupts

To: Keir Fraser <keir@xxxxxxx>
Subject: [Xen-devel] Re: [PATCH] IRQ: manually EOI migrating line interrupts
From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Date: Tue, 30 Aug 2011 16:03:24 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 30 Aug 2011 08:06:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CA82B3D2.30D06%keir@xxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CA82B3D2.30D06%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110805 Lightning/1.0b2 Thunderbird/3.1.12

On 30/08/11 15:35, Keir Fraser wrote:
> On 30/08/2011 15:28, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx> wrote:
>
>> P.S.
>>
>> Because this fix actually works, it means that EOI'ing the IO-APIC is
>> keyed only on vector, and not the target CPU.  As a result, having two
>> different interrupts in the IO-APIC with the same vector will result in
>> problems when trying to EOI one of them.
>>
>> I will address this problem as well in my IRQ cleanup, as I cant see any
>> checks for it currently.
> Isn't this a general issue with per-cpu vector allocations anyway? The usual
> irq-completion path of LAPIC EOI -> IO-APIC EOI broadcast will unavoidably
> have this issue. Every irq line on every IO-APIC currently programmed with
> that vector (regardless of target CPU) will get EOIed/unmasked. Not clear
> it's really a problem though! It might cause the odd spurious interrupt
> perhaps?
>
>  -- Keir

The manual (Section 10.8.5) says "If the terminated interrupt was a
level-triggered interrupt, the local APIC also sends an end-of-interrupt
message to all I/O APICs"

So the EOI broadcast only happens if the TMR bit say that the interrupt
was line level, which should make the code fine.

Alternatively, you can explicitly disable the EOI broadcast (if
supported - bit 24 of the Local APIC Version Register) by setting bit 12
of the SPIV Register, and manually writing to the IO-APIC EOI register.

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com


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