Commit Graph

151 Commits

Author SHA1 Message Date
Xie, nanlin 97c9b24030 acrn-config: Reorg config tool folder
Remove vm_configs folder and move all the XML files and generic code example into config_tools/data

Tracked-On: #5644
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2021-01-27 11:08:28 +08:00
Wei Liu 72dab3f9dc acrn-config: refactor xmls/samples folder for acrn-config
Add xmls/samples folders under misc/vm_configs, and make soft link for
them.

Tracked-On: #5077
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-28 10:46:27 +08:00
Vijay Dhanraj a81f6e2c62 doc: Enabling ACRN on top of QEMU/KVM
Tracked-On: #3198
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2020-05-29 09:10:42 -07:00
Tw 01802e9134 sample: add log support when launching Xenomai
Add log related stuff for more debug information.

Tracked-On: #4514
Signed-off-by: Tw <wei.tan@intel.com>
2020-04-27 10:04:00 +08:00
Tw e69690111a sample: don't restore passthrough devices on exit by default on Xenomai
Passthroughed devices won't be restored back to SOS once launch
script exits by default. However you could revert this behavior
by specifying '-r' parameter if you want.

Tracked-On: #4514
Signed-off-by: Tw <wei.tan@intel.com>
2020-04-27 10:04:00 +08:00
Tw e51d12d8cb sample: add sample script for launching xenomai RTVM
Add a launch script for xenomai RTVM.

Tracked-On: #4514
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2020-04-08 11:49:27 +08:00
fangfang.shen 7f57e64e10 Delete pass-through audio to WaaG in default.
For "Split Device Model", pass-through PCI will be implemented in HV,
"reset" param is added into DM cmdline to ensure PCI device's status before launching VM.
WaaG will fail to boot if adding pass-through audio in default,
because current audio card's reset function isn't supported on WHL platform.

Tracked-On: #4397

Signed-off-by: fangfang.shen <fangfang.shen@intel.com>
2020-02-12 13:08:23 +08:00
Kaige Fu e9b035bab6 DM: samples: Correct parameter of intel_pstate
The parameter of intel_pstate should be 'disable' instead of 'disabled'.
This patch fixes it.

Tracked-On: #4094
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-11-12 22:04:51 +08:00
lirui34 70312bfb7e dm: Add licenses to the scripts.
Add licenses to the scripts:
```
devicemodel/samples/apl-mrb/launch_uos.sh
devicemodel/samples/apl-up2/launch_uos.sh
devicemodel/samples/nuc/launch_hard_rt_vm.sh
devicemodel/samples/nuc/launch_uos.sh
devicemodel/samples/nuc/launch_vxworks.sh
devicemodel/samples/nuc/launch_win.sh
devicemodel/samples/nuc/launch_zephyr.sh
hypervisor/scripts/genld.sh
```

Tracked-On: #4061
Signed-off-by: lirui34 <ruix.li@intel.com>
2019-11-11 15:35:19 +08:00
fuzhongl 98dc755ef1 dm: NVME bdf info update on KBLNUC7i7DNH
Wrong NVMe bdf info of KBLNUC7i7DNH is modified by mistake; so change it back.

Tracked-On: #3827
Reviewed-by: binbin.wu@intel.com

Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2019-10-18 15:33:46 +08:00
fuzhongl c3eb0d7fad dm: switch to launch RT_LaaG with OVMF by default
The default script is for nvme passthrough to RT_LaaG; you can change it
to sata or using virtio_blk

Tracked-On: #3575
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
Reviewed-by: binbin.wu@intel.com; kaige.fu@intel.com
2019-10-12 15:54:26 +08:00
Yuan Liu a4d562daa0 dm: Add Oracle subsystem vendor ID
After Windows 10, version 1607, the cross-signed drivers are forbiden
to load when secure boot is enabled.

Details please refer to
https://docs.microsoft.com/en-us/windows-hardware/drivers/install/kernel-mode-code-signing-policy--windows-vista-and-later-

That means the kvm-guest-drivers-windows can't work when secure boot enabled.
So we found another windows virtio FE drivers from Oracle to resolve this issue
but have to change another subsystem vendor ID for the virtio BE services.

This patch introduces a new DM CMD line "--windows" to launch WaaG with Oracle virtio devices including
virtio-blk, virtio-net, virtio-input instead Redhat. It can make virtio-blk, virtio-net and virtio-input
devices work when WaaG enabling secure boot.

