iommu: leave IOMMU enabled by default during kexec crash transition
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Tue, 12 Mar 2019 13:38:12 +0000 (14:38 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Mar 2019 13:38:12 +0000 (14:38 +0100)
commit12c36f577d454996c882ecdc5da8113ca2613646
treeb2bb7dc993186e3d9340dcbd366cdf0555708a1a
parent65a510fe5157817f3f8fb6acbb1d7786e7a8a701
iommu: leave IOMMU enabled by default during kexec crash transition

It's unsafe to disable IOMMU on a live system which is the case
if we're crashing since remapping hardware doesn't usually know what
to do with ongoing bus transactions and frequently raises NMI/MCE/SMI,
etc. (depends on the firmware configuration) to signal these abnormalities.
This, in turn, doesn't play well with kexec transition process as there is
no handling available at the moment for this kind of events resulting
in failures to enter the kernel.

Modern Linux kernels taught to copy all the necessary DMAR/IR tables
following kexec from the previous kernel (Xen in our case) - so it's
currently normal to keep IOMMU enabled. It might require minor changes to
kdump command line that enables IOMMU drivers (e.g. intel_iommu=on /
intremap=on) but recent kernels don't require any additional changes for
the transition to be transparent.

A fallback option is still left for compatibility with ancient crash
kernels which didn't like to have IOMMU active under their feet on boot.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
docs/misc/xen-command-line.pandoc
xen/arch/x86/crash.c
xen/drivers/passthrough/iommu.c