From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: Jan Beulich <JBeulich@suse.com>,
Xen-devel List <xen-devel@lists.xen.org>
Subject: Spinlock inversion in amd/iommu_init
Date: Thu, 18 Dec 2014 18:02:57 +0000 [thread overview]
Message-ID: <549316D1.4060707@citrix.com> (raw)
Hi,
XenServers Coverity scanning has identified a spinlock inversion, where
enable_iommu() takes the iommu lock and irq_desc lock in an opposite
order to the rest of the interrupt handling. (I suspect Coverity Scan
is not identifying this as it is not configured to perform function
pointer analysis.)
This codepath is used during boot, and on resume from S3, and presumably
has not been hit in practice as the irq_desc lock is only taken when
interrupts from the IOMMU are quiesced.
In terms of fixing the locking inversion, I think the affinity setting
part of enable_iommu() can safely move to set_iommu_interrupt_handler().
Having said that, it occurs to me that nothing currently changes the msi
affinity at all, as cpus come up and down. Furthermore, it seems unwise
to have the affinity any bigger than the local numa set anyway, as this
interrupt is specifically not associated with a vcpu.
~Andrew
reply other threads:[~2014-12-18 18:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=549316D1.4060707@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Aravind.Gopalakrishnan@amd.com \
--cc=JBeulich@suse.com \
--cc=suravee.suthikulpanit@amd.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.