From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUuob-0006gD-DV for qemu-devel@nongnu.org; Thu, 27 Aug 2015 06:53:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUuoX-0002EZ-2r for qemu-devel@nongnu.org; Thu, 27 Aug 2015 06:53:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUuoW-0002ET-Tv for qemu-devel@nongnu.org; Thu, 27 Aug 2015 06:53:49 -0400 Date: Thu, 27 Aug 2015 13:53:45 +0300 From: "Michael S. Tsirkin" Message-ID: <20150827135126-mutt-send-email-mst@redhat.com> References: <1440583448-15797-1-git-send-email-jasowang@redhat.com> <20150826165140.6bab7d28@bahia.local> <55DE970B.6040807@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 1/2] memory: allow zero size for adjust_endianness() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , Jason Wang , QEMU Developers , Greg Kurz On Thu, Aug 27, 2015 at 11:49:32AM +0100, Peter Maydell wrote: > On 27 August 2015 at 05:50, Jason Wang wrote: > > On 08/26/2015 10:51 PM, Greg Kurz wrote: > >> On Wed, 26 Aug 2015 15:21:59 +0100 > >> Peter Maydell wrote: > >>> This seems to me like a bug in the caller. Why would anything > >>> try to call into the memory subsystem to do a zero-size > >>> transaction? > > >> Here's the patch which needs zero-size eventfd: > >> > >> http://patchwork.ozlabs.org/patch/509428/ > > > Yes, this is because we want to use wildcard mmio eventfd (which > > requires size to be zero) to speed up virtio 1.0 mmio. > > But *why* does it require the size to be zero? I still think > the caller should just avoid trying to do zero-size memory > operations: they don't make sense. What is a zero size > operation supposed to mean? > > -- PMM This just mirrors an API we have in kvm: if you pass 0 size when registering an ioeventfd, it will match on access of any size. -- MST