Tracked-On: #3583
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-10-11 13:20:19 +08:00
Conghui Chen 0ea12a45d4 dm: script: remove guest cpu number
Remove the '-c' option from all scripts as it has been removed from
dm code.

Tracked-On: #3663
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-09-24 11:58:45 +08:00
Geoffroy Van Cutsem f5c8fbb281 DM: update launch scripts to use OVMF.fd directly from the rootfs
* Update the launch scripts provided as examples on how to launch a Zephyr,
VxWorks or Windows User VM to directly use the 'OVMF.fd' bios file installed
by default in '/usr/share/acrn/bios/'
* Remove the OVMF.fd that was kept under 'doc/tutorials' (no longer needed)
* Adapt the tutorials to reflect this change

Tracked-On: #3673
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-09-18 09:10:32 +08:00
Geoffroy Van Cutsem d3e564334a DM: make LaaG launch script use the OVMF.fd from the Service VM
Adjust the 'launch_uos.sh' script used to start a LaaG User VM to user the
OVMF.fd bios file installed under /usr/share/acrn/bios. It currently points
at a file in the local folder but neither our instructions nor our installation
script file puts it in this location. That results in an error when you try
to launch it.

Tracked-On: #3673
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-09-17 09:45:12 +08:00
Minggui Cao 8578125fed DM: add power off by vuart setting to launch script
1. for post-launch general VM, like LaaG, the vUART is emulated in DM,
so the power off control channel is:
  acrn-dm:pty[master <-> salve] <--> acrn-dm:vUART <--> UOS:vUART

2. for RTVM, like RT-Linux, the vUART is emulated in hypervisor layer,
so the control channel is:
   acrn-dm <--> SOS:/dev/ttyS1 <--> Hypervisor <--> UOS:vUART.

So the settings in launch script are different.

Tracked-On: #3564
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-09-11 16:43:22 +08:00
Yin Fengwei e38e026332 script: launch_uos: Give right pm notify channel
We seperate the guest power event notify channel out. And now
it's required to give the guest power event notify channel
explicitly. Update the sample launch script to have correct
parameters.

Tracked-On: #3564
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2019-09-11 13:27:10 +08:00
Victor Sun 4709554af9 DM: set data partition of apl-up2 to mmcblk0p1
mmcblk0p3 will be reserved for sos rootfs, so use mmcblk0p1 for data partion.

Tracked-On: #3214

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-08-22 09:10:38 +08:00
fuzhongl c7f569da30 HV: switch launch LaaG with OVMF by default
OVMF will open source for V1.2, so enable launch LaaG with OVMF.

Tracked-On: #3506
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2019-08-19 08:53:39 +08:00
Yuan Liu f1b71d983a dm: expand default WaaG memory to 4G
This patch is used to expand WaaG memory from 2G to 4G in launch script.

Tracked-On: #3576
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-08-14 16:10:03 +08:00
Conghui Chen b592404f48 script: set virtio-console BE to stdio for LaaG
Set virtio-console BE to stdio for LaaG. Remove 'com1' but still keep
'console=ttyS0' in Laag kernel cmdline.
'console=ttyS0' means LaaG will use ttyS0 (0x3F8) as a console port, and
during bringup, it will access port ttyS0. When the same port is added
to hypervisor configuration file as a console port, the output will be
captured by hypervisor console, and can switch by "vm_console <vm_id>".

Tracked-On: #3370
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-07-10 09:45:29 +08:00
Yan, Like 81f9837e8a Revert "dm: add "noapic" to rt-linux kernel parameters"
This reverts commit c42b41fe2b.
Kernel will stay in xapic mode with this boot arg, lapic won't be passthru, so revert.

Tracked-On: #3227
Signed-off-by: Yan, Like <like.yan@intel.com>
2019-07-03 13:18:50 +08:00
Yan, Like c42b41fe2b dm: add "noapic" to rt-linux kernel parameters
This commit adds "noapic" boot option to rt-linux, to skip IOAPIC probe.

Tracked-On: #3227
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-06-28 09:36:41 +08:00
Binbin Wu ad6f54b99a dm: sample: remove deprecated sos_bootargs files
SOS bootargs is specified in vm_configurations.h in different scenarios.
The files in devicemodel/samples/<board>/sos_bootargs_*.txt are not used anymore.
Remove these deprecated files to avoid confusion.

