Coder Social home page Coder Social logo

projectacrn / acrn-hypervisor Goto Github PK

View Code? Open in Web Editor NEW
1.1K 100.0 497.0 202.19 MB

Project ACRN hypervisor

License: BSD 3-Clause "New" or "Revised" License

Makefile 1.25% C 71.10% Assembly 0.57% Shell 0.83% Python 18.08% JavaScript 2.73% HTML 0.02% ASL 0.79% XSLT 1.50% Rust 0.23% TypeScript 0.52% SCSS 0.19% Batchfile 0.01% Vue 2.05% C++ 0.12%

acrn-hypervisor's Introduction

Project ACRN Embedded Hypervisor

The open source project ACRN defines a device hypervisor reference stack and an architecture for running multiple software subsystems, managed securely, on a consolidated system by means of a virtual machine manager. It also defines a reference framework implementation for virtual device emulation, called the "ACRN Device Model".

The ACRN Hypervisor is a Type 1 reference hypervisor stack, running directly on the bare-metal hardware, and is suitable for a variety of IoT and embedded device solutions. The ACRN hypervisor addresses the gap that currently exists between datacenter hypervisors, and hard partitioning hypervisors. The ACRN hypervisor architecture partitions the system into different functional domains, with carefully selected guest OS sharing optimizations for IoT and embedded devices.

Community Support

The Project ACRN Developer Community includes developers from member organizations and the general community all joining in the development of software within the project. Members contribute and discuss ideas, submit bugs and bug fixes. They also help those in need through the community's forums such as mailing lists and IRC channels. Anyone can join the developer community and the community is always willing to help its members and the User Community to get the most out of Project ACRN.

Welcome to the project ACRN community!

We're now holding monthly Technical Community Meetings and encourage you to call in and learn more about the project. Meeting information is on the TCM Meeting page in our ACRN wiki.

Resources

Here's a quick summary of resources to find your way around the Project ACRN support systems:

  • Project ACRN Website: The https://projectacrn.org website is the central source of information about the project. On this site, you'll find background and current information about the project as well as relevant links to project material. For a quick start, refer to the ACRN Introduction and Getting Started Guide.
  • Source Code in GitHub: Project ACRN source code is maintained on a public GitHub repository at https://github.com/projectacrn/acrn-hypervisor. You'll find information about getting access to the repository and how to contribute to the project in this Contribution Guide document.
  • Documentation: Project technical documentation is developed along with the project's code, and can be found at https://projectacrn.github.io. Additional documentation is maintained in the Project ACRN GitHub wiki.
  • Issue Reporting and Tracking: Requirements and Issue tracking is done in the Github issues system: https://github.com/projectacrn/acrn-hypervisor/issues. You can browse through the reported issues and submit issues of your own.
  • Reporting a Potential Security Vulnerability: If you have discovered potential security vulnerability in ACRN, please send an e-mail to [email protected].

    It is important to include the following details:

    • The projects and versions affected
    • Detailed description of the vulnerability
    • Information on known exploits
  • Mailing List: The Project ACRN Development mailing list is perhaps the most convenient way to track developer discussions and to ask your own support questions to the project ACRN community. There are also specific ACRN mailing list subgroups for builds, users, and Technical Steering Committee notes, for example. You can read through the message archives to follow past posts and discussions, a good thing to do to discover more about the project.

acrn-hypervisor's People

Contributors

amyreye avatar binbinwu1 avatar conghuic23 avatar dbkinder avatar deb-intel avatar donsheng avatar fyin1 avatar gvancuts avatar jasonchencj avatar jsun26intel avatar junjiemao1 avatar kaigefu avatar kunhui-li avatar lifeix avatar lyan3 avatar mgcao avatar mingqiangchi avatar peterfang avatar shawnshh avatar shiqingg avatar szhen11 avatar taoyuhong avatar weichenli-intel avatar weiyi-feng avatar xiaoguangwu avatar yakuizhao avatar yliu80 avatar yonghuah avatar yuchuyang avatar zidechen0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

acrn-hypervisor's Issues

Enable Travis CI

We should enable Travis CI and add a build-badge to the README file.

launch_UOS.sh acrn-dm report Unable to setup memory (12)

acrn hv : 287fc4c
acrn kernel: 3c8fa189db1088589bbdd3948792e21250db20d1

issue:
launch_UOS.sh acrn-dm report Unable to setup memory (12)

##HV log:

ACRN Hypervisor
calibrate_tsc, tsc_hz=1881600000
[3827968us][cpu=0][sev=2][seq=1]:HV version 0.1-rc5-2018-06-18 14:23:10-287fc4c-dirty DBG build by weller, start time 3821056us
[3840512us][cpu=0][sev=2][seq=2]:API version 1.0
[3845632us][cpu=0][sev=2][seq=3]:Detect processor: Intel(R) Atom(TM) Processor E3900 @ 1.90GHz
[3855104us][cpu=0][sev=2][seq=4]:hardware support HV
[3872256us][cpu=0][sev=2][seq=5]:Start VM0
ACRN:>vm_console

##launch_UOS.sh log:
Launch clearlinux UOS
cat: /sys/class/net/ens4/address: No such file or directory
tap device existed, reuse acrn_tap_yocto
memsize 2048M
passed gvt-g optargs low_gm 64, high_gm 448, fence 8
SW_LOAD: get kernel path /home/root/clearlinux/bzImage
SW_LOAD: get bootargs root=/dev/vda2 rw rootwait noxsave maxcpus=3 nohpet console=hvc0 console=ttyS0 no_timer_check ignore_loglevel log_buf_len=16M consoleblank=0 tsc=reliable i915.avail_planes_per_pipe=0x00000C i915.enable_hangcheck=0 i915.nuclear_pageflip=1
VHM api version 1.0
Unable to setup memory (12)
root@:Dom0 ~ $ free -lm
total used free shared buff/cache available
Mem: 7809 4152 3388 52 269 3335
Low: 7809 4421 3388
High: 0 0 0
Swap: 0 0

update the SOS kernel ,then can not login from screen via hdmi interface

On my hand is up2 board, I install clearlinux(version: 21260).
When I compiled the acrn-kernel based on the kernel_uefi_sos, then I copy the bzImage to EFI/org.clearlinux/kernel-org.clearlinux.pk414-sos.4.14.44-42. I reboot the board, then the SOS system bring up, the screen via hdmi interface show login window. When I enter username , the terminal hang, then throw out the information as below:
clr-531f8fbc1c854646bbf9cfa9704e23f0 login: [ 31.075522] random: crng init done
[ 31.075692] random: 7 urandom warning(s) missed due to ratelimiting

