@@ -24,9 +24,20 @@ Source Tree Structure
24
24
25
25
Understanding the ACRN hypervisor and the ACRN device model source tree
26
26
structure is helpful for locating the code associated with a particular
27
- hypervisor and device emulation feature. The ACRN hypervisor and the
28
- ACRN device model source tree provides the following top-level
29
- directories:
27
+ hypervisor and device emulation feature.
28
+
29
+ The ACRN source code (and documentation) are maintained in the
30
+ https://github.com/projectacrn/acrn-hypervisor repo, with the
31
+ hypervisor, device model, tools, and documentation in their own
32
+ folders::
33
+
34
+ acrn-hypervisor
35
+ ├─ hypervisor
36
+ ├─ devicemodel
37
+ ├─ tools
38
+ └─ doc
39
+
40
+ Here's a brief description of each of these source tree folders:
30
41
31
42
ACRN hypervisor source tree
32
43
===========================
@@ -68,9 +79,6 @@ ACRN Device Model source tree
68
79
**hw/ **
69
80
Hardware emulation code, with the following subdirectories:
70
81
71
- **acpi/ **
72
- ACPI table generator.
73
-
74
82
**pci/ **
75
83
PCI devices, including VBS-Us (Virtio backend drivers in user-space).
76
84
@@ -82,7 +90,24 @@ ACRN Device Model source tree
82
90
files are used to generate the :ref: `acrn_apis ` documentation)
83
91
84
92
**samples/ **
85
- include files for all public APIs (doxygen comments in these source
93
+ scripts (included in the Clear Linux build) for setting up the network
94
+ and launching the User OS on the platform.
95
+
96
+ ACRN Tools source tree
97
+ =============================
98
+
99
+ The tools folder holds source code for ACRN-provided tools such as:
100
+
101
+ acrnlog
102
+ a userland tool to capture the log output from the currently running
103
+ hypervisor, and from the last previous run if the hypervisor crashed.
104
+
105
+ acrnctl
106
+ a utility to create, delete, list, launch, and stop a User OS (UOS).
107
+
108
+ acrntrace
109
+ a Service OS (SOS) utility to capture trace data and scripts to
110
+ analyze the collected data.
86
111
87
112
ACRN documentation source tree
88
113
==============================
@@ -95,10 +120,6 @@ reading now.) Developers can view this content either in its raw form as
95
120
the HTML content and view it with a web browser directly on your
96
121
workstation, useful if you're contributing documentation to the project.
97
122
98
- **_templates/ **
99
- Sphinx configuration updates for the standard read-the-docs templates
100
- used to format the generated HTML output
101
-
102
123
**api/ **
103
124
ReST files for API document generation
104
125
@@ -129,6 +150,10 @@ workstation, useful if you're contributing documentation to the project.
129
150
Sphinx folder for extras added to the generated output (such as custom
130
151
CSS additions)
131
152
153
+ **_templates/ **
154
+ Sphinx configuration updates for the standard read-the-docs templates
155
+ used to format the generated HTML output
156
+
132
157
CPU virtualization
133
158
******************
134
159
912
937
913
938
screen /dev/pts/0
914
939
915
- UEFI Boot
916
- *********
917
- This section introduces UEFI boot support by ACRN.
918
940
919
- Usage of acrn.efi
920
- =================
941
+ Device Manager memory allocation mechanism
942
+ ******************************************
921
943
922
- ACRN supports boot from UEFI FW, this section is the UEFI boot HOWTO under
923
- Clear Linux environment.
944
+ There are two Device Manager memory allocation mechanisms available:
924
945
925
- The pre-condition is like below:
926
- - You have installed the Service OS (bare-metal for now)
927
- - CL Bootloader is "\E FI\o rg.clearlinux\b ootloaderx64.efi"
928
- - Boot device is '/dev/sda'
929
- - EFI System Partition (ESP) is '1'
946
+ - Contiguous Memory Allocator (CMA), and
947
+ - Huge Page Tables (HugeTLB). HugeTLB is the default.
930
948
931
- Suggest to follow the following step:
932
- 1. Build out the acrn.efi image with command "make PLATFORM=uefi".
933
- 2. Put the acrn.efi under "\E FI\a crn\"
934
- 3. To change the default boot entry to boot the ACRN hypervisor, enter:
935
- # efibootmgr -c -l "\E FI\a crn\a crn.efi" -d /dev/sda -p 1 \
936
- -L "ACRN Hypervisor" -u "bootloader=\E FI\o rg.clearlinux\b ootloaderx64.efi"
937
- 4. Update the bsp/uefi/clearlinux/acrn.conf file by filling the field
938
- <UUID of rootfs partition> with the your native rootfs partition uuid.
939
- 5. Copy bsp/uefi/clearlinux/acrn.conf to loader\\ entries\\ directory.
940
- 6. Reboot.
949
+ To choose CMA, do the following:
941
950
951
+ 1) Add ``cma=reserved_mem_size@recommend_memory_offset-0 ``, (for example
952
+ ``cma=2560M@0x100000000-0 ``) to the SOS cmdline in ``acrn.conf ``
942
953
943
- DM memory allocation mechanism
944
- ==============================
954
+ 2) Start ``acrn-dm `` *without * the ``-T `` option
955
+
956
+ To support HugeTLB, do the following:
957
+
958
+ 1) Do huge page reservation
959
+
960
+ - For 1G huge page reservation, add ``hugepagesz=1G hugepages=reserved_pg_num ``
961
+ (for example, ``hugepagesz=1G hugepages=4 ``) to the SOS cmdline in
962
+ ``acrn.conf `` (for EFI)
963
+
964
+ - For 2M huge page reservation, after the SOS starts up, run the
965
+ command::
966
+
967
+ echo reserved_pg_num > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
968
+
969
+ .. note ::
970
+ You can use 2M reserving method to do reservation for 1G page size, but it
971
+ may fail. For an EFI platform, you may skip 1G page reservation
972
+ by using a 2M page, but make sure your huge page reservation size is
973
+ large enough for your usage.
945
974
946
- There are two kinds of DM memory allocation mechanism - CMA & Hugetlb, they can
947
- be choose to support but hugetlb will become the default one.
948
-
949
- To support CMA, please make sure:
950
- 1) add "cma=reserved_mem_size@recommend_memory_offset-0" like
951
- "cma=2560M@0x100000000-0" to the SOS cmdline in acrn.conf
952
- 2) start acrn-dm without "-T" option
953
-
954
- To support Hugetlb, please make sure:
955
- 1) Do huge page reservation
956
- - For 1G huge page reservation, add "hugepagesz=1G hugepages=reserved_pg_num"
957
- like "hugepagesz=1G hugepages=4" to the SOS cmdline(in acrn.conf for EFI)
958
- - For 2M huge page reservation, after SOS start up,
959
- echo reserved_pg_num > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
960
- - NOTE:
961
- You can use 2M reserving method to do reservation for 1G page size, but it
962
- may fail.
963
- For EFI platform, you may skip 1G page reservation by just using 2M page,
964
- but make sure your huge page reservation size is enough for your usage.
965
- 2) Let acrn-dm use hugetlb
966
- - start acrn-dm with "-T" option
975
+ 2) Start ``acrn-dm `` *with * the ``-T `` option.
0 commit comments