Tracked-On: #3214
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-06-27 15:29:21 +08:00
Long Liu 7176e813ed ACRN: dm: Modify the runC.json for NUC.
The path modify the configuration for the runC container. There have
three changes for the configuration.
1、args [ "sh" ]: this is an example parameter and when the VM is started,
the parameter will be replaced by the launch_UOS script.
2、The linux capabilities will guarantee the Acrn-dm have enough capabilities
to run in container. For more infomation about the capalility you can refer
http://man7.org/linux/man-pages/man7/capabilities.7.htm
3、Move the rootfs to the parent directory, so all the container can share
the same rootfs.

Tracked-On: projectacrn#2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-06-26 15:22:33 +08:00
Yan, Like 0a6baaf4d3 dm: samples: use stdio as vxworks console by default
Current launch script leaves stdio to OVMF console and, vxworks console to pty, so users
need to use additional tool like minicom to connect to pty device to use vxWorks.

To be more convinient, this commit changes the vxWorks to use the stdio by default, and OVMF
is not availabe by default.

Tracked-On: #3069
Signed-off-by: Yan, Like <like.yan@intel.com>
2019-06-22 21:41:40 +08:00
Gao Junhao efccdd22a0 dm: add virtio-rnd device to command line
When FE virtio devices work in polling mode, sshd.service can't start
normally and blocks at generating random bytes. When reading from
the random source, getrandom() blocks caused by no random bytes.

Tracked-On: #3268
Signed-off-by: Gao Junhao <junhao.gao@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2019-06-18 09:56:33 +08:00
Long Liu 48877362c6 ACRN: DM: Add new options for NUC launch_uos script.
The patch adds new argument for launch_uos script for NUC.
In the patch add "-C" parameter for launch_uos script. When launch
the script with the parameter the ACRN-dm will be launched in the
runC container. For more information about this please refer to
ACRN-dm QoS document.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Binbin Wu binbin.wu@intel.com
Reviewed-by: Geoffroy Van Cutsem geoffroy.vancutsem@intel.com
2019-06-17 19:23:44 +08:00
Kaige Fu 22f24c229b DM: Samples: Enable VxWorks as hard-rt VM
This patch adds --lapic_pt option to launch VxWorks as hard-rt VM.

Tracked-On: #3069
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-06-14 15:47:26 +08:00
Yuan Liu 66943be353 dm: enable audio passthrough device.
Enable audio device by default on WaaG

Tracked-On: #3257
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-06-14 09:24:56 +08:00
Minggui Cao 5ab098eae2 DM: add disk-logger configure in launch script
add disk-logger setting in nuc/up2 launch script files.

Tracked-On: #3012
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2019-06-13 13:06:51 +08:00
ZhangYun 610ad0ced8 dm: update uos path in launch_hard_rt_vm.sh
Tracked-On: #3188
Signed-off-by: ZhangYun <yunx.zhang@intel.com>
2019-05-29 09:35:19 +08:00
Tw 321e4f1300 DM: add virtual hostbridge in launch script for RTVM
Hostbridge is necessary for passing kernel pci subsystem initialization
sanity check which is located in pci_sanity_check(). It will check
whether a host bridge exists.

BTW, set rtvm flag explicitly.

Tracked-On: #3152
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-05-23 14:07:05 +08:00
Wei Liu bb48a66b96 dm: refine the passthrough devices with dictionary
As vm config tool will override the passthrough devices if run on
different hw, and it will take a lot of work to search and
replace the passthrough device.
This patch refine the passthrough devices that tools to overwrite.

Tracked-On: #3127
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2019-05-17 11:06:31 +08:00
lijianpi d9717967d7 dm:add grep -w option for uos launch sh
for vm_name  with vxworks_vm1  or zephyr_vm1 or vm1
grep "vm1" will match three of them, add -w option fix this issue
Tracked-On:#3081
Signed-off-by: zhangyun <yunx.zhang@intel.com>
2019-05-14 09:15:29 +08:00
Jian Jun Chen 4c28a37440 dm: add sample script to launch Windows as guest
This patch adds one sample script to launch Windows as guest.