But I open the console terminal ,then enter "vm_console", in the SOS console ,I can enter the username and password ,then loggin in.

Before I update the SOS kernel, all is ok.

Compilation error on Fedora (all versions) and Ubuntu 18.04

The devicemodel code will not compile on the following development distributions:
Note that the CI system will fail because there is a compilation error on the following distributions:

  • Fedora 26, 27 and 28
  • Ubuntu 18.04

Others distributions such as Ubuntu 14.04, 16.04 and Clearlinux are fine.

Here is the compilation error:

[ ! -e /root/acrn/build/devicemodel/hw/pci/virtio/rpmb_sim.o ] && mkdir -p /root/acrn/build/devicemodel/hw/pci/virtio/; \
cc -g -O0 -std=gnu11 -D_GNU_SOURCE -DNO_OPENSSL -m64 -Wall -ffunction-sections -Werror -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fno-strict-aliasing -I/root/acrn/devicemodel/include -I/root/acrn/devicemodel/include/public -fstack-protector-strong -c hw/pci/virtio/rpmb_sim.c -o /root/acrn/build/devicemodel/hw/pci/virtio/rpmb_sim.o
hw/pci/virtio/rpmb_sim.c: In function 'rpmb_mac':
hw/pci/virtio/rpmb_sim.c:77:21: error: storage size of 'hmac_ctx' isn't known
  struct hmac_ctx_st hmac_ctx;
                     ^~~~~~~~
hw/pci/virtio/rpmb_sim.c:79:2: error: implicit declaration of function 'HMAC_CTX_init'; did you mean 'HMAC_CTX_new'? [-Werror=implicit-function-declaration]
  HMAC_CTX_init(&hmac_ctx);
  ^~~~~~~~~~~~~
  HMAC_CTX_new
hw/pci/virtio/rpmb_sim.c:106:2: error: implicit declaration of function 'HMAC_CTX_cleanup'; did you mean 'HMAC_CTX_get_md'? [-Werror=implicit-function-declaration]
  HMAC_CTX_cleanup(&hmac_ctx);
  ^~~~~~~~~~~~~~~~
  HMAC_CTX_get_md
hw/pci/virtio/rpmb_sim.c:77:21: error: unused variable 'hmac_ctx' [-Werror=unused-variable]
  struct hmac_ctx_st hmac_ctx;
                     ^~~~~~~~
cc1: all warnings being treated as errors
Makefile:164: recipe for target '/root/acrn/build/devicemodel/hw/pci/virtio/rpmb_sim.o' failed
make[1]: Leaving directory '/root/acrn/devicemodel'
make[1]: *** [/root/acrn/build/devicemodel/hw/pci/virtio/rpmb_sim.o] Error 1
Makefile:26: recipe for target 'devicemodel' failed
make: *** [devicemodel] Error 2

question: trusty world

Hi,

I am studying about the project, and in this slides https://elinux.org/images/3/3c/ACRN-brief2.pdf page 3 "Architecture Overview", in the User OS there is the Android world and the Trusty world.

