From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn5pD-0005jw-Ll for qemu-devel@nongnu.org; Thu, 22 Sep 2016 11:22:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn5p9-0000af-Ji for qemu-devel@nongnu.org; Thu, 22 Sep 2016 11:22:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn5p9-0000aT-DF for qemu-devel@nongnu.org; Thu, 22 Sep 2016 11:22:07 -0400 References: <147455590865.8519.11191009507297313736.stgit@brijesh-build-machine> <147455593044.8519.61196780736067340.stgit@brijesh-build-machine> From: Paolo Bonzini Message-ID: <3149db02-c0d6-13e5-922a-45094cc237d8@redhat.com> Date: Thu, 22 Sep 2016 17:22:01 +0200 MIME-Version: 1.0 In-Reply-To: <147455593044.8519.61196780736067340.stgit@brijesh-build-machine> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH v2 02/16] exec: add guest RAM read and write ops List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brijesh Singh , ehabkost@redhat.com, crosthwaite.peter@gmail.com, armbru@redhat.com, mst@redhat.com, p.fedin@samsung.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, rth@twiddle.net On 22/09/2016 16:52, Brijesh Singh wrote: > void cpu_physical_memory_write_rom(AddressSpace *as, hwaddr addr, > - const uint8_t *buf, int len) > + uint8_t *buf, int len) The const is correct, please cast it away below. > { > - cpu_physical_memory_write_rom_internal(as, addr, buf, len, WRITE_D= ATA); > + cpu_physical_memory_rw_debug_internal(as, addr, buf, len, > + MEMTXATTRS_UNSPECIFIED, WRITE_DATA); > } > struct MemoryRegionIOMMUOps { > @@ -179,6 +191,7 @@ struct MemoryRegion { > RAMBlock *ram_block; > Object *owner; > const MemoryRegionIOMMUOps *iommu_ops; > + const MemoryRegionRAMReadWriteOps *ram_ops; > =20 > const MemoryRegionOps *ops; > void *opaque; The beginning of MemoryRegion is packed to fit in a cache line, please move this towards the end. Also please change ram_ops to ram_debug_ops. Otherwise looks good. Paolo