Tracked-On: #3099
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-05-13 14:43:07 +08:00
Kaige Fu 0cadc16b8b DM: Add one sample script to launch VxWorks as guest
This patch add one sample script to launch VxWorks as guest.

Tracked-On: #3069
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-05-07 11:40:35 +08:00
Minggui Cao 4e289341ff DM: add logger params in launch script for NUC&UP2
add logger_setting params in launch_uos.sh for NUC & UP2;
then the logger system can work; by default console logger
is enabled.

Tracked-On: #3012
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-05-05 19:13:07 +08:00
Yuan Liu 8796ded21b DM USB: fix SWWDT_UNHANDLED issue
add a delay for usb in launch_uos.sh

Tracked-On: #2922
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-04-11 13:21:30 +08:00
Yuan Liu b570755fd0 Domain id and name added to launch_uos.sh
For multiple guest os and particular audio features support domain id
and name is required.

Tracked-On: #2924
reviewed-by: Yu Wang <yu1.wang@intel.com>
reviewed-by: Yakui zhao <yakui.zhao@intel.com>
reviewed-by: Binbin Wu <binbin.wu@intel.com>
Signed-off-by: Marcin Pietraszko <marcin.pietraszko@intel.com>
2019-04-11 11:18:57 +08:00
Jie Deng 00dd26b081 dm: remove "acrn_" prefix from tap name
Some projects based on ACRN don't want tap name to contain "acrn_"
prefix. This patch removes that prefix.

Tracked-On: #2509
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-04-09 10:59:45 +08:00
Kaige Fu efad496352 DM: Add -A to support S5 of hard rt vm
This patch add '-A' to support S5 of hard rt vm.

Tracked-On: #2865
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-03-29 16:17:44 +08:00
Long Liu 9f2342220d ACRN: dm: Enable mount namespace for container.
The patch adds mount namespace for the container. Without the patch
when we destroy the container, there still have mountinfo for the
container. This is one workaroud for runC bug. If the mount namespace
is disabled, when try to mount host "/" to container "/", there will
cause the issue. Detail discussion as following link.
"https://groups.google.com/a/opencontainers.org/forum/#!searchin/
dev/mount$20namespace%7Csort:date/dev/p10bq-kXODk/obkqBRdxCQAJ"

After enable mount namespace, some small performance imapcts for
specific mediator, likes USB. Will keep monitor runc community,
and revert this patch once related runc patches get integrated.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-03-29 11:46:19 +08:00
Long Liu dde326ec6a Acrn: dm: Add new start parameter in sample args
The patch adds "-C" parameter in sample launch_uos.sh file to enable
launch Device-Model in runC container. The argments will be linked to
SOS /usr/share/acrn/add/vm1.args, and acrnd will use the it as default
start argument.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-03-29 11:46:19 +08:00
Tw 065e16d32e Makefile: make UP2 sample directory name consistent with board name
It makes more sense by aligning directory name with board name.

Tracked-On: #2760
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-03-14 11:57:05 +08:00
wenlingz 20249380d3 audio-mediator: load updated audio kernel modules
Audio kernel has updated name and add two new kernel modules from SOS
28100

Tracked-On: #2744
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2019-03-14 11:08:44 +08:00
Kaige Fu 694fca9c06 DM: Add sample script to launch zephyr as guest
This patch add one sample script to launch zephyr as guest.

Tracked-On: #2713
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
2019-03-12 09:59:06 +08:00
Long Liu 8a324060c1 ACRN: dm: Fix luanch UOS script "-d" parameter fail issue
Fix launch UOS script "-d" parameter fail issue

Tracked-On: #2659
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-03-01 20:23:46 +08:00
Long Liu 6865210493 ACRN: dm: Modify runC default rootfs directory
The patch changes runC container's default rootfs directory. In the patch
change the rootfs to runC bundle's parent directory. Because in ACRN we map
SOS rootfs to container so the rootfs is an empty directory, after move it to
parent directory all the container can share the same rootfs.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2019-02-25 20:24:22 +08:00
Long Liu 55cb777000 ACRN: dm: Add new capabilities for runC container
The patch adds more Linux capabilities for runC container. In ACRN runC
we will map native root directory to the container, when we launch UOS from
container it need more Linux capabilities to operate dev node. So add the
capabilities in runC configuration file.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2019-02-25 20:24:22 +08:00