xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Keir Fraser <keir@xen.org>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] IRQ: manually EOI migrating line interrupts
Date: Tue, 30 Aug 2011 16:03:24 +0100	[thread overview]
Message-ID: <4E5CFBBC.6080109@citrix.com> (raw)
In-Reply-To: <CA82B3D2.30D06%keir@xen.org>



On 30/08/11 15:35, Keir Fraser wrote:
> On 30/08/2011 15:28, "Andrew Cooper" <andrew.cooper3@citrix.com> 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

  reply	other threads:[~2011-08-30 15:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 14:17 [PATCH] IRQ: manually EOI migrating line interrupts Andrew Cooper
2011-08-30 14:19 ` Andrew Cooper
2011-08-30 14:28 ` Andrew Cooper
2011-08-30 14:35   ` Keir Fraser
2011-08-30 15:03     ` Andrew Cooper [this message]
2011-08-30 14:38   ` Keir Fraser
2011-08-30 15:19     ` Andrew Cooper
2011-08-30 16:04       ` Keir Fraser
2011-09-05 10:50       ` Jan Beulich
2011-09-05 12:24         ` Andrew Cooper
2011-09-05 10:43 ` Jan Beulich
2011-09-05 12:29   ` Andrew Cooper
2011-09-05 12:50     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E5CFBBC.6080109@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).