From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH 8/9] coalesce mmio regions with an explicit call Date: Tue, 23 Sep 2008 13:22:33 -0300 Message-ID: <20080923162233.GD3583@poweredge.glommer> References: <1221840506-22996-1-git-send-email-glommer@redhat.com> <1221840506-22996-9-git-send-email-glommer@redhat.com> <48D54370.7090709@redhat.com> <20080922135645.GF3618@poweredge.glommer> <48D89AEC.5090102@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, aliguori@us.ibm.com To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:37240 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751796AbYIWQ2T (ORCPT ); Tue, 23 Sep 2008 12:28:19 -0400 Content-Disposition: inline In-Reply-To: <48D89AEC.5090102@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Sep 23, 2008 at 10:29:48AM +0300, Avi Kivity wrote: > Glauber Costa wrote: >> On Sat, Sep 20, 2008 at 11:39:44AM -0700, Avi Kivity wrote: >> >>> Glauber Costa wrote: >>> >>>> Remove explicit calls to mmio coalescing. Rather, >>>> include it in the registration functions. >>>> >>>> index 5ae3960..2d97b34 100644 >>>> --- a/qemu/hw/e1000.c >>>> +++ b/qemu/hw/e1000.c >>>> @@ -942,18 +942,6 @@ e1000_mmio_map(PCIDevice *pci_dev, int region_num, >>>> d->mmio_base = addr; >>>> cpu_register_physical_memory(addr, PNPMMIO_SIZE, d->mmio_index); >>>> - >>>> - if (kvm_enabled()) { >>>> - int i; >>>> - uint32_t excluded_regs[] = { >>>> - E1000_MDIC, E1000_ICR, E1000_ICS, E1000_IMS, >>>> - E1000_IMC, E1000_TCTL, E1000_TDT, PNPMMIO_SIZE >>>> - }; >>>> - qemu_kvm_register_coalesced_mmio(addr, excluded_regs[0]); >>>> - for (i = 0; excluded_regs[i] != PNPMMIO_SIZE; i++) >>>> - qemu_kvm_register_coalesced_mmio(addr + excluded_regs[i] + 4, >>>> - excluded_regs[i + 1] - excluded_regs[i] - 4); >>>> - } >>>> } >>>> >>> Where did all of this go? >>> >> >> All the region is coalesced (not just the pieces) automatically during memory registration. >> Or not at all, in case coalescing is disabled. >> > > You can't coalesce the registers which trigger device action. You'll > destroy latency and/or functionality. which kills the goal of getting rid of explicit kvm code. So maybe the solution here is to add calls in qemu to a memory coalescing function that in the raw qemu / kqemu case just don't do anything? Anthony, do you have an opinion about it ?