From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evLLU-0000Ma-Uy for qemu-devel@nongnu.org; Mon, 12 Mar 2018 07:10:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evLLT-0004cM-Ui for qemu-devel@nongnu.org; Mon, 12 Mar 2018 07:10:24 -0400 Received: from mail-ot0-x232.google.com ([2607:f8b0:4003:c0f::232]:45263) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1evLLT-0004aU-O9 for qemu-devel@nongnu.org; Mon, 12 Mar 2018 07:10:23 -0400 Received: by mail-ot0-x232.google.com with SMTP id f11so14817922otj.12 for ; Mon, 12 Mar 2018 04:10:23 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <8ecafc78-5ea0-5d83-41d4-0b9b95bcdf21@gmail.com> References: <1518893216-9983-1-git-send-email-eric.auger@redhat.com> <1518893216-9983-11-git-send-email-eric.auger@redhat.com> <8ecafc78-5ea0-5d83-41d4-0b9b95bcdf21@gmail.com> From: Peter Maydell Date: Mon, 12 Mar 2018 11:10:02 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [PATCH v9 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 Cc: Auger Eric , qemu-arm , QEMU Developers , Prem Mallappa , Alex Williamson , Tomasz Nowicki , "Michael S. Tsirkin" , Christoffer Dall , Bharat Bhushan , Jean-Philippe Brucker , "Edgar E. Iglesias" , linuc.decode@gmail.com, Peter Xu On 12 March 2018 at 10:53, Eric Auger wrote: > Hi Peter, > > On 09/03/18 18:59, Peter Maydell wrote: >> On 9 March 2018 at 17:53, Auger Eric wrote: >>> Hi Peter, >>> On 08/03/18 20:06, Peter Maydell wrote: >>>> On 17 February 2018 at 18:46, Eric Auger wrote: >>>>> +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"); >>>>> + } >>>>> +} >>>> >>>> Is this triggerable by the guest, or by the user on the command >>>> line, or only by a bug in the board or other QEMU code? >>> by the user on the command line. >> >> OK. Do they get this error immediately on startup, or only later >> in execution? (If the latter, is it possible to make the error >> happen earlier?) > later in execution. We also have to handle the case where such device is > hot-plugged. At best if could be done on smmu_find_add_as() by checking > the type of attached device but this wouldn't happen much earlier. By > the way we will soon support vhost and we will just rule out vfio > integration by detecting map notifiers. Hmm. error_fatal is a bit unfortunate for a hotplug event -- ideally you would want to cause the hotplug to cleanly fail without aborting the running QEMU session. thanks -- PMM