[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
- [Qemu-devel] [RFC PATCH v2 00/16] x86: Secure Encrypted Virtualization (AMD), Brijesh Singh, 2016/09/22
- [Qemu-devel] [RFC PATCH v2 01/16] memattrs: add debug attrs, Brijesh Singh, 2016/09/22
- [Qemu-devel] [RFC PATCH v2 02/16] exec: add guest RAM read and write ops, Brijesh Singh, 2016/09/22
- Re: [Qemu-devel] [RFC PATCH v2 02/16] exec: add guest RAM read and write ops,
Paolo Bonzini <=
- [Qemu-devel] [RFC PATCH v2 03/16] exec: add debug version of physical memory read and write apis, Brijesh Singh, 2016/09/22
- [Qemu-devel] [RFC PATCH v2 04/16] monitor: use debug version of memory access apis, Brijesh Singh, 2016/09/22
- [Qemu-devel] [RFC PATCH v2 05/16] core: add new security-policy object, Brijesh Singh, 2016/09/22
- [Qemu-devel] [RFC PATCH v2 06/16] sev: add Secure Encrypted Virtulization (SEV) support, Brijesh Singh, 2016/09/22