From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RR34u-0007Ei-32 for qemu-devel@nongnu.org; Thu, 17 Nov 2011 09:36:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RR34n-000459-R9 for qemu-devel@nongnu.org; Thu, 17 Nov 2011 09:36:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RR34n-00044x-Dz for qemu-devel@nongnu.org; Thu, 17 Nov 2011 09:36:29 -0500 Message-ID: <4EC51BE1.4050002@redhat.com> Date: Thu, 17 Nov 2011 16:36:17 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1321242993-28070-1-git-send-email-zanghongyong@huawei.com> In-Reply-To: <1321242993-28070-1-git-send-email-zanghongyong@huawei.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ivshmem: use PIO for BAR0(Doorbell) instead of MMIO to reduce notification time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zanghongyong@huawei.com Cc: wusongwei@huawei.com, kvm@vger.kernel.org, hanweidong@huawei.com, qemu-devel@nongnu.org, wuchangyi@huawei.com, xiaowei.yang@huawei.com, james.chenjiabo@huawei.com, louzhengwei@huawei.com, cam@cs.ualberta.ca On 11/14/2011 05:56 AM, zanghongyong@huawei.com wrote: > From: Hongyong Zang > > Ivshmem(nahanni) is a mechanism for sharing host memory with VMs running on the same host. Currently, guest notifies qemu by reading or writing ivshmem device's PCI MMIO BAR0(Doorbell). > > This patch, changes this PCI MMIO BAR0(Doorbell) to PIO. And we find guest accesses PIO BAR 30% faster than MMIO BAR. > > CharDriverState **eventfd_chr; > CharDriverState *server_chr; > - MemoryRegion ivshmem_mmio; > + MemoryRegion ivshmem_pio; > > - pcibus_t mmio_addr; > + pcibus_t pio_addr; This is a backwards incompatible change. The way to accomplish this is to add a new BAR which aliases the old one. The new BAR should not be visible on guests created with -M pc-1.0 and below. Please also update the spec so that driver authors can make use of the new feature. -- error compiling committee.c: too many arguments to function