From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fD8Y7-0006xG-TI for qemu-devel@nongnu.org; Mon, 30 Apr 2018 09:09:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fD8Y3-0002zd-Sv for qemu-devel@nongnu.org; Mon, 30 Apr 2018 09:08:59 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33878 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fD8Y3-0002zQ-N1 for qemu-devel@nongnu.org; Mon, 30 Apr 2018 09:08:55 -0400 References: <20180430122404.10741-1-peter.maydell@linaro.org> From: Paolo Bonzini Message-ID: <6c90618c-ec1b-7a73-5a76-b98fe5df589a@redhat.com> Date: Mon, 30 Apr 2018 15:08:44 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] memory.h: Improve IOMMU related documentation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , "patches@linaro.org" , Alexey Kardashevskiy , Alex Williamson , David Gibson On 30/04/2018 14:57, Peter Maydell wrote: > On 30 April 2018 at 13:54, Paolo Bonzini wrote: >> On 30/04/2018 14:24, Peter Maydell wrote: >>> - /* Set this up to provide customized IOMMU replay function */ >>> + /* Set this up to provide customized IOMMU replay function. >>> + * Optional method. >>> + */ >>> void (*replay)(IOMMUMemoryRegion *iommu, IOMMUNotifier *notifier); >> >> replay is needed if you want to support IOMMU notifiers. After >> memory_region_register_iommu_notifier you're only notified about future >> changes to the mappings; memory_region_iommu_replay calls the replay >> method so that the IOMMUNotifier is called for each existing mapping. > > Is it then unrelated to record-and-replay ? That's what I guessed > it was for... Also, some IOMMUs (eg spapr_iommu.c) seem to support > notifiers but don't implement it. Yes, it's completely unrelated. I have no idea why spapr_iommu.c doesn't need it, so I am CCing the sPAPR and VFIO experts... Paolo