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

Re: [BUG]SMMU-V3 queue need no-cache memory



Hi Rahul Singh,

在 2022/12/7 18:24, Rahul Singh 写道:
Hi Sisyphean,

On 7 Dec 2022, at 2:04 am, sisyphean <sisyphean@zlw.email> wrote:

Hi,

     I try to run XEN on my ARM board(Sorry, for some commercial reasons, I 
can't tell you
     on which platform I run XEN)  and enable SMMU-V3, but all cmds in cmdq 
failed when XEN started.

     After using the debugger to track debugging, the reason for this problem 
is that
     the queue in the smmu-v3 driver is not no-cache, so after the function 
arm_smmu_cmdq_build_cmd
     is executed, the cmd is still in cache.Therefore, the SMMU-V3 hardware 
cannot obtain the correct cmd
     from the memory for execution.
Yes you are right as of now we are allocating the memory for cmdqueue via 
_xzalloc() which is cached
memory because of that you are observing the issue. We have tested the Xen 
SMMUv3 driver on SOC
where SMMUv3 HW is in the coherency domain, and because of that we have not 
encountered this issue.

I think In your case SMMUv3 HW is not in the coherency domain. Please confirm 
from your side if the
"dma-coherent” property is not set in DT.

I think there is no function available as of now to request Xen to allocate 
memory that is not cached.

@Julien and @Stefano do you have any suggestion on how we can request memory 
from Xen that is not
cached something like dma_alloc_coherent() in Linux.

Regards,
Rahul
I have tried to set "dma-coherent" and not set "dma-coherent" in DT. The results are consistent, and
SMMUv3 HW cannot get the correct cmd from memory



 


Rackspace

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