From: Andrew Cooper <andrew.cooper3@citrix.com>
To: xen-devel@lists.xen.org
Subject: Re: [PATCH] x86/IRQ: fix valid-old-vector checks in __assign_irq_vector()
Date: Thu, 27 Sep 2012 16:33:50 +0100 [thread overview]
Message-ID: <506471DE.4090708@citrix.com> (raw)
In-Reply-To: <50648725020000780009E462@nat28.tlf.novell.com>
On 27/09/12 16:04, Jan Beulich wrote:
>>>> On 27.09.12 at 16:57, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> On 27/09/12 15:50, Jan Beulich wrote:
>>> There are two greater-than-zero checks for the old vector retrieved,
>>> which don't work when a negative value got stashed into the respective
>>> arch_irq_desc field. The effect of this was that for interrupts that
>>> are intended to get their affinity adjusted the first time before the
>>> first interrupt occurs, the affinity change would fail, because the
>>> original vector assignment would have caused the move_in_progress flag
>>> to get set (which causes subsequent re-assignments to fail until it
>>> gets cleared, which only happens from the ->ack() actor, i.e. when an
>>> interrupt actually occurred).
>>>
>>> This addresses a problem introduced in c/s 23816:7f357e1ef60a (by
>>> changing IRQ_VECTOR_UNASSIGNED from 0 to -1).
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>> ---
>>> I have to admit that I don't understand why the value got changed in
>>> the first place: 0 is as invalid a value as -1 for a vector to be used
>>> for delivering hardware interrupts.
>> http://lists.xen.org/archives/html/xen-devel/2011-09/msg00193.html
>>
>> It was a suggestion for consistency with using -1 elsewhere in the irq
>> code to mean unassigned.
> Not really - there George suggested to use IRQ_VECTOR_UNASSIGNED,
> but not to make that resolve to -1. My claim is that this manifest
> constant could easily resolve to zero instead.
>
> Jan
Ah - it was in the following email.
"Yes - I missed that. However, IRQ_VECTOR_UNASSIGNED should be -1
instead of 0, as the first 32 entries of irq_vector have 0 entries which
are not unassigned."
Which was my justification of using -1 as opposed to 0.
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
--
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com
next prev parent reply other threads:[~2012-09-27 15:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 14:50 [PATCH] x86/IRQ: fix valid-old-vector checks in __assign_irq_vector() Jan Beulich
2012-09-27 14:57 ` Andrew Cooper
2012-09-27 15:04 ` Jan Beulich
2012-09-27 15:33 ` Andrew Cooper [this message]
2012-09-27 16:03 ` Jan Beulich
2012-09-27 15:29 ` Keir Fraser
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=506471DE.4090708@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.