From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7kPt-0001NN-TI for qemu-devel@nongnu.org; Wed, 14 Mar 2012 05:22:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7kPn-00061m-Mh for qemu-devel@nongnu.org; Wed, 14 Mar 2012 05:22:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7kPn-00061S-Ez for qemu-devel@nongnu.org; Wed, 14 Mar 2012 05:22:39 -0400 Message-ID: <4F606356.9080003@redhat.com> Date: Wed, 14 Mar 2012 11:22:30 +0200 From: Avi Kivity MIME-Version: 1.0 References: <20120313103602.8741.71939.stgit@dhcp-8-167.nay.redhat.com> In-Reply-To: <20120313103602.8741.71939.stgit@dhcp-8-167.nay.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] virtio-pci: fix abort when fail to allocate ioeventfd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: aliguori@us.ibm.com, mtosatti@redhat.com, stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org, qemu-devel@nongnu.org On 03/13/2012 12:42 PM, Amos Kong wrote: > Boot up guest with 232 virtio-blk disk, qemu will abort for fail to > allocate ioeventfd. This patchset changes kvm_has_many_ioeventfds(), > and check if available ioeventfd exists. If not, virtio-pci will > fallback to userspace, and don't use ioeventfd for io notification. How about an alternative way of solving this, within the memory core: trap those writes in qemu and write to the ioeventfd yourself. This way ioeventfds work even without kvm: core: create eventfd core: install handler for memory address that writes to ioeventfd kvm (optional): install kernel handler for ioeventfd even if the third step fails, the ioeventfd still works, it's just slower. -- error compiling committee.c: too many arguments to function