From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQNQS-0008CN-6i for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:53:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQNQN-0007cP-Pi for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:53:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQNQN-0007bw-If for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:53:51 -0500 Message-ID: <1424814826.12626.97.camel@redhat.com> From: Alex Williamson Date: Tue, 24 Feb 2015 14:53:46 -0700 In-Reply-To: <54ECEFBD.8000200@redhat.com> References: <1424810331-25657-1-git-send-email-samuel.pitoiset@gmail.com> <54ECEFBD.8000200@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vfio: allow to disable MMAP per device with -x-mmap=off option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, Samuel Pitoiset On Tue, 2015-02-24 at 14:40 -0700, Eric Blake wrote: > On 02/24/2015 01:38 PM, Samuel Pitoiset wrote: > > Disabling MMAP support uses the slower read/write accesses but allows to > > trace all MMIO accesses, which is not good for performance, but very > > useful for reverse engineering PCI drivers. This option allows to > > disable MMAP per device without a compile-time change. > > > > Signed-off-by: Samuel Pitoiset > > --- > > hw/vfio/common.c | 2 +- > > hw/vfio/pci.c | 1 + > > include/hw/vfio/vfio-common.h | 2 +- > > 3 files changed, 3 insertions(+), 2 deletions(-) > > > +++ b/hw/vfio/pci.c > > @@ -3456,6 +3456,7 @@ static Property vfio_pci_dev_properties[] = { > > DEFINE_PROP_BIT("x-vga", VFIOPCIDevice, features, > > VFIO_FEATURE_ENABLE_VGA_BIT, false), > > DEFINE_PROP_INT32("bootindex", VFIOPCIDevice, bootindex, -1), > > + DEFINE_PROP_BOOL("x-mmap", VFIOPCIDevice, vbasedev.allow_mmap, true), > > Naming it 'x-mmap' implies it is experimental and may be removed > someday. Is there any reason why you are not proposing it as a > permanent knob? I actually suggested the x- prefix to Samuel because I don't think this is a mode that we want to officially support. It's useful for enabling tracing, but it's possible that doing this will break timing sensitive devices. I therefore don't really want to put it at the fingertips of the average user. If we have a reason to call it supported at some point later, we can always change it. Thanks, Alex