qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v2 02/16] exec: add guest RAM read and write


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC PATCH v2 02/16] exec: add guest RAM read and write ops
Date: Thu, 22 Sep 2016 17:22:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


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_DATA);
> +    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;
>  
>      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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]