public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
	Neil Horman <nhorman@redhat.com>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	Simon Horman <horms@verge.net.au>,
	Andrew Vasquez <andrew.vasquez@qlogic.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-driver@qlogic.com, Vivek Goyal <vgoyal@redhat.com>
Subject: Re: In place kexec
Date: Fri, 30 Jul 2010 22:15:40 +0200	[thread overview]
Message-ID: <1280520940.28006.7.camel@macbook.infradead.org> (raw)
In-Reply-To: <m18w4ska11.fsf@fess.ebiederm.org>

On Fri, 2010-07-30 at 13:08 -0700, Eric W. Biederman wrote:
> The issue is what happens if you take an IOMMU page fault during
> between shutdown and restart.  I seem to remember an IOMMU page fault
> triggering a machine check on AMD cpus.  So maybe it works but my gut
> impression is simply leaving the IOMMU in a state that is on but not
> responding could actually make a reboot or kexec less stable than having
> on-going DMAs stomping on memory.  If you can leave it on, without
> translations and not trapping to software that is a different story. 

Speaking of the Intel IOMMU, I know nothing of any 'on but not
responding' state. You have:

 - 'off', which gives a 1:1 mapping and thus if you do this during kexec
    any still-running devices could be scribbling *anywhere* in memory,
    using their previously-allocated virtual DMA addresses which are
    now interpreted as physical addresses.

 - 'on with page tables cleared', in which case you are safe but some
    devices might get upset when their DMA is aborted, so their driver
    needs not to be a pile of shit, and needs to recover from that.

 - 'on and we preserve the virt->phys mappings of the previous kernel',
    which is just crack-inspired. You'd have to find the physical pages
    which were mapped by the previous kernel and steal them away from
    the new kernel's memory map, just in case they get scribbled on by
    a device which hasn't been properly shut down by the previous
    kernel, through the still-extant DMA mappings.

I mention the latter only because it's been suggested by someone who was
dealing with a broken driver/hardware combination where it *didn't* get
properly reset after a fault, even when the driver was loaded anew. Not
because anyone in their right mind would ever *do* it.

-- 
dwmw2


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2010-07-30 20:15 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 21:57 In place kexec H. Peter Anvin
2010-07-28 22:02 ` Eric W. Biederman
2010-07-29 13:43   ` Neil Horman
2010-07-29 15:03     ` H. Peter Anvin
2010-07-29 15:06       ` Neil Horman
2010-07-29 17:51         ` H. Peter Anvin
2010-07-29 18:06           ` Eric W. Biederman
2010-07-29 18:29             ` H. Peter Anvin
2010-07-29 19:16               ` Vivek Goyal
2010-07-29 19:51                 ` Eric W. Biederman
2010-07-29 19:55                   ` Randy Dunlap
2010-07-30  3:38                     ` H. Peter Anvin
2010-07-30  4:41                       ` Eric W. Biederman
2010-07-30  5:04                         ` H. Peter Anvin
2010-07-30 16:30                           ` Eric W. Biederman
2010-07-30 16:41                             ` H. Peter Anvin
2010-07-30 18:36                               ` Eric W. Biederman
2010-07-30 22:52                                 ` Andrew Vasquez
2010-07-30 23:25                                   ` H. Peter Anvin
2010-07-30 23:40                                     ` Eric W. Biederman
2010-07-30 16:53                         ` David Woodhouse
2010-07-30 18:21                           ` Eric W. Biederman
2010-07-30 18:34                             ` Vivek Goyal
2010-07-30 18:50                               ` David Woodhouse
2010-07-30 18:56                                 ` Vivek Goyal
2010-07-30 19:17                                   ` David Woodhouse
2010-07-30 19:39                                     ` Eric W. Biederman
2010-07-30 19:46                                       ` David Woodhouse
2010-07-30 20:08                                         ` Eric W. Biederman
2010-07-30 20:15                                           ` David Woodhouse [this message]
2010-07-30 21:11                                             ` H. Peter Anvin
2010-07-30 20:42                           ` H. Peter Anvin
2010-07-30 21:18                             ` Khalid Aziz
2010-07-30 21:44                               ` Khalid Aziz
     [not found]                                 ` <20120425211512.GA8583@ldl.usa.hp.com>
2012-04-25 22:06                                   ` Vivek Goyal
2010-07-29 20:06                   ` H. Peter Anvin

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=1280520940.28006.7.camel@macbook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=andrew.vasquez@qlogic.com \
    --cc=ebiederm@xmission.com \
    --cc=horms@verge.net.au \
    --cc=hpa@zytor.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-driver@qlogic.com \
    --cc=nhorman@redhat.com \
    --cc=randy.dunlap@oracle.com \
    --cc=vgoyal@redhat.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