From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: Wei Wang <wei.wang2@amd.com>, Allen Kay <allen.m.kay@intel.com>
Subject: Crashdump and IOMMU problems
Date: Wed, 11 May 2011 13:46:42 +0100 [thread overview]
Message-ID: <4DCA8532.3070508@citrix.com> (raw)
Hello,
I have been debugging kexec interaction problems with XenServer and
found that the problem lies in how Xen tares down the computer in a crash.
The Xen kexec path does not touch IOMMU at all, which leaves the kexec
native kernel with interrupt remapping enabled without realizing it.
This leads to the kexec kernel failing to understand why its interrupts
aren't working.
As a debugging measure, I have put iommu_ops->suspend() and
iommu_disable_IR() on the kexec path and this 'fixes' the problem,
although it is far from safe.
From a correctness point of view, Xen really does need to shutdown all
IOMMU remapping before it jumps to the crash kernel. I know that kdump
is a "seat of the pants best effort" in the best case, but there is more
which Xen needs to do to help it along. I was considering adding a
crash_shutdown function to iommu_ops which goes and twiddles the
relevant disable bits, without saving state.
However, disabling DMA remapping while transfers are still ongoing is
likely asking for trouble. Seeing as people on here are likely to know
far more than me on this subject:
1) Is there a systematic way to find and disable active DMA transfers,
or indeed a systematic way to shut down PCI (etc) devices which is safe
for the kexec path.
2) Are there any other PC subsystems which could do with being shut down
in a sensible manor to make life easier for the kdump kernel?
Thanks in advance,
~Andrew
--
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com
next reply other threads:[~2011-05-11 12:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 12:46 Andrew Cooper [this message]
2011-05-11 22:11 ` Crashdump and IOMMU problems Kay, Allen M
2011-05-12 8:24 ` Tim Deegan
2011-05-12 9:01 ` 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=4DCA8532.3070508@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=allen.m.kay@intel.com \
--cc=wei.wang2@amd.com \
--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).