If I understand correct, to support the Trusty world some support in hardware is required. I would like to know what is the current support Acrn have for TEE execution (I couldn't find anything in the docs regarding this).

Thanks

Where is project version maintained?

The project version seems to be stored in at least two places: the Makefiles for hypervisor and devicemodel both define a MAJOR_VERSION, MINOR_VERSION, and RC_VERSION and the top-level Makefile does not.

The project version should be maintained in one place (maybe an include file called version.mk at the top level that each of the lower-level Makefiles include with include ../version.mk).

failed to build acrn at ubuntu16.04 + gcc-5

try to bisect, and figure out the FBC

lizj@G08FNSTD140138:~/workspace/Audio/acrn-hypervisor$ git bisect log 
lizj@G08FNSTD140138:~/workspace/Audio/acrn-hypervisor$ git bisect log 
git bisect start
# good: [32fccb2f43671366266c61049c73757a6dac8b67] HV: 'vlapic_set_local_intr()' code cleanup
git bisect good 32fccb2f43671366266c61049c73757a6dac8b67
# good: [32fccb2f43671366266c61049c73757a6dac8b67] HV: 'vlapic_set_local_intr()' code cleanup
git bisect good 32fccb2f43671366266c61049c73757a6dac8b67
# bad: [804026168c208077c00b058102b14cfa856e47de] HV: remove unused API lookp_entry_by_id()
git bisect bad 804026168c208077c00b058102b14cfa856e47de
# bad: [d705970eb268bf03ed47e20951d6b5d7cdc234ac] HV: vmx: convert hexadecimals used in bitops to unsigned
git bisect bad d705970eb268bf03ed47e20951d6b5d7cdc234ac
# good: [5aca8b1cdd41f7f1f23e990914c7df5dd4dc0f73] When guest frees vector, counts needs to be reset. "int" command from hv shell ends up incrementing per cpu irq_count.
git bisect good 5aca8b1cdd41f7f1f23e990914c7df5dd4dc0f73
# bad: [f4bd0798e0eb89c133efe53471ba284d73b73ba4] HV: mmu: convert hexadecimals used in bitops to unsigned
git bisect bad f4bd0798e0eb89c133efe53471ba284d73b73ba4
# bad: [7b548e87db1b9c60eb927b93cfb30449bb4d6b88] HV: cpu: convert hexadecimals used in bitops to unsigned
git bisect bad 7b548e87db1b9c60eb927b93cfb30449bb4d6b88
# first bad commit: [7b548e87db1b9c60eb927b93cfb30449bb4d6b88] HV: cpu: convert hexadecimals used in bitops to unsigned

i use ubuntu 16.04 and gcc-5

lizj@G08FNSTD140138:~/workspace/Audio/acrn-hypervisor$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 

GitHub profiles must include real user name

git blame shows the GitHub user name for the submitter (e.g., David B. Kinder). The GitHub interface uses the GitHub name for contacting (e.g., @dbkinder) or assigning reviewers or issues. If the user's profile does not list the real user name, there's no way to look up a person to make an assignment (e.g., what's the GitHub id for "Eddie Dong" or "Qi Yadong"), or who is id "ailun258"?

Please add your full name to your GitHub profile. That way, when you try to assign Assignees or Reviewers, you can search for the person by name and their GitHub id will show up.

Build and install from source failed.

Hardware: NUC Kit NUC6CAYH with 8G Memory and 128G SSD

Installed Clearlinux successfully using clear-23270-installer.img

EFI state with a working Clearlinux install looks like this:
screen shot 2018-06-27 at 9 14 41 am

Followed instructions for building ACRN from Source within
https://projectacrn.github.io/latest/getting_started/index.html

After successfully building ACRN I did a make install

Followed instructions to Add ACRN hypervisor to EFI partition.

EFI state after doing this looks like this:
screen shot 2018-06-27 at 9 36 28 am

Reboot and select The ACRN Service OS

System does not boot, and won't come up regardless of which selection from EFI boot menu.

Please advise.

Many thanks.

sos bootargs: /proc/cmdline is different from dmesg and sos_bootargs_debug.txt

i found the boot args of sos from sos_bootargs_debug.txt, sos proc/cmdline and dmesg are different.

bootarg file : sos_bootargs_debug.txt
contents:

pci_devices_ignore=(0:18:2) noxsave maxcpus=1 console=tty0 console=ttyS0 i915.nuclear_pageflip=1 root=/dev/mmcblk1p1 rw rootwait clocksource=hpet quiet loglevel=3 no_timer_check consoleblank=0 i915.enable_initial_modeset=1 i915.tsd_init=7 i915.tsd_delay=2000 video=DP-1:d video=DP-2:d i915.avail_planes_per_pipe=0x00000F i915.domain_plane_owners=0x011111110000 i915.enable_guc_loading=0 i915.enable_guc_submission=0 i915.enable_preemption=1 i915.context_priority_mode=2 i915.enable_gvt=1 hvlog=2M@0x6de00000 cma=6144M@0x100000000

after sos stat up, the contents /proc/cmdline contain more information than the sos_bootargs_debug.txt defined.
cat /proc/cmdline

pci_devices_ignore=(0:18:2) noxsave maxcpus=1 console=tty0 console=ttyS0 i915.nuclear_pageflip=1 root=/dev/mmcblk1p1 rw rootwait clocksource=hpet quiet loglevel=3 no_timer_check consoleblank=0 i915.enable_initial_modeset=1 i915.tsd_init=7 i915.tsd_delay=2000 video=DP-1:d video=DP-2:d i915.avail_planes_per_pipe=0x00000F i915.domain_plane_owners=0x011111110000 i915.enable_guc_loading=0 i915.enable_guc_submission=0 i915.enable_preemption=1 i915.context_priority_mode=2 i915.enable_gvt=1 hvlog=2M@0x6de00000 cma=6144M@0x100000000 androidboot.brand=intel androidboot.name=broxton_p androidboot.model=gr_mrb androidboot.device=gr_mrb ABL.bdev=mmc2:/iasImage ABL.boot=1400 ABL.csever=3.1.50.2238 ABL.bpdt1=0x000055aa,0x00000000 ABL.bpdt2=0x000055aa,0x00000000 ABL.hwver=51,4,1900,b00f,0,8192 ABL.mrcthreshold=0,0 ABL.memser=0x00000001 ABL.reset=power-on ABL.seed=0,0 ABL.seed_list=0,0 ABL.timestamps=64@0xc0000 ABL.consbuf=0xdc000 ABL.version=rel.1804-Android ABL.secureboot=0 ABL.virtual_mode=1 ABL.boot_target=NORMAL_BOOT trusty.param_addr=0xc5636 androidboot.bootloader=rel.1804-Android androidboot.serialno=R1J56L4ddb9080 androidboot.bootreason=power-on pci_devices_ignore=(0:18:2) noxsave maxcpus=1 console=tty0 console=ttyS0 i915.nuclear_pageflip=1 root=/dev/mmcblk1p1 rw rootwait clocksource=hpet quiet loglevel=3 no_timer_check consoleblank=0 i915.enable_initial_modeset=1 i915.tsd_init=7 i915.tsd_delay=2000 video=DP-1:d video=DP-2:d i915.avail_planes_per_pipe=0x00000F i915.domain_plane_owners=0x011111110000 i915.enable_guc_loading=0 i915.enable_guc_submission=0 i915.enable_preemption=1 i915.context_priority_mode=2 i915.enable_gvt=1 hvlog=2M@0x6de00000 cma=6144M@0x100000000

boot args from dmesg

root@:Dom0 ~ $ dmesg
[ 0.000000] Linux version 4.14.41-sos+ (weller@workstation) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)) #1 SMP PREEMPT Mon Jun 18 23:09:54 CST 2018
[ 0.000000] Command line: pci_devices_ignore=(0:18:2) noxsave maxcpus=1 console=tty0 console=ttyS0 i915.nuclear_pageflip=1 root=/dev/mmcblk1p1 rw rootwait clocksource=hpet quiet loglevel=3 no_timer_check consoleblank=0 i915.enable_initial_modeset=1 i915.tsd_init=7 i915.tsd_delay=2000 video=DP-1:d video=DP-2:d i915.avail_planes_per_pipe=0x00000F i915.domain_plane_owners=0x011111110000 i915.enable_guc_loading=0 i915.enable_guc_submission=0 i915.enable_preemption=1 i915.context_priority_mode=2 i915.enable_gvt=1 hvlog=2M@0x6de00000 cma=6144M@0x100000000 androidboot.brand=intel androidboot.name=broxton_p androidboot.model=gr_mrb androidboot.device=gr_mrb ABL.bdev=mmc2:/iasImage ABL.boot=1400 ABL.csever=3.1.50.2238 ABL.bpdt1=0x000055aa,0x00000000 ABL.bpdt2=0x000055aa,0x00000000 ABL.hwver=51,4,1900,b00f,0,8192 ABL.mrcthreshold=0,0 ABL.memser=0x00000001 ABL.reset=power-on ABL.seed=0,0 ABL.seed_list=0,0 ABL.timestamps=64@0xc0000 ABL.consbuf=0xdc000 ABL.version=rel.1804-Android ABL.secureboot=0 A
[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
[ 0.000000] e820: BIOS-provided physical RAM map:

The Jenkins CI does not catch all compilation errors

It was observed during the review process of PR #197 that it was not possible to compile the code with the patch proposed. The error was visible in the Jenkins CI console output but the end result of the test was still set to SUCCESS.

We need to investigate why it did not set this to FAILED and correct this to make sure similar problems are caught by the Jenkins CI system automatically.

Move documentation to acrn-documentation repo

Project documentation should be maintained in a central location rather than within each repo, so incorporate the contents of the /Documentation folder into the acrn-documentation repo and remove the /Documentation folder from the acrn-hypervisor folder.

Unable to launch UOS

Following instructions on https://projectacrn.github.io/latest/getting-started/apl-nuc.html I was able to boot up ACRN using a static IP address without loosing my connectivity in the SOS thanks to your help.

However, I am unable to launch a UOS now.

Here is the output when attempting to launch a UOS:

screen shot 2018-06-29 at 9 53 35 am

The launch script that was used is as follows:

screen shot 2018-06-29 at 9 54 18 am

Attempting to determine if any VM was launched I then did the following:

screen shot 2018-06-29 at 9 54 31 am

Not sure if the missing file error above is an indication of some other problem.

Please advise.

Thanks.

Black Screen when booting NUC with Hypervisor

We found a black screen issue when boot up APL NUC with Hypervisor, After debugging we found it's ClearLinux issue. Here is the work around.

In order to successfully boot up SOS/UOS with their displays (otherwise there is NO display after boot up SOS), the following steps are needed before rebooting native Clear Linux to SOS,

  1. After launching native Clear Linux, you MUST install the desktop bundle:
    $ swupd bundle-add desktop

  2. Get the IP for clearlinux, record IP for ssh login to the SOS in case SOS display fails after the SOS is booted:
    $ ip addr

  3. Create the file /lib/systemd/system/weston.service with the following content:

    [Unit]
    Description=Weston
    Before=slices.target
    
    [Service]
    User=root
    Environment=HOME=/root
    WorkingDirectory=/tmp
    Environment=XDG_RUNTIME_DIR=/run/wayland
    ExecStartPre=-/bin/mkdir -p /run/wayland
    ExecStart=/usr/bin/weston --idle-time=0 --log=/var/log/weston.log
    ExecStop=/usr/bin/killall -s TERM weston
    StandardInput=tty
    StandardOutput=journal
    StandardError=journal
    TTYPath=/dev/tty2
    SupplementaryGroups=input
    
    [Install]
    WantedBy=multi-user.target
    
  4. Run this command to start the weston service:
    $ systemctl enable Weston

When booting up SOS:

  1. press F7
  2. choose “ACRN Hypervisor" (hypervisor name set by efibootmgr )
  3. select “The ACRN Service OS”
  4. then enter SOS

After booting up the UOS, step 1)~4) are needed for the UOS display too.

