From nobody Mon Feb 9 23:14:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1502462555386528.0594235227134; Fri, 11 Aug 2017 07:42:35 -0700 (PDT) Received: from localhost ([::1]:45101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgB8z-0007yA-L6 for importer@patchew.org; Fri, 11 Aug 2017 10:42:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgAsz-00021E-Cm for qemu-devel@nongnu.org; Fri, 11 Aug 2017 10:26:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgAsy-0003Mq-Ah for qemu-devel@nongnu.org; Fri, 11 Aug 2017 10:26:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35050) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dgAss-0003G8-Bj; Fri, 11 Aug 2017 10:25:54 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F194E6B34A; Fri, 11 Aug 2017 14:25:52 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-162.ams2.redhat.com [10.36.116.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1AC3AA21A6; Fri, 11 Aug 2017 14:25:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F194E6B34A Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eric.auger@redhat.com From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, peter.maydell@linaro.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org, alex.williamson@redhat.com, prem.mallappa@gmail.com Date: Fri, 11 Aug 2017 16:22:34 +0200 Message-Id: <1502461354-11327-10-git-send-email-eric.auger@redhat.com> In-Reply-To: <1502461354-11327-1-git-send-email-eric.auger@redhat.com> References: <1502461354-11327-1-git-send-email-eric.auger@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 11 Aug 2017 14:25:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC v6 9/9] hw/arm/virt-acpi-build: Use the ACPI_IORT_SMMU_V3_CACHING_MODE model X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mohun106@gmail.com, drjones@redhat.com, tcain@qti.qualcomm.com, Radha.Chintakuntla@cavium.com, Sunil.Goutham@cavium.com, mst@redhat.com, jean-philippe.brucker@arm.com, tn@semihalf.com, will.deacon@arm.com, robin.murphy@arm.com, peterx@redhat.com, edgar.iglesias@gmail.com, bharat.bhushan@nxp.com, christoffer.dall@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" To allow VFIO use case, let's set the smmu model to ACPI_IORT_SMMU_V3_CACHING_MODE. An important notice is this model is not standardized in the ACPI IORT as this work is a proof of concept. We also set the COHACC override flag which seems to be mandated. Signed-off-by: Eric Auger --- hw/arm/virt-acpi-build.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index ac2cd3e..9103117 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -437,6 +437,7 @@ build_iort(GArray *table_data, BIOSLinker *linker, Virt= MachineState *vms) =20 smmu->type =3D ACPI_IORT_NODE_SMMU_V3; smmu->length =3D cpu_to_le16(node_size); + smmu->model =3D 0x3; /* ACPI_IORT_SMMU_V3_CACHING_MODE */ smmu->mapping_count =3D cpu_to_le32(1); smmu->mapping_offset =3D cpu_to_le32(sizeof(*smmu)); smmu->base_address =3D cpu_to_le64(vms->memmap[VIRT_SMMU].base); @@ -444,6 +445,7 @@ build_iort(GArray *table_data, BIOSLinker *linker, Virt= MachineState *vms) smmu->pri_gsiv =3D cpu_to_le32(irq + 1); smmu->gerr_gsiv =3D cpu_to_le32(irq + 2); smmu->sync_gsiv =3D cpu_to_le32(irq + 3); + smmu->flags =3D 0x1; /* COHACC Override */ =20 /* Identity RID mapping covering the whole input RID range */ idmap =3D &smmu->id_mapping_array[0]; --=20 2.5.5