On May 09, 2016 4:24 PM, Jan Beulich <jbeul...@suse.com> wrote:
> >>> On 09.05.16 at 09:55, <quan...@intel.com> wrote:
> > On May 06, 2016 10:24 PM, Jan Beulich <jbeul...@suse.com> wrote:
> >> On x86, iommu_get_ops() BUG()s when running on non-Intel, non-AMD
> >> hardware. While, with our current code, that's a correct prerequisite
> >> assumption for IOMMU presence, this is wrong on systems without
> IOMMU.
> >> Hence iommu_enabled (and alike) checks should be done prior to
> >> calling that function, not after.
> >>
> >> Also move iommu_suspend() next to iommu_resume() - it escapes me why
> >> iommu_do_domctl() had got put between the two.
> >>
> >> Signed-off-by: Jan Beulich <jbeul...@suse.com>
> >>
> >>  void iommu_crash_shutdown(void)
> >>  {
> >> -    const struct iommu_ops *ops = iommu_get_ops();
> >>      if ( iommu_enabled )
> >> -        ops->crash_shutdown();
> >> +        iommu_get_ops()->crash_shutdown();
> >>      iommu_enabled = iommu_intremap = iommu_intpost = 0;
> >
> > btw, is this line still a code style issue?
> 
> Which one - the changed one or the context one? In the latter case, even if
> there were a coding style issue (which I don't see) correcting it wouldn't
> belong here.
> 
The context one -- "iommu_enabled = iommu_intremap = iommu_intpost = 0;"

Quan

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

Reply via email to