From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4Ah0-00028z-9o for qemu-devel@nongnu.org; Wed, 22 Aug 2012 09:09:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4Agq-0003zl-MO for qemu-devel@nongnu.org; Wed, 22 Aug 2012 09:09:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4Agq-0003zc-E0 for qemu-devel@nongnu.org; Wed, 22 Aug 2012 09:09:44 -0400 Message-ID: <5034DA0F.1070609@redhat.com> Date: Wed, 22 Aug 2012 16:09:35 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1345611560-8290-1-git-send-email-david@gibson.dropbear.id.au> <48B2B165-8770-4BD9-9D9A-2D089A9A9208@suse.de> <20120822055725.GZ29724@truffula.fritz.box> <5034807C.8010004@web.de> <503484D0.6090100@web.de> <20120822113824.GA15822@truffula.fritz.box> <6BD8D076-FCD4-48B4-969A-CB6E3E27D280@suse.de> In-Reply-To: <6BD8D076-FCD4-48B4-969A-CB6E3E27D280@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: aliguori@us.ibm.com, Jan Kiszka , qemu-devel@nongnu.org, David Gibson On 08/22/2012 02:47 PM, Alexander Graf wrote: >> >> Ok, so IIUC, that means we do need the cpu_physical_memory_write_rom() >> version for load_image_targphys(), and so my original patch is >> basically the right fix. > > Sure it is, I don't think anyone argued about that :). But it's duplicating code in a slow path. So my proposal was instead of doing the write manually in the "this is read-write RAM" case, just fall back to the known-to-work cpu_physical_memory_rw for those pages. That would make the rom function smaller, more obvious and duplicate less code. I think there were patches (from Xen) extracting that snippet into a helper. -- error compiling committee.c: too many arguments to function