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

Re: [Xen-devel] [PATCH] IOMMU: don't BUG() on exotic hardware


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: "Xu, Quan" <quan.xu@xxxxxxxxx>
  • Date: Mon, 9 May 2016 08:29:20 +0000
  • Accept-language: en-US
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>
  • Delivery-date: Mon, 09 May 2016 08:29:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQHRp6PFy+gx3JMxg0manqQSdrf2Jp+wOf0g//+I6YCAAIavwA==
  • Thread-topic: [Xen-devel] [PATCH] IOMMU: don't BUG() on exotic hardware

On May 09, 2016 4:24 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
> >>> On 09.05.16 at 09:55, <quan.xu@xxxxxxxxx> wrote:
> > On May 06, 2016 10:24 PM, Jan Beulich <JBeulich@xxxxxxxx> 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 <jbeulich@xxxxxxxx>
> >>
> >>  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@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®.