From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKfOs-00079p-Eo for qemu-devel@nongnu.org; Mon, 03 Mar 2014 21:48:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKfOh-0000n2-Nb for qemu-devel@nongnu.org; Mon, 03 Mar 2014 21:48:10 -0500 Received: from mail-pd0-x22f.google.com ([2607:f8b0:400e:c02::22f]:35097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKfOh-0000my-Be for qemu-devel@nongnu.org; Mon, 03 Mar 2014 21:47:59 -0500 Received: by mail-pd0-f175.google.com with SMTP id x10so4504006pdj.34 for ; Mon, 03 Mar 2014 18:47:58 -0800 (PST) From: Xuebing Wang Date: Tue, 4 Mar 2014 10:47:21 +0800 Message-Id: <1393901250-3922-2-git-send-email-xbing6@gmail.com> In-Reply-To: <1393901250-3922-1-git-send-email-xbing6@gmail.com> References: <1393901250-3922-1-git-send-email-xbing6@gmail.com> Subject: [Qemu-devel] [Discussion 01/10] docs: add docs/api-hierarchy.txt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, xbing6@gmail.com, afaerber@suse.de, stefanha@redhat.com Signed-off-by: Xuebing Wang --- 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 | + | - ... | + |-------------------------------| + | 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