-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tuned arguments of QEMU to fit for acrn-unit-test #8
Open
ysun
wants to merge
22
commits into
projectacrn:master
Choose a base branch
from
ysun:pull_req
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We do know what kind of guest we want to build. So add the files generated during running cmd configure. Then we could just do make to build unit-test. Signed-off-by: Yin Fengwei <[email protected]>
We don't have fwcfg to pass info from DM to guest. So we hardcode the guest cpu number. And 1 is used because the SMP support in unit-test is blocked by one issue in ACRN. Signed-off-by: Yin Fengwei <[email protected]>
The test guest needs DM to prepare the mem_* in multiboot info. So we should set the flag in multiboot header to request DM to prepare these info. Signed-off-by: Yin Fengwei <[email protected]>
Signed-off-by: Jason Chen CJ <[email protected]>
Current unit-test cases are guest based. Move them to guest directory.
Signed-off-by: Yin Fengwei <[email protected]>
So we could test the smp related operations. Signed-off-by: Yin Fengwei <[email protected]>
There is no guarantee on the exact values in the selectors of data segments, including DS, ES, FS, GS and SS, at the time an OS is invoked, according to Section 3.2, Multiboot Specification 0.6.96. Not re-initializing the selectors can lead to segmentation faults the first time a reload of segment base address is needed. Signed-off-by: Junjie Mao <[email protected]>
The initialization of .bss is available only when the test is loaded by an ELF loader, which is not the case when it is started directly by a multiboot-compliant bootloader. This patch explicitly clears .bss, except the stack which is already in use when initializing .bss. Signed-off-by: Junjie Mao <[email protected]>
fix bug because of cstart.S not init esp. Signed-off-by: Huihuang Shi <[email protected]>
setting esp to init stack
initialize ds/es/fs/gs/ss in cstart.S
Raw binaries can be used as a multiboot module passed to ACRN hypervisor by the physical bootloader. This allows the hypervisor to load a unit test without additional logic for loading ELF files. v1 -> v2: * Do not rely on the code starting at exact 4M. Instead prepending zeros at the beginning of the image to locate the code right at the position decided at link-time. Due to the impreciseness of stext, the starting address of .text section is used as the beginning of the image. Signed-off-by: Junjie Mao <[email protected]>
When stitching multiple tests into a single executable, names of the test files will be used in function identifiers which cannot contain any dash. Signed-off-by: Junjie Mao <[email protected]>
Having each test as a separate binary can easily lead to the explosion of file numbers, considering the number of cases that will be written for thorough testing. This also leads to difficulties for running multiple tests in a partition-mode configuration where guest binaries are always loaded by the physical bootloader. This patch introduces a 2-phase link approach to allow the tests to be linked in either one-per-test or all-in-one. The trick behind the scene is that sources of each test are first compiled and linked before the following object-level modifications are conducted. 1. All symbols are converted local, except the function main(). 2. The symbol main() is duplicated to main_<test>() which has global linkage. 3. The symbol main() is converted weak global. The edited object files are named following the convention <test>_prelink.o. Each of them can be compiled with the other libraries to generate an executable ELF, as is done previously, or linked together to generate one stitched executable that contains all tests indexed by the generated case_table.c. Signed-off-by: Junjie Mao <[email protected]>
Compilers like gcc may place information like compiler versions, build IDs, etc. into dedicate sections called .comment or .note. These sections may be placed even before the entry point if the linker script does not specify how these sections shall be handled. This can be problematic as it is assumed that the beginning of the image is a 12-byte multiboot header, followed by the entry point of the image. It has also been met that ignoring these sections in the linker script leads to a very small bss_start (mostly <1K), which leads the test program to crash when it tries to initialize its .bss section. Discard these sections as these sections contain compiler/linker-specific information which is mostyl useless at runtime. Signed-off-by: Junjie Mao <[email protected]>
fix AP load tss error upon AP receiving second IPI&SIPI message
Enable loading stitched tests in partition mode
Added memory size (1G) and smp supported (4 cores). Specified the CPU model and some flags, which is supported by ACRN. Refined Makefile to run unit-test by command 'unit': 'make unit file=xxx' 'xxx' stands for case name, no extension followed. Signed-off-by: Yi Sun <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added memory size (1G) and smp supported (4 cores).
Specified the CPU model and some flags, which is supported by ACRN.
Refined Makefile to run unit-test by command 'unit':
'make unit file=xxx'
'xxx' stands for case name, no extension followed.
Signed-off-by: Yi Sun [email protected]