Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

Boris Ostrovsky
2022-03-04T20:19:33Z

On 3/4/22 12:43 PM, Christoph Hellwig wrote:
> On Fri, Mar 04, 2022 at 12:36:17PM -0500, Boris Ostrovsky wrote:
>>>> I bisected it to "x86: remove the IOMMU table infrastructure" but haven't actually looked at the code yet.
>>> That looks like the swiotlb buffer did not get initialized at all, but I
>>> can't really explain why.
>>>
>>> Can you stick in a printk and see if xen_swiotlb_init_early gets called
>>> at all?
>>
>>
>> Actually, that's the only thing I did do so far and yes, it does get called.
> So, specifically for "x86: remove the IOMMU table infrastructure" I
> think we need the one-liner below so that swiotlb_exit doesn't get called
> for the Xen case. But that should have been fixed up by the next
> patch already.

This indeed allows dom0 to boot. Not sure I see where in the next patch this would have been fixed?

(BTW, just noticed in iommu_setup() you set this variable to 1. Should be 'true')

-boris