From nobody Wed Nov 5 09:21:57 2025 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 1499633827953105.1128234683398; Sun, 9 Jul 2017 13:57:07 -0700 (PDT) Received: from localhost ([::1]:37452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUJGM-0005f0-QC for importer@patchew.org; Sun, 09 Jul 2017 16:57:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUJCN-0002Hw-Gg for qemu-devel@nongnu.org; Sun, 09 Jul 2017 16:53:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUJCM-000650-Ti for qemu-devel@nongnu.org; Sun, 09 Jul 2017 16:52:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50908) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUJCI-00063c-If; Sun, 09 Jul 2017 16:52:54 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E9DA9C049E32; Sun, 9 Jul 2017 20:52:52 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-31.ams2.redhat.com [10.36.116.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F14717DC6; Sun, 9 Jul 2017 20:52:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E9DA9C049E32 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eric.auger@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E9DA9C049E32 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: Sun, 9 Jul 2017 22:51:31 +0200 Message-Id: <1499633493-19865-7-git-send-email-eric.auger@redhat.com> In-Reply-To: <1499633493-19865-1-git-send-email-eric.auger@redhat.com> References: <1499633493-19865-1-git-send-email-eric.auger@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sun, 09 Jul 2017 20:52: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 v5 6/8] hw/arm/virt: Add tlbi-on-map property to the smmuv3 node 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" For VFIO integration we need to update physical IOMMU mappings each time the guest updates the vIOMMU translation structures. For that, we rely on a special smmuv3 option, "tlbi-on-map" which forces TLB invalidations on map (this mode is similar to the Intel VTD caching Mode). The smmuv3 driver then sends SMMU_CMD_TLBI_NH_VA commands, upon which we will update the physical mappings. Signed-off-by: Eric Auger --- hw/arm/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 3651e41..9b72e8a 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1034,6 +1034,7 @@ static void create_smmu(const VirtMachineState *vms, = qemu_irq *pic) qemu_fdt_setprop_cell(vms->fdt, smmu, "clocks", vms->clock_phandle); qemu_fdt_setprop_string(vms->fdt, smmu, "clock-names", "apb_pclk"); qemu_fdt_setprop(vms->fdt, smmu, "dma-coherent", NULL, 0); + qemu_fdt_setprop(vms->fdt, smmu, "tlbi-on-map", NULL, 0); =20 qemu_fdt_setprop_cell(vms->fdt, smmu, "#iommu-cells", 1); =20 --=20 2.5.5