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

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


  • To: sisyphean <sisyphean@zlw.email>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Wed, 7 Dec 2022 10:24:28 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GJZS1IVI6fv4hWohCsorFnxW7Fbo5KKmpvO2jdUKRuw=; b=T4a9gtmFNpMutlVt5LX7R9GM+Bdj0ngbdi3M+Th+rq1p64EHBmW2BkLOsFEoRZ4CetJbEonxnRuH3EFmj5125etLAexrqEof9tS7jHhiF0E4PRNAS6bdyln/COpD5dXf/KaK06y96SjkXEGrCkHucbFF7Rdc3zH5i9lbyAZVqkGNX62FG7JburV1FQcVjOztginByw94I6jDHcXoFwBEC1qWm+vidbhnj3T9MwWF5OnBtOYnGgsyOWV+349hInTW6i5gdVfn5fjGnBasHoAmkOhQtWcp4J9GS8t/tT/Se/WSkceuoTkJW055MVJBR4CZe+M6+X8Ikm8GWJMGJIVP+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LfJGgGUhUYzsgJ3SonsV2fNtT76KwKdP+/X/dnNMG43oQSgDJ/udRG/nnjxXJbqj+YfRsRSdnsXse54dD4WS43XUJkTxRWqFjuXLJvwl4AG9Z1J1sDHyPcRceGp6azgRmlMO0OOZBpDnfxlo6IrSi+YISEgeA47KUutp2szmfBfpP8a6r7drMBKU57OCSuH58DFzWs/c+01DsnemzN4n1M26vPkCYRG06R4z1vu8sM9W629YUg5VIe5dtew1Ki3SiSHOdvjgSBcKIBNynWqdM7Ee25D4A9/l5KkhoyyFZ4Rb71AdDovmYACWVeP9ekoFxfB5Q2NObJY88vnS8+hyjA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 07 Dec 2022 10:25:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZCfprdLwUdaBZYka2kYynmoAiD65iOCsA
  • Thread-topic: [BUG]SMMU-V3 queue need no-cache memory

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

 


Rackspace

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