Re: In place kexec

2010-07-30 Thread Eric W. Biederman
"H. Peter Anvin" writes: > On 07/30/2010 03:52 PM, Andrew Vasquez wrote: >> >> Looking through all these emails, what's the upshot here? Is the >> expectation, for all storage drivers to starting to implement some >> 'minimal' level of shutdown with the hardware/firmware during the >> .shutdown

Re: In place kexec

2010-07-30 Thread H. Peter Anvin
On 07/30/2010 03:52 PM, Andrew Vasquez wrote: > > Looking through all these emails, what's the upshot here? Is the > expectation, for all storage drivers to starting to implement some > 'minimal' level of shutdown with the hardware/firmware during the > .shutdown callback? > I believe so. It s

Re: In place kexec

2010-07-30 Thread Andrew Vasquez
On Fri, 30 Jul 2010, Eric W. Biederman wrote: > "H. Peter Anvin" writes: > > > On 07/30/2010 09:30 AM, Eric W. Biederman wrote: > >> > That said it looks like the code to do the shutdown is in > qla2x00_remove_one so it should be too hard if someone cared to > extract just the ha

Re: In place kexec

2010-07-30 Thread Khalid Aziz
On Fri, 2010-07-30 at 21:18 +, Aziz, Khalid wrote: > There were some discussions regarding this and this code was removed by > the time it was merged into mainline kernel. I can't remember the > details of why. I remember one report of kernel hang on kexec that > seemed to happen in device_shoo

Re: In place kexec

2010-07-30 Thread Khalid Aziz
On Fri, 2010-07-30 at 20:42 +, H. Peter Anvin wrote: > On 07/30/2010 09:53 AM, David Woodhouse wrote: > > On Thu, 2010-07-29 at 21:41 -0700, Eric W. Biederman wrote: > >> There isn't a bus master shut off at the core level. > > > > Effectively, there is if you have an IOMMU. > > With the "c

Re: In place kexec

2010-07-30 Thread H. Peter Anvin
On 07/30/2010 01:15 PM, David Woodhouse wrote: > > - '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. > I presume this is the state he

Re: In place kexec

2010-07-30 Thread H. Peter Anvin
On 07/30/2010 09:53 AM, David Woodhouse wrote: > On Thu, 2010-07-29 at 21:41 -0700, Eric W. Biederman wrote: >> There isn't a bus master shut off at the core level. > > Effectively, there is if you have an IOMMU. With the "core level" I meant Linux kernel code, as opposed to hardware level whic

Re: In place kexec

2010-07-30 Thread David Woodhouse
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 leavi

Re: In place kexec

2010-07-30 Thread Eric W. Biederman
David Woodhouse writes: > On Fri, 30 Jul 2010, Eric W. Biederman wrote: > >> David Woodhouse writes: >>> The DMA gets blocked, and you don't have to worry about whether the device >>> was >>> shut down cleanly or not. The device may be unhappy, but when the new >>> kernel's >>> driver loads an

Re: In place kexec

2010-07-30 Thread David Woodhouse
On Fri, 30 Jul 2010, Eric W. Biederman wrote: David Woodhouse writes: The DMA gets blocked, and you don't have to worry about whether the device was shut down cleanly or not. The device may be unhappy, but when the new kernel's driver loads and reinitialises it, all should be forgiven. Assum

Re: In place kexec

2010-07-30 Thread Eric W. Biederman
David Woodhouse writes: > On Fri, 30 Jul 2010, Vivek Goyal wrote: > >> So what happens if we tear down the mapping while DMA is on. > > The DMA gets blocked, and you don't have to worry about whether the device was > shut down cleanly or not. The device may be unhappy, but when the new kernel's >

Re: In place kexec

2010-07-30 Thread David Woodhouse
On Fri, 30 Jul 2010, Vivek Goyal wrote: So what happens if we tear down the mapping while DMA is on. The DMA gets blocked, and you don't have to worry about whether the device was shut down cleanly or not. The device may be unhappy, but when the new kernel's driver loads and reinitialises it

Re: In place kexec

2010-07-30 Thread Vivek Goyal
On Fri, Jul 30, 2010 at 07:50:19PM +0100, David Woodhouse wrote: > On Fri, 30 Jul 2010, Vivek Goyal wrote: > > >On Fri, Jul 30, 2010 at 11:21:42AM -0700, Eric W. Biederman wrote: > >>David Woodhouse writes: > >> > >>>On Thu, 2010-07-29 at 21:41 -0700, Eric W. Biederman wrote: > There isn't a

Re: In place kexec

2010-07-30 Thread David Woodhouse
On Fri, 30 Jul 2010, Vivek Goyal wrote: On Fri, Jul 30, 2010 at 11:21:42AM -0700, Eric W. Biederman wrote: David Woodhouse writes: On Thu, 2010-07-29 at 21:41 -0700, Eric W. Biederman wrote: There isn't a bus master shut off at the core level. Effectively, there is if you have an IOMMU.

Re: In place kexec

2010-07-30 Thread Eric W. Biederman
"H. Peter Anvin" writes: > On 07/30/2010 09:30 AM, Eric W. Biederman wrote: >> That said it looks like the code to do the shutdown is in qla2x00_remove_one so it should be too hard if someone cared to extract just the hardware bits. >>> >>> Charming. Code is there, just not hooke

Re: In place kexec

2010-07-30 Thread Vivek Goyal
On Fri, Jul 30, 2010 at 11:21:42AM -0700, Eric W. Biederman wrote: > David Woodhouse writes: > > > On Thu, 2010-07-29 at 21:41 -0700, Eric W. Biederman wrote: > >> There isn't a bus master shut off at the core level. > > > > Effectively, there is if you have an IOMMU. > > Depends on the IOMMU.

Re: In place kexec

2010-07-30 Thread Eric W. Biederman
David Woodhouse writes: > On Thu, 2010-07-29 at 21:41 -0700, Eric W. Biederman wrote: >> There isn't a bus master shut off at the core level. > > Effectively, there is if you have an IOMMU. Depends on the IOMMU. There are several dinky IOMMUs that when you shut them off DMA simply goes around

Re: In place kexec

2010-07-30 Thread David Woodhouse
On Thu, 2010-07-29 at 21:41 -0700, Eric W. Biederman wrote: > There isn't a bus master shut off at the core level. Effectively, there is if you have an IOMMU. -- dwmw2 ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mail

Re: In place kexec

2010-07-30 Thread H. Peter Anvin
On 07/30/2010 09:30 AM, Eric W. Biederman wrote: > >>> That said it looks like the code to do the shutdown is in >>> qla2x00_remove_one so it should be too hard if someone cared to >>> extract just the hardware bits. >> >> Charming. Code is there, just not hooked up. > > Using the .remove method

Re: In place kexec

2010-07-30 Thread Eric W. Biederman
"H. Peter Anvin" writes: > On 07/29/2010 09:41 PM, Eric W. Biederman wrote: >> >> There isn't a bus master shut off at the core level. When we did >> the original analysis it turned out that the bus mastering bit >> was implemented on a lot of devices in advisory way, so it didn't >> make sense