Add doc build to CI acceptance test

A recent PR (ab0ba5f) broke the documentation build because of reST/Sphinx errors. Adding a doc build to the CI acceptance test would have caught this before it was merged.

Build error after adding 'U/UL' suffix for unsigned contant value

Commit f81fcf2 causes the following build error. Any changes required for the build environment? Thanks.

arch/x86/trampoline.S: Assembler messages:
arch/x86/trampoline.S:167: Warning: indirect jmp without `*'
arch/x86/trampoline.S:197: Error: junk at end of line, first unrecognized character is `U'
arch/x86/trampoline.S:202: Error: junk at end of line, first unrecognized character is `U'
arch/x86/trampoline.S:210: Error: junk at end of line, first unrecognized character is `U'
arch/x86/trampoline.S:210: Error: junk at end of line, first unrecognized character is `U'
arch/x86/trampoline.S:210: Error: junk at end of line, first unrecognized character is `U'
arch/x86/trampoline.S:210: Error: junk at end of line, first unrecognized character is `U'
arch/x86/trampoline.S:211: Error: junk at end of line, first unrecognized character is `U'
Makefile:268: recipe for target '/opt/mnt/acrn-hypervisor/build/hypervisor/arch/x86/trampoline.o' failed
make[1]: *** [/opt/mnt/acrn-hypervisor/build/hypervisor/arch/x86/trampoline.o] Error 1
make[1]: Leaving directory '/opt/mnt/acrn-hypervisor/hypervisor'
Makefile:20: recipe for target 'hypervisor' failed
make: *** [hypervisor] Error 2

Trying to setup ACRN with static IP address

Since I cannot use DHCP at my workplace, I had to follow these instructions to setup a static ip address:

https://clearlinux.org/documentation/clear-linux/reference/bundles/os-core

After doing this I was able to follow your instructions for setting up ACRN on my NUC here:

https://projectacrn.github.io/latest/getting_started/index.html#

I successfully booted up ACRN however, the SOS that booted lost my static IP connectivity and therefore I was unable to download the reference UOS via:

curl -O https://download.clearlinux.org/releases/22140/clear/clear-22140-kvm.img.xz

What is the recommended procedure to continue from this point in your instructions?

Many thanks.

CODEOWNERS require repo write access

A recent addition to the CODEOWNERS file added

/tools/acrn-crashlog/                    @dizhang417 @chengangc 

but neither of these folks have the required permission for the repo to be a reviewer

issues and enhancements for gpa2hpa_check()

