Re: [patch 1/2] Intel IOMMU Suspend/Resume Support for DMAR

From: Ingo Molnar
Date: Thu Mar 26 2009 - 05:59:28 EST



* David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:

> On Wed, 2009-03-25 at 21:12 +0100, Ingo Molnar wrote:
> >
> > > +static int iommu_resume(struct sys_device *dev)
> > > +{
> > > + struct dmar_drhd_unit *drhd;
> > > + struct intel_iommu *iommu;
> > > + unsigned long flag;
> > > + int i = 0;
> > > +
> > > + if (init_iommu_hw())
> > > + panic("IOMMU setup failed, DMAR can not start!\n");
> >
> > Please dont panic boxes ... insert a WARN() and return.
>
> Well, the box is going to die anyway. If it was using the IOMMU
> before suspend, and you fail to re-initialise the IOMMU after
> resume, then you're buggered.

except if one is testing suspend/resume (via pm-test) without
actually suspending the hardware.

> But if you panic() immediately during the resume, the message is
> unlikely to make it out even to a serial console. If you print a
> warning and limp on, I suppose there's at least a _chance_ that it
> might get seen.

yeah.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/