From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eih2i-0006bM-6u for qemu-devel@nongnu.org; Mon, 05 Feb 2018 08:42:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eih2d-0007S5-IX for qemu-devel@nongnu.org; Mon, 05 Feb 2018 08:42:44 -0500 From: Eric Auger Date: Mon, 5 Feb 2018 14:39:28 +0100 Message-Id: <1517837972-1904-11-git-send-email-eric.auger@redhat.com> In-Reply-To: <1517837972-1904-1-git-send-email-eric.auger@redhat.com> References: <1517837972-1904-1-git-send-email-eric.auger@redhat.com> Subject: [Qemu-devel] [PATCH v8 10/14] hw/arm/smmuv3: Abort on vfio or vhost case List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: eric.auger.pro@gmail.com, eric.auger@redhat.com, peter.maydell@linaro.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org, prem.mallappa@gmail.com, alex.williamson@redhat.com Cc: tn@semihalf.com, mst@redhat.com, christoffer.dall@linaro.org, bharat.bhushan@nxp.com, jean-philippe.brucker@arm.com, edgar.iglesias@gmail.com, linuc.decode@gmail.com, peterx@redhat.com At the moment, the SMMUv3 does not support notification on TLB invalidation. So let's abort as soon as such notifier gets enabled. Signed-off-by: Eric Auger --- hw/arm/smmuv3.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index da05d47..0753208 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -1044,12 +1044,23 @@ static void smmuv3_class_init(ObjectClass *klass, void *data) dc->realize = smmu_realize; } +static void smmuv3_notify_flag_changed(IOMMUMemoryRegion *iommu, + IOMMUNotifierFlag old, + IOMMUNotifierFlag new) +{ + if (old == IOMMU_NOTIFIER_NONE) { + error_setg(&error_fatal, + "SMMUV3: vhost and vfio notifiers not yet supported"); + } +} + static void smmuv3_iommu_memory_region_class_init(ObjectClass *klass, void *data) { IOMMUMemoryRegionClass *imrc = IOMMU_MEMORY_REGION_CLASS(klass); imrc->translate = smmuv3_translate; + imrc->notify_flag_changed = smmuv3_notify_flag_changed; } static const TypeInfo smmuv3_type_info = { -- 2.5.5