Subject: Re: [PATCH 1/2] ACPI/IORT: set online numa node for smmuv3 device

From: Lorenzo Pieralisi <[email-masked]>
Date: Thu, 28 Mar 2019 11:32:38 +0000

On Thu, Mar 21, 2019 at 02:08:47PM +0800, Kefeng Wang wrote:
> 
> On 2019/3/20 22:00, Lorenzo Pieralisi wrote:
> > On Wed, Mar 20, 2019 at 11:41:18AM +0000, Robin Murphy wrote:
> >> On 15/03/2019 02:19, Kefeng Wang wrote:
> >>> If there is only node 0 in system, but smmuv3 device is set to offline
> >>> node 1, parsed from proximity domain in SMMUv3 IORT table, it will lead
> >>> to following crash,
> >> Surely that's just a firmware bug? If node 1 doesn't exist in the system
> >> then AFAICS if we're presented with a device claiming to be on that node we
> >> can only assume the whole thing is bogus. Thus if we're going to work around
> >> it at all, it seems to me like we should reject the entire device rather
> >> than just bodging it to some other node.
> 
> Yes, I met this oops with a wrong IORT configuration,
> 
> > I suspect that's the same issue this thread addressed:
> >
> > https://lore.kernel.org/linux-pci/[email-masked]/
> 
> and the situation mentioned above should will trigger this issue too.
> 
> If the node is offline, we can just return from
> arm_smmu_v3_set_proximity(),  any better way to fix this?

Add a return value to the set_promixity() callback and return failure on
hitting the issue above, therefore terminating device creation.

Thanks,
Lorenzo

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel