qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 00/15] Clean up cpu-ldst ld/st memory accessors


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 00/15] Clean up cpu-ldst ld/st memory accessors
Date: Thu, 15 Jan 2015 21:01:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0


On 15/01/2015 20:10, Lluís Vilanova wrote:
> Peter Maydell writes:
> 
>> On 15 January 2015 at 15:32, Lluís Vilanova <address@hidden> wrote:
>>> I haven't reviewed the patches, but that's a much appreciated cleanup! I was
>>> also trying to make sense of all the variants while implementing guest 
>>> memory
>>> access tracing
> 
>> I drew the following terrible ASCII art diagram of the remaining
>> memory access functions...
>> (pastebin link for those without fixed-width mail clients:
>> http://pastebin.ubuntu.com/9757219/ )
> 
>> If anybody feels they can rearrange it into something less
>> confusing do feel free :-)
> 
> Technically, I did not rearrange it :)
> 
>   http://pastebin.ubuntu.com/9757456/
> 
> PS: some info from the original is missing

Removing even more info, ld/st_*_phys is just an optimized version of
address_space_rw/read/write, so we can merge them and get to something
readable...

Paolo


# dot -T pdf -o qemu-mem.pdf qemu-mem.dot
digraph QEMU {
  mr [label="MemoryRegion callbacks"];
  host_mem   [label="ld/st_*_p, memcpy, etc.\n(host memory)"];
  io_mem_mem [label="io_mem_read/write"];
  io_mem     [label="io_read/write*"];
  as_mem     [label="address_space_rw/read/write\nld/st_*_phys"];
  helper_mem [label="helper_ld_*"];
  cpu_phys_mem [label="cpu_physical_memory_rw"];
  cpu_phys_rom [label="cpu_physical_memory_write_rom"];
  dma_mem      [label="dma_memory_rw"];
  cpu_mem      [label="cpu_ld/st_*"];
  tcg          [label="Generated TCG code"];
  cpu_phys_mem_debug [label="cpu_physical_memory_rw_debug"];

  io_mem_mem -> mr;

  io_mem -> io_mem_mem;

  as_mem -> io_mem_mem;
  as_mem -> host_mem;

  helper_mem -> io_mem;
  helper_mem -> host_mem;

  cpu_phys_mem -> as_mem;
  cpu_phys_rom -> host_mem;

  dma_mem -> as_mem;

  cpu_mem -> helper_mem;
  cpu_mem -> host_mem;

  tcg -> helper_mem;
  tcg -> host_mem;

  cpu_phys_mem_debug -> cpu_phys_mem;
  cpu_phys_mem_debug -> cpu_phys_rom;
}




reply via email to

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