Signed-off-by: Xuebing Wang <xbi...@gmail.com> --- docs/api-hierarchy.txt | 93 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/api-hierarchy.txt
diff --git a/docs/api-hierarchy.txt b/docs/api-hierarchy.txt new file mode 100644 index 0000000..9982f51 --- /dev/null +++ b/docs/api-hierarchy.txt @@ -0,0 +1,93 @@ +API hierarchy +============= + +1) QEMU common API + + |-------------------------------| + | C99 API | + | - <stdio.h> <stdlib.h> ... | + |-------------------------------| + | QEMU basic API | + | - include/qemu/* | + |-------------------------------| + | QEMU utility/helper API | + | - block | + | - disas | + | - migration | + | - monitor | + | - net | + | - qapi | + | - ... | + |-------------------------------| + +2) CPUArchState API + + |-----------------------------------------------------------------------| + | qom/Object | QEMU common API | + |--------------| - Linux API | + | - QEMU basic API | + | - QEMU utility/helper API | + |-----------------------------------------------------------------------| + | qdev/DeviceState | + |-----------------------------------------------------------------------| + | Create new file? | sysemu/kvm.h | hw/xen/xen.h | + | exec/cpu-exec.h? | | | + |------------------------------------------------| + | TODO: consider to abstract vcpu here? | + | include/qom/vcpu.h? | + |-----------------------------------------------------------------------| + | qom/CPUState | + |-----------------------------------------------------------------------| + | target-xxx/CPUArchState | sysemu/sysemu.h | + |-----------------------------------------------------------------------| + + cpu-exec.h is for one (tcg) of the 3 accelerators: tcg, kvm and xen. + +3) Memory API + + |--------------------------------------------------------------| + | linux-user | softmmu | + | gueust virtual address | guest physical address | + | | guest virtual address | + | | | + | | --------------------------------| + | | | Memory modelling | + | | | | + | | | MemoryRegion | RAMBlock | + | | | memory.h | | + | | --------------------------------| + | | | softmmu API | + | | | - include/exec/softmmu*.h | + | | | - include/exec/cputlb.h | + |--------------------------------------------------------------| + | memory load/store API | + | include/exec/cpu-common.h | + |--------------------------------------------------------------| + +4) exec API + + architecture-independent | architecture + | specific + |------------------| | + | memory | | + | load/store API | | + | cpu-common.h | | + |-----------------------------------------------------|---------------| + | tcg framework | tcg frontend | + | tcg/tcg*.h | | + |------------------|---------------|---------------| + | TranslationBlock | | + | translate.h | | + |-------------------------------------|---------------|---------------| + | | misc cpu API | misc cpu API | + | include/exec/exec-all.h | cpu-common.h | cpu-all.h | + |-------------------------------------|---------------|---------------| + + include/exec includes: + - Memory API + - TranslationBlock API + - misc cpu API (both architecture-independent and architecture-specific) + + include/exec/cpu-all.h is for architecture-specific, it's only included + in target-xxx/* files. + -- 1.7.9.5