uint64_t gpa2hpa_check(struct vm *vm, uint64_t gpa,

these below may be the known issues, but keep tracking here:

  • size should not be zero. (I saw there are some code calling this function with size = 0, which means if a memory cross the boundary between VM and VMM/Hypervisor, then the associated hypercall API can be misused by guest VM to do a deputy attack: requesting hypervisor to overwrite its own memory)

  • add support for cross page boundary memory ( this is functional issue, not security)

  • check GPA permissions (but with an assumption, by default, hypervisor is not allowed to write guest VM (unless specified), in a better case, even hypervisor should not have read access to guest VM memory, however, this is more strict permission checks, it would be better if we could support it as enhancement)

Simplify the use of the LICENSE and license_header file

We currently have three "license" files in the repo:

  1. LICENSE
  2. hypervisor/license_header
  3. devicemodel/license_header

All three files include the same license info and as such are redundant. We should simplify the use of these and consolidate around the top-level LICENSE file

hypervisor information printed out when using virtio-console in launch android

HW: MRB board
SW: add one line : " -s 5,virtio-console,@pty:pty_port " in launch_android script like the following script

acrn-dm -A -m $mem_size -c $2 -G "$3" -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio
-l com1,stdio
-s 5,virtio-console,@pty:pty_port
-s 2,pci-gvt
-s 9,virtio-net,$tap
-s 4,virtio-blk,/data/$5/$5.img
-s 7,passthru,0/15/0
-s 8,passthru,0/15/1
-s 10,virtio-hyper_dmabuf
-s 14,passthru,0/e/0
-s 15,passthru,0/f/0
-s 24,passthru,0/17/0
-s 22,passthru,0/16/0
-M
-k /home/root/$5/boot.img-kernel -r /home/root/$5/boot.img-ramdisk.gz
-B "initrd=0x48800000 root=/dev/ram0 rw rootwait noxsave maxcpus=$2
nohpet console=ttyS0 no_timer_check ignore_loglevel
log_buf_len=16M consoleblank=0 tsc=reliable reboot_panic=p,w
intel_iommu=off relative_sleep_states=1 vga=current
androidboot.hardware=gordon_peak_acrn firmware_class.path=/vendor/firmware
androidboot.selinux=permissive sys.init_log_level=7
androidboot.serialno=$ser
i915.enable_rc6=1 drm.atomic=1 i915.nuclear_pageflip=1 i915.enable_fbc=1
i915.modeset=1 drm.vblankoffdelay=1 i915.fastboot=1 i915.enable_guc_loading=0
i915.hpd_sense_invert=0x7 i915.avail_planes_per_pipe=$4
i915.enable_hangcheck=0 use_nuclear_flip=1
firmware_class.path=/vendor/firmware" $vm_name

[issue]: the sos console will dump hypervisor log as below:

[112832768us][cpu=1][sev=1][seq=1947]:Error: Unhandled VM exit condition from guest at 0x00000000000009f5
[112843520us][cpu=1][sev=1][seq=1948]:Exit Reason: 0x0000000000000002
[112850688us][cpu=1][sev=2][seq=1949]:Exit qualification: 0x0000000000000000
[112858368us][cpu=1][sev=1][seq=1950]:Error: Unhandled VM exit condition from guest at 0x00000000000009f5
[112869120us][cpu=1][sev=1][seq=1951]:Exit Reason: 0x0000000000000002
[112876288us][cpu=1][sev=2][seq=1952]:Exit qualification: 0x0000000000000000
[112883968us][cpu=1][sev=1][seq=1953]:Error: Unhandled VM exit condition from guest at 0x00000000000009f5
[112894720us][cpu=1][sev=1][seq=1954]:Exit Reason: 0x0000000000000002
[112901888us][cpu=1][sev=2][seq=1955]:Exit qualification: 0x0000000000000000
[112909568us][cpu=1][sev=1][seq=1956]:Error: Unhandled VM exit condition from guest at 0x00000000000009f5
[112920320us][cpu=1][sev=1][seq=1957]:Exit Reason: 0x0000000000000002
[112927488us][cpu=1][sev=2][seq=1958]:Exit qualifica

The use of `ROOT_OUT` in the top-level `Makefile` is broken

Introduction

The top-level Makefile sets an ROOT_OUT variable that by default is build. It should be possible to use it to build the various components in a different build directory but that mechanism does not work.

How to reproduce:

Try to set the ROOT_OUT variable to a different value, e..g:

make ROOT_OUT=build-test

The build will fail as follows (only the last lines are included here):

[ ! -e build-test/hypervisor/arch/x86/vmx_asm.o ] && mkdir -p build-test/hypervisor/arch/x86/; \
cc  -Iinclude  -Iinclude/lib  -Iinclude/lib/crypto  -Iinclude/common  -Iinclude/arch/x86  -Iinclude/arch/x86/guest  -Iinclude/debug  -Iinclude/public  -Iinclude/common  -Ibsp/include  -Ibsp/uefi/include/bsp  -Iboot/include -I. -m64 -nostdinc -nostdlib -gdwarf-2 -DASSEMBLER=1 -c arch/x86/vmx_asm.S -o build-test/hypervisor/arch/x86/vmx_asm.o
[ ! -e build-test/hypervisor/arch/x86/retpoline-thunk.o ] && mkdir -p build-test/hypervisor/arch/x86/; \
cc  -Iinclude  -Iinclude/lib  -Iinclude/lib/crypto  -Iinclude/common  -Iinclude/arch/x86  -Iinclude/arch/x86/guest  -Iinclude/debug  -Iinclude/public  -Iinclude/common  -Ibsp/include  -Ibsp/uefi/include/bsp  -Iboot/include -I. -m64 -nostdinc -nostdlib -gdwarf-2 -DASSEMBLER=1 -c arch/x86/retpoline-thunk.S -o build-test/hypervisor/arch/x86/retpoline-thunk.o
cc -E -x c  -Iinclude  -Iinclude/lib  -Iinclude/lib/crypto  -Iinclude/common  -Iinclude/arch/x86  -Iinclude/arch/x86/guest  -Iinclude/debug  -Iinclude/public  -Iinclude/common  -Ibsp/include  -Ibsp/uefi/include/bsp  -Iboot/include bsp/ld/link_ram.ld.in | grep -v '^#' > build-test/hypervisor/link_ram.ld
cc -Wl,-Map=build-test/hypervisor/acrn.map -o build-test/hypervisor/acrn.out -Wl,--gc-sections -static -nostartfiles -nostdlib -Wl,-n,-z,max-page-size=0x1000 -Wl,-z,noexecstack  -Tbuild-test/hypervisor/link_ram.ld build-test/hypervisor/boot/acpi.o build-test/hypervisor/boot/dmar_parse.o build-test/hypervisor/boot/multiboot.o build-test/hypervisor/arch/x86/ioapic.o build-test/hypervisor/arch/x86/intr_lapic.o build-test/hypervisor/arch/x86/cpu.o build-test/hypervisor/arch/x86/softirq.o build-test/hypervisor/arch/x86/cpuid.o build-test/hypervisor/arch/x86/mmu.o build-test/hypervisor/arch/x86/notify.o build-test/hypervisor/arch/x86/intr_main.o build-test/hypervisor/arch/x86/vtd.o build-test/hypervisor/arch/x86/gdt.o build-test/hypervisor/arch/x86/irq.o build-test/hypervisor/arch/x86/timer.o build-test/hypervisor/arch/x86/ept.o build-test/hypervisor/arch/x86/io.o build-test/hypervisor/arch/x86/interrupt.o build-test/hypervisor/arch/x86/vmexit.o build-test/hypervisor/arch/x86/vmx.o build-test/hypervisor/arch/x86/assign.o build-test/hypervisor/arch/x86/trusty.o build-test/hypervisor/arch/x86/cpu_state_tbl.o build-test/hypervisor/arch/x86/guest/vcpu.o build-test/hypervisor/arch/x86/guest/vm.o build-test/hypervisor/arch/x86/guest/instr_emul_wrapper.o build-test/hypervisor/arch/x86/guest/vlapic.o build-test/hypervisor/arch/x86/guest/guest.o build-test/hypervisor/arch/x86/guest/vmcall.o build-test/hypervisor/arch/x86/guest/vpic.o build-test/hypervisor/arch/x86/guest/vmsr.o build-test/hypervisor/arch/x86/guest/vioapic.o build-test/hypervisor/arch/x86/guest/instr_emul.o build-test/hypervisor/arch/x86/guest/ucode.o build-test/hypervisor/arch/x86/guest/pm.o build-test/hypervisor/arch/x86/debug/reboot.o build-test/hypervisor/lib/spinlock.o build-test/hypervisor/lib/udelay.o build-test/hypervisor/lib/mdelay.o build-test/hypervisor/lib/div.o build-test/hypervisor/lib/string.o build-test/hypervisor/lib/memory.o build-test/hypervisor/lib/crypto/hkdf.o build-test/hypervisor/lib/sprintf.o build-test/hypervisor/common/hv_main.o build-test/hypervisor/common/hypercall.o build-test/hypervisor/common/trusty_hypercall.o build-test/hypervisor/common/schedule.o build-test/hypervisor/common/vm_load.o build-test/hypervisor/common/io_request.o build-test/hypervisor/common/stack_protector.o build-test/hypervisor/bsp/uefi/vm_description.o build-test/hypervisor/bsp/uefi/uefi.o build-test/hypervisor/bsp/uefi/cmdline.o build-test/hypervisor/debug/printf.o build-test/hypervisor/debug/shell_public.o build-test/hypervisor/debug/console.o build-test/hypervisor/debug/dump.o build-test/hypervisor/debug/logmsg.o build-test/hypervisor/debug/shell_internal.o build-test/hypervisor/debug/vuart.o build-test/hypervisor/debug/sbuf.o build-test/hypervisor/debug/uart16550.o build-test/hypervisor/debug/serial.o build-test/hypervisor/arch/x86/cpu_secondary.o build-test/hypervisor/arch/x86/cpu_primary.o build-test/hypervisor/arch/x86/idt.o build-test/hypervisor/arch/x86/vmx_asm.o build-test/hypervisor/arch/x86/retpoline-thunk.o
objcopy -S --section-alignment=0x1000 -O elf32-i386 build-test/hypervisor/acrn.out build-test/hypervisor/acrn.32.out
objcopy -O binary build-test/hypervisor/acrn.out build-test/hypervisor/acrn.bin
echo "building hypervisor as EFI executable..."
building hypervisor as EFI executable...
make -C bsp/uefi/efi HV_OBJDIR=build-test/hypervisor RELEASE=0
make[2]: Entering directory '/home/gvancuts/work/acrn/acrn-hypervisor/hypervisor/bsp/uefi/efi'
[ ! -e build-test/hypervisor/bsp/uefi/efi/boot.o ] && mkdir -p build-test/hypervisor/bsp/uefi/efi/; \
cc  -I../include/bsp/ -I. -c -I. -I.. -I/usr/include/efi -I/usr/include/efi/x86_64 -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -Wall -I../fs/ -Dx86_64 -O2 -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 -mno-red-zone  boot.c -o build-test/hypervisor/bsp/uefi/efi/boot.o
[ ! -e build-test/hypervisor/bsp/uefi/efi/pe.o ] && mkdir -p build-test/hypervisor/bsp/uefi/efi/; \
cc  -I../include/bsp/ -I. -c -I. -I.. -I/usr/include/efi -I/usr/include/efi/x86_64 -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -Wall -I../fs/ -Dx86_64 -O2 -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 -mno-red-zone  pe.c -o build-test/hypervisor/bsp/uefi/efi/pe.o
[ ! -e build-test/hypervisor/bsp/uefi/efi/malloc.o ] && mkdir -p build-test/hypervisor/bsp/uefi/efi/; \
cc  -I../include/bsp/ -I. -c -I. -I.. -I/usr/include/efi -I/usr/include/efi/x86_64 -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -Wall -I../fs/ -Dx86_64 -O2 -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 -mno-red-zone  malloc.c -o build-test/hypervisor/bsp/uefi/efi/malloc.o
ld -T /usr/lib64/gnuefi/elf_x86_64_efi.lds -Bsymbolic -shared -nostdlib -znocombreloc -L/usr/lib64 /usr/lib64/gnuefi/crt0-efi-x86_64.o -o build-test/hypervisor/bsp/uefi/efi/boot.so build-test/hypervisor/bsp/uefi/efi/boot.o build-test/hypervisor/bsp/uefi/efi/pe.o build-test/hypervisor/bsp/uefi/efi/malloc.o  -lgnuefi -lefi /usr/lib/gcc/x86_64-redhat-linux/7/libgcc.a
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
	-j .rela -j .reloc --target=efi-app-x86-64 build-test/hypervisor/bsp/uefi/efi/boot.so build-test/hypervisor/bsp/uefi/efi/boot.efi
objcopy  --add-section .hv="build-test/hypervisor/acrn.bin"  --change-section-vma .hv=0x6e000 --set-section-flags .hv=alloc,data,contents,load  --section-alignment 0x1000 build-test/hypervisor/bsp/uefi/efi/boot.efi  build-test/hypervisor/acrn.efi
objcopy: cannot open: build-test/hypervisor/acrn.bin: No such file or directory
make[2]: *** [Makefile:92: all] Error 1
make[2]: Leaving directory '/home/gvancuts/work/acrn/acrn-hypervisor/hypervisor/bsp/uefi/efi'
make[1]: *** [Makefile:179: efi] Error 2
make[1]: Leaving directory '/home/gvancuts/work/acrn/acrn-hypervisor/hypervisor'
make: *** [Makefile:17: hypervisor] Error 2

Document the hypervisor commands available

We need to document the various commands that are available from the hypervisor shell, e.g.: list_vm, list_vcpu, pause_vcpu, resume_vcpu, reboot, set_loglevel, get_loglevel, etc.

@ailun258 is this something you can help with?
@dbkinder where should we put this? (I'm actually think we should have a "User Documentation" section that includes the Getting Started Guides and other reference documents for the tools - thoughts?)

ACPI table NHLT is not detected on audio passthru

When audio device is passed through to UOS, NHLT table is not detected by the kernel.

Audio device is passed through to UOS in launch_uos.sh as follows:
...
echo "8086 5a98" > /sys/bus/pci/drivers/pci-stub/new_id
echo "0000:00:0e.0" > /sys/bus/pci/devices/0000:00:0e.0/driver/unbind
echo "0000:00:0e.0" > /sys/bus/pci/drivers/pci-stub/bind

acrn-dm
....
-s 14,passthru,0/e/0
...

When UOS kernel boots, NHLT is missing as can be seen from kernel boot log:

[ 0.000000] ACPI: RSDP 0x00000000000F2400 000024 (v02 DM )
[ 0.000000] ACPI: XSDT 0x00000000000F2480 00004C (v01 DM DMXSDT 00000001 INTL 20170728)
[ 0.000000] ACPI: APIC 0x00000000000F2500 00006A (v01 DM DMMADT 00000001 INTL 20170728)
[ 0.000000] ACPI: FACP 0x00000000000F2600 00010C (v05 DM DMFACP 00000001 INTL 20170728)
[ 0.000000] ACPI: DSDT 0x00000000000F3000 00147F (v02 DM DMDSDT 00000001 INTL 20170728)
[ 0.000000] ACPI: FACS 0x00000000000F27C0 000040
[ 0.000000] ACPI: FACS 0x00000000000F27C0 000040
[ 0.000000] ACPI: HPET 0x00000000000F2740 000038 (v01 DM DMHPET 00000001 INTL 20170728)
[ 0.000000] ACPI: MCFG 0x00000000000F2780 00003C (v01 DM DMMCFG 00000001 INTL 20170728)

Any UOS/VM can destroy other VM?

int64_t hcall_destroy_vm(uint64_t vmid)

It seems like there are no restrictions for this hypercall (may have others), for example, can we check/test these?

  • Can this hypercall be called from other guest VM?
  • What if a ring-3 hypercall from a malicious application in guest VM is called to destroy other guest VM or itself?

Expedited CI for documentation-only changes

CI checks in Jenkins take over 40 minutes, so a simple typo change to a document requires a full build of the source code when no source code was changed. Can we detect only .rst files are included in the PR (or allow adding a keyword to the PR commit message indicating this) that the CI system can notice and short-circuit the full CI testing?

This would also free up CI resources for more important code-change testing.

ClearLinux desktop GUI of SOS fails to launch

I set up the ACRN environment on the APL NUC and UP2 board with ClearLinux 22950. SOS was confirmed to boot up on ACRN. After installing the desktop GUI on ClearLinux following this guide, the GUI failed to launch on the SOS in both HW. It could be launched after booting to the native kernel in both HW though. And it was alright on old ClearLinux v21260.

one of screen got fuzzing on up2 board

we follow the GSG guide and installed hypervisor with ClearLinux 22850 as SOS on up2 board, when booting system with hypervisor we got one of screen fuzzing.
we didn't see this issue when we boot the system to native OS, so clearly it is not hardware issue.
we also revert the version back to 21260 or 21530 and we didn't see this issue when we boot system with hypervisor.
fuzzing screen

Errors when building the documentation (`make html` on Fedora 27)

I followed these instructions to install the dependencies to build the documentation but I am encountering the following error(s) when running make html. I am on Fedora 27.

$ make html
make: [Makefile:42: html] Error 1 (ignored)

New errors/warnings found, please fix them:
==============================================

warning: Tag `CLANG_ASSISTED_PARSING' at line 1048 of file `-' belongs to an option that was not enabled at compile time.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u", or recompile doxygen with this feature enabled.
warning: Tag `CLANG_OPTIONS' at line 1056 of file `-' belongs to an option that was not enabled at compile time.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u", or recompile doxygen with this feature enabled.
Traceback (most recent call last):
  File "/usr/local/bin/sphinx-build", line 7, in <module>
    from sphinx.cmd.build import main
ModuleNotFoundError: No module named 'sphinx.cmd'

The `cbc_lifecycle` component fails to build when using a custom output dir (`make O=`)

The cbc_lifecycle component fails to build when using a custom output dir (make O=). The root cause is the hard-coded path in the Makefile.

Here is the tail end of the make O=build-test where it fails:

make[1]: Leaving directory '/root/acrn/devicemodel'
mkdir -p /root/acrn/build-test/misc
make -C /root/acrn/misc OUT_DIR=/root/acrn/build-test/misc
make[1]: Entering directory '/root/acrn/misc'
make -C /root/acrn/misc/cbc_lifecycle OUT_DIR=/root/acrn/build-test/misc
make[2]: Entering directory '/root/acrn/misc/cbc_lifecycle'
gcc -o /root/acrn/build-test/misc/cbc_lifecycle cbc_lifecycle.c -pthread -L/root/acrn/build-test/misc/../../build/tools -lacrn-mngr
/usr/sbin/ld: cannot find -lacrn-mngr
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:5: /root/acrn/build-test/misc/cbc_lifecycle] Error 1
make[2]: Leaving directory '/root/acrn/misc/cbc_lifecycle'
make[1]: *** [Makefile:7: cbc_lifecycle] Error 2
make[1]: Leaving directory '/root/acrn/misc'
make: *** [Makefile:40: misc] Error 2

doc build dependencies missing in CI environment

Building documentation was recently included into the CI tests, but the dependencies for document building aren't set up in the CI environment.

make -C /workspace/acrn-hypervisor-premerge-build-nuc/acrn-hypervisor/doc html BUILDDIR=/workspace/acrn-hypervisor-premerge-build-nuc/acrn-hypervisor/build/doc
make[1]: Entering directory '/workspace/acrn-hypervisor-premerge-build-nuc/acrn-hypervisor/doc'
make[1]: [Makefile:52: html] Error 2 (ignored)

New errors/warnings found, please fix them:
==============================================

Warning: sphinx_rtd_theme missing. Use pip to install it.

Extension error:
Could not import extension breathe (exception: No module named 'breathe')
make[1]: Leaving directory '/workspace/acrn-hypervisor-premerge-build-nuc/acrn-hypervisor/doc'

Doc build dependencies are documented in https://projectacrn.github.io/latest/howtos/process/docbuild.html#installing-the-documentation-tools

Are the CI environment configuration files checked into GitHub somewhere? (They should) How do we update the CI environment?

launch UOS fail

Coud you help to check why i got fail when launch UOS ?
i built the UOS from the acrn kernel.

LOG
root@:Dom0 ~ $
root@:Dom0 ~ $ ./launch_UOS.sh
clearlinux lost+found
clearlinux.img
Launch clearlinux UOS
cat: /sys/class/net/ens4/address: No such file or directory
passed gvt-g optargs low_gm 64, high_gm 448, fence 8
SW_LOAD: get kernel path /home/root/clearlinux/bzImage
SW_LOAD: get bootargs root=/dev/vda2 rw rootwait noxsave maxcpus=3 nohpet console=hvc0 console=ttyS0 no_timer_check ignore_loglevel log_buf_len=16M consoleblank=0 tsc=reliable i915.avail_planes_per_pipe=0x00000C i915.enable_hangcheck=0 i915.nuclear_pageflip=1
VHM api version 1.0
polling 1024...
Listening 1024...


virt-console backend redirected to /dev/pts/0


SW_LOAD: bootargs copied to guest 0x7fffe000
SW_LOAD: kernel /home/root/clearlinux/bzImage size 12411648 copied to guest 0x1000000
SW_LOAD: found setup sig @ 0x000042b8, setup_size is 0x00004400
SW_LOAD: build zeropage for bootargs addr: 0x7fffe000
SW_LOAD: build e820 6 entries to addr: 0x7fc8501b62d0
SW_LOAD: entry[0]: addr 0x0000000000000000, size 0x00000000000f0000, type 0x1
SW_LOAD: entry[1]: addr 0x00000000000f0000, size 0x0000000000010000, type 0x2
SW_LOAD: entry[2]: addr 0x0000000000100000, size 0x000000007ff00000, type 0x1
SW_LOAD: entry[3]: addr 0x0000000080000000, size 0x0000000000000000, type 0x2
SW_LOAD: entry[4]: addr 0x00000000e0000000, size 0x0000000020000000, type 0x2
SW_LOAD: entry[5]: addr 0x0000000100000000, size 0x0000000000100000, type 0x2
SW_LOAD: zeropage prepared @ 0x7ffff000, kernel_entry_addr=0x1004400

version of acrn-dm is not updated

when we boot to SOS and run the command "acrn-dm", we always got an old version number , seems acrn-dm version number was not updated along with the acrn-dm.

The SSD disk id in UOS is different with the number in SOS when pass-through SSD device to UOS by 00:15:0, and it will change after reboot.

reproduce steps

1: Boot to SOS

> root@acrn-xiangli02 ~ # ls /dev/disk/by-id/
 ata-FORESEE_120GB_SSD_H46092R000318
 ata-FORESEE_120GB_SSD_H46092R000318-part1
 ata-KINGSTON_SA400S37120G_50026B7782008E43
 ata-KINGSTON_SA400S37120G_50026B7782008E43-part1
 ata-KINGSTON_SA400S37120G_50026B7782008E43-part2
 ata-KINGSTON_SA400S37120G_50026B7782008E43-part3
 mmc-SC32G_0x490d2b8c
 mmc-SC32G_0x490d2b8c-part1
 usb-SanDisk_Cruzer_Glide_3.0_4C530001130415101233-0:0
 usb-SanDisk_Cruzer_Glide_3.0_4C530001130415101233-0:0-part1
 wwn-0x50026b7782008e43
 wwn-0x50026b7782008e43-part1
 wwn-0x50026b7782008e43-part2
 wwn-0x50026b7782008e43-part3
 wwn-0x502b2a201d1c1b1a
 wwn-0x502b2a201d1c1b1a-part1

2: modify launch_uos.sh add 00:15.0 passthru

>  echo "8086 5aa8" > /sys/bus/pci/drivers/pci-stub/new_id
 echo "0000:00:15.0" > /sys/bus/pci/devices/0000:00:15.0/driver/unbind
 echo "0000:00:15.0" > /sys/bus/pci/drivers/pci-stub/bind
-s 16,passthru,0/15/0 \
  1. boot uos by
    sh launch_uos.sh -V 1
>  root@clr-b175de7560474f7ab7d023f5be776baf ~ # ls /dev/disk/by-id/
> ata-@c_A@___E_9__f_____ÃH_c_L___ga
>  ata-@c_A@___E_9__f_____ÃH_c_L___ga-part1
>  usb-SanDisk_Cruzer_Glide_3.0_4C530001130415101233-0:0
>  usb-SanDisk_Cruzer_Glide_3.0_4C530001130415101233-0:0-part1
>  virtio-ACRN--67BB-443E-519B
>  virtio-ACRN--67BB-443E-519B-part1
>  virtio-ACRN--67BB-443E-519B-part2
>  virtio-ACRN--67BB-443E-519B-part3
  1. reboot uos
> root@clr-b175de7560474f7ab7d023f5be776baf ~ # ls /dev/disk/by-id/
> ata-FORESEE_120GB_SSD_H46092R000318
>  ata-FORESEE_120GB_SSD_H46092R000318-part1
>  usb-SanDisk_Cruzer_Glide_3.0_4C530001130415101233-0:0
>  usb-SanDisk_Cruzer_Glide_3.0_4C530001130415101233-0:0-part1
>  virtio-ACRN--67BB-443E-519B
>  virtio-ACRN--67BB-443E-519B-part1
>  virtio-ACRN--67BB-443E-519B-part2
>  virtio-ACRN--67BB-443E-519B-part3
>  wwn-0x502b2a201d1c1b1a
>  wwn-0x502b2a201d1c1b1a-part1
>  sometimes you will get the below info:
>  root@clr-b175de7560474f7ab7d023f5be776baf ~ # ls /dev/disk/by-id/
>  usb-SanDisk_Cruzer_Glide_3.0_4C530001130415101233-0:0
>  usb-SanDisk_Cruzer_Glide_3.0_4C530001130415101233-0:0-part1
> *usb-Sony_Storage_459C84140151-0:0
>  usb-Sony_Storage_459C84140151-0:0-part1*
>  virtio-ACRN--67BB-443E-519B
>  virtio-ACRN--67BB-443E-519B-part1
>  virtio-ACRN--67BB-443E-519B-part2
>  virtio-ACRN--67BB-443E-519B-part3

Expected result:
The id is same with sos and don't change

Actual result:
The id is random

Update README

We should update the README file with a Quickstart, license and Contribution Guideline section.

I have added easy setup files in this issue. If that issue is somewhat acceptable, I can expand and contribute to the README.

Goals

  • Use standard tools (no handwritten bash scripts)
  • Use idioms provided by docker e.g. .env file to pass some environment variables
    • This will assist in passing proxy environment variables in corporate settings

Errors in hypercall.h API documentation

Two problems:

  1. doxygen comments desribing hcall_get_cpu_pm_state are wrong (looks like a copy/paste from
    another function). Needs a correct description of what it does, and description of each parameter.
    Also, delete the blank line after the comment and the function prototype. Here's how it currently
    appears:
/**
 * @brief Switch VCPU state between Normal/Secure World.
 *
 * @param vcpu Pointer to VCPU data structure
 *
 * @return 0 on success, non-zero on error.
 */

int64_t hcall_get_cpu_pm_state(struct vm *vm, uint64_t cmd, uint64_t param);
  1. In the next function ( hcall_world_switch ), the vcpu parameter doc needs to be spelled correctly (change @param VCPU to @param vcpu )

Update all license headers in the code with simplified SPDX identifier

We should replace the license text for BSD-3 Clause licensing by the following:

/*
* Copyright (C) <year(s)> Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/

Multiple Copyright lines can be used to acknowledge all copyright holders.

We, of course, also need to retain other licenses where they exist.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.