[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 09/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending



On May 04, 2016 4:43 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
> >>> On 04.05.16 at 04:14, <quan.xu@xxxxxxxxx> wrote:
> > On May 04, 2016 10:00 AM, Tian, Kevin <kevin.tian@xxxxxxxxx> wrote:
> >> > From: Xu, Quan
> >> > Sent: Friday, April 29, 2016 5:25 PM diff --git
> >> > a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c index
> >> > 2885e31..9097333 100644
> >> > --- a/xen/arch/x86/acpi/power.c
> >> > +++ b/xen/arch/x86/acpi/power.c
> >> > @@ -45,6 +45,8 @@ void do_suspend_lowlevel(void);
> >> >
> >> >  static int device_power_down(void)  {
> >> > +    int err;
> >> > +
> >> >      console_suspend();
> >> >
> >> >      time_suspend();
> >> > @@ -53,11 +55,22 @@ static int device_power_down(void)
> >> >
> >> >      ioapic_suspend();
> >> >
> >> > -    iommu_suspend();
> >> > +    err = iommu_suspend();
> >> > +
> >> > +    if ( err )
> >> > +        goto iommu_suspend_error;
> >> >
> >> >      lapic_suspend();
> >> >
> >> >      return 0;
> >> > +
> >> > + iommu_suspend_error:
> >> > +    ioapic_resume();
> >> > +    i8259A_resume();
> >> > +    time_resume();
> >> > +    console_resume();
> >> > +
> >> > +    return err;
> >> >  }
> >>
> >> Jan had comment to better reuse device_power_up... looks no change in
> >> this version.
> >
> > Yes,  __iiuc__, this may be an optimization, but not a must.
> > We can discuss this in detail In this version.
> 
> As an optimization it would indeed be quite pointless here. My request was
> more for maintainability: By re-using the function future changes don't need
> to go to two places, and hence there's no risk of one of them getting
> forgotten.
> 

Got it, I will fix it in next v4.

Quan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.