Skip to content
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
wants to merge 22 commits into
base: master
Choose a base branch
from

Commits on Oct 30, 2018

  1. unit-test: avoid invoke configure

    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]>
    fyin1 committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    3688542 View commit details
    Browse the repository at this point in the history
  2. unit-test: workaround the SMP issue.

    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]>
    fyin1 committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    79eb582 View commit details
    Browse the repository at this point in the history
  3. unit-test: update the mutliboot header

    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]>
    fyin1 committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    3da5b99 View commit details
    Browse the repository at this point in the history
  4. apic: test modification

    Signed-off-by: Jason Chen CJ <[email protected]>
    JasonChenCJ authored and fyin1 committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    c729bdd View commit details
    Browse the repository at this point in the history
  5. acrn-unit-test: move the test to guest directory.

    Current unit-test cases are guest based. Move them to guest directory.
    fyin1 committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    5de5a97 View commit details
    Browse the repository at this point in the history
  6. acrn-unit-test: add README/COPYRIGHT

    Signed-off-by: Yin Fengwei <[email protected]>
    fyin1 committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    23cad73 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2018

  1. acrn-unit-test: Enable 2 cpu core in guest testing.

    So we could test the smp related operations.
    
    Signed-off-by: Yin Fengwei <[email protected]>
    fyin1 committed Dec 4, 2018
    Configuration menu
    Copy the full SHA
    6e5c23d View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2019

  1. bugfix: cstart64: update selectors after switching GDT on BSP

    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]>
    junjiemao1 committed Feb 3, 2019
    Configuration menu
    Copy the full SHA
    73efe10 View commit details
    Browse the repository at this point in the history
  2. cstart: initialize .bss

    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]>
    junjiemao1 committed Feb 3, 2019
    Configuration menu
    Copy the full SHA
    3bda028 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2019

  1. setting esp to init stack

    fix bug because of cstart.S not init esp.
    
    Signed-off-by: Huihuang Shi <[email protected]>
    Shawnshh committed Apr 2, 2019
    Configuration menu
    Copy the full SHA
    3896eab View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2019

  1. Configuration menu
    Copy the full SHA
    4449b8c View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2019

  1. Merge pull request projectacrn#2 from HuiHuangShi/cesp

    setting esp to init stack
    wenlingz committed Apr 19, 2019
    Configuration menu
    Copy the full SHA
    2dc0f41 View commit details
    Browse the repository at this point in the history
  2. Merge pull request projectacrn#3 from nwang-intel/master

    initialize ds/es/fs/gs/ss in cstart.S
    wenlingz committed Apr 19, 2019
    Configuration menu
    Copy the full SHA
    1125692 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2019

  1. Configuration menu
    Copy the full SHA
    d5def37 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e545def View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2019

  1. Makefile: generate raw binaries which can be loaded directly

    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]>
    junjiemao1 committed Apr 29, 2019
    Configuration menu
    Copy the full SHA
    73d9c8a View commit details
    Browse the repository at this point in the history
  2. intel-iommu: rename to intel_iommu

    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]>
    junjiemao1 committed Apr 29, 2019
    Configuration menu
    Copy the full SHA
    a76b9f6 View commit details
    Browse the repository at this point in the history
  3. make: stitch all tests together

    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]>
    junjiemao1 committed Apr 29, 2019
    Configuration menu
    Copy the full SHA
    234774c View commit details
    Browse the repository at this point in the history
  4. flat.lds: discard .comment and .note

    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]>
    junjiemao1 committed Apr 29, 2019
    Configuration menu
    Copy the full SHA
    94a8189 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2019

  1. Merge pull request projectacrn#4 from yuandengliang/3384-load-tss-err

    fix AP load tss error upon AP receiving second IPI&SIPI message
    wenlingz committed May 8, 2019
    Configuration menu
    Copy the full SHA
    9dcf960 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2019

  1. Merge pull request projectacrn#1 from junjiemao1/stitched

    Enable loading stitched tests in partition mode
    wenlingz committed May 14, 2019
    Configuration menu
    Copy the full SHA
    3b315d4 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2019

  1. Tuned arguments of QEMU to fit for acrn-unit-test

    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]>
    ysun committed May 30, 2019
    Configuration menu
    Copy the full SHA
    bfacda9 View commit details
    Browse the repository at this point in the history