From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796213568; b=0iuIjB6kKDkcQN3l3gihkcmU2oSaP9Tlr/lG1Yx4VxkLWFlSOtqMzoBt3eZrMHFzzHkW qG5izbVZvxOrBPLcSaaIK6FZ/x4gff4nzi5TBGdXNbZ3nsfKImd+n3p0AOpNiZosSXQIn HYuPYt5I/+XMx7fOVZCVtuaeg579fvdioqK3/WvUusFruylMV9MTrpjdX61zWUoP7l6y7 5fTAkPUwofMfz8Myd+VgBh3Hg1fizMRTjU9rBp1leVh6zCt/HWt+m6SiQP+3fg0ZM40Kz +kTCB8otJbQyXu/mw+sY/jZqtG05MQluQTDMgnwL53uV7SFMhTej9i22Iw2V2vNUHLg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796213568; h=DMARC-Filter:Received:Received:DKIM-Signature:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=eT+Gtxol5Ok6SRI2JDIJJPZo/tkZPmg029E7Mpgjmgg=; b=FqOl48leM2NusZcYxVJVnpuTRaofuw04EKoomTF3AEG/M2OR9AZYjFOiiZC1FiHgRIYN 1rGqH+ZUphz3NEFDsyU46m95m7a8hz5+ZsuuXdYCZRLOYte2diZPTE6NP3Wpfe7BPw3IP 2rUhkbR8SZULK6BKxOlPOP3bGKe0lRov3W+z2FhYXFQTldvza28FEXRWfoiMa5dnGzkQp hIgV9n/xKIC2kXkUcXfvH/qCIOZZx3tJdxc1JhG77F3bQliSJFd757bjGy1BhSz2RIynm wdwhGDZSKTEspIt5jCnUhUFBKabsCHkwNqqtwKIAKDkhZ+VuoxndI7mj97jsT+AHGbg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=Zk6beZiN; arc=none smtp.remote-ip=217.140.110.172 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 613A5606A685; Wed, 2 Dec 2026 12:12:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 613A5606A685 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=Zk6beZiN Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D56402F; Wed, 2 Dec 2026 04:12:43 -0800 (PST) Received: from [192.168.1.102] (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E8AA53F86F; Wed, 2 Dec 2026 04:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796213566; bh=pJHWI0S8FmxMtPLvCvwcqefD2onIOGoLpM1jlKR2bYc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Zk6beZiN6RAVDGFnhxdHZl9oouR8gHaCBvhV9JDAy5dbRWUI3vf8w9ZQWBAn8g1xv nHoS9VymrLk8e/dBH8XERtkkKgRO/SClj0dIgeSKlKOmhXYvCioD3TgvfhOQ3Kplju B7ufC9IJa3h+6C2e+Pw3utxOiowC1qmfknEeoT2w= Message-ID: <6a4bf2fd-f9ee-4d41-b9ab-105871f1b732@arm.com> Date: Wed, 2 Dec 2026 12:12:38 +0000 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/4] Fix Shikra q6apm DAI under KVM/EL2 To: Mohit Sharma , Srinivas Kandagatla , Bjorn Andersson , Mark Brown Cc: Ajay Kumar Nandam , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Rob Clark , Will Deacon , Joerg Roedel , Konrad Dybcio , Abel Vesa , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20261202075512.3112173-1-mohit.sharma@oss.qualcomm.com> From: Robin Murphy Content-Language: en-GB In-Reply-To: <20261202075512.3112173-1-mohit.sharma@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026-12-02 7:55 am, Mohit Sharma wrote: > Shikra's q6apm DAI is hosted on the modem DSP. In the hypervisor > configuration its shared memory is assigned directly, but when Linux runs > at EL2 it owns the apps SMMU and the audio stream must be described and > mapped there. Using the normal translating domain causes context faults > because the firmware consumes SID-tagged physical addresses. > > Shikra also retains its reserved-memory carveout as the backing pool for > the audio DMA heap. The EL2 overlay adds an IOMMU description over the > base DTB, so the resulting DAI node contains both memory-region and > iommus. Allow both properties while continuing to require at least one. That sounds like you should have an iommu-addresses property for the reserved-memory region, so it can be treated as a proper identity-mapped reserved region in the IOMMU layer. And if a Linux driver is passing physical addresses for any _other_ memory, instead of proper DMA mappings, that would just be wrong. Thanks, Robin. > Select an identity domain for the Shikra q6apm DAI. Also allow > modem-domain q6apm DAIs carrying an IOMMU specifier to use the DMA/IOMMU > path, while retaining SCM assignment for modem-domain DAIs without an > IOMMU. > > The series is ordered as follows: > > 1. Add the Shikra-specific compatible and allow both memory properties. > 2. Select an identity domain for that compatible. > 3. Add the compatible to the Shikra q6apm DAI node. > 4. Select SCM or IOMMU operation from the presence of an IOMMU stream. > > The Shikra EL2 overlay is expected to provide the q6apm DAI SMMU stream > description. That overlay change is maintained separately from this > series. > > Validated on a Shikra EVK booted under KVM/EL2. The q6apm DAI probes > through the IOMMU path without the previous SCM/IOMMU mutual-exclusion > failure, and playback and capture use the per-stream identity domain. > > Changes in v2: > - Updated the patch subjects to follow the conventions used by the > respective subsystems. > - Replaced the q6apm-dai schema's oneOf requirement with anyOf. The > Shikra EL2/KVM overlay adds iommus to a base node that already contains > memory-region, so the final node legitimately contains both properties. > The schema continues to require at least one of the two memory > descriptions. > - Link to v1: > https://lore.kernel.org/all/20261119164705.1594066-1-mohit.sharma@oss.qualcomm.com/ > > Mohit Sharma (4): > ASoC: dt-bindings: qcom,q6apm-dai: Add Shikra support > iommu/arm-smmu-qcom: Use identity domain for Shikra q6apm DAI > arm64: dts: qcom: shikra: Add q6apm DAI compatible > ASoC: qcom: q6apm-dai: Allow the mDSP IOMMU path > > .../devicetree/bindings/sound/qcom,q6apm-dai.yaml | 8 ++++++-- > arch/arm64/boot/dts/qcom/shikra.dtsi | 3 ++- > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + > sound/soc/qcom/qdsp6/q6apm-dai.c | 9 ++------- > 4 files changed, 11 insertions(+), 10 deletions(-) >