From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/2] virtio-pci: fix abort when fail to allocate ioeventfd Date: Wed, 14 Mar 2012 11:22:30 +0200 Message-ID: <4F606356.9080003@redhat.com> References: <20120313103602.8741.71939.stgit@dhcp-8-167.nay.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org To: Amos Kong Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32135 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030704Ab2CNJWl (ORCPT ); Wed, 14 Mar 2012 05:22:41 -0400 In-Reply-To: <20120313103602.8741.71939.stgit@dhcp-8-167.nay.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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