Commit Graph

73 Commits

Author SHA1 Message Date
Zhao Yakui 13c44f5661 acrn/dm: Check device file of /dev/acrn_hsm to determine the path of offline VCPU
For the upstream purpose the device file of /dev/acrn_vhm is renamed
to /dev/acrn_hsm. Correspondingly the path of offline CPU is also changed.
So the device file of /dev/acrn_hsm is checked to configure the path
of ooffline VCPU.

Tracked-On: projectacrn/acrn-hypervisor#2356
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2019-01-18 11:04:22 +08:00
Feng Tang ed9b533747 DM: sos_bootargs: Add panic_print parameter to help debugging
Adding this parameter so that it could provide more info when
kernel panic happens. And this has almost no overhead as it only
uses several existing kernel APIs.

The 0x1f is a bitmask for type of info to be dumped, and it means
it will print task/memory/timer/lock/ftrace info when panic happens.

Tracked-On: #2330
Signed-off-by: Feng Tang <feng.tang@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-01-14 16:19:59 +08:00
Zhao Yakui d094a39a7f DM: Try to load audio mediator BE driver before starting UOS
Currently whether audio works in virtio mediator or pass-through mode can be determined
by checking the device file of vbs_k_audio

But before the completion of loading audio virtio-BE module, the device file of /dev/vbs_k_audio
doesn't exist. In such case in course of loading UOS, the incorrect work mode is selected
for audio device (passthru instead of mediator). This is incorrect

Tracked-On: projectacrn/acrn-hypervisor#2247
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Alek Du <alek.du@intel.com>
2019-01-09 19:20:10 +08:00
Yan, Like a80f08ebad dm: add launch_uos.args sample file for AaaG
A sample args file is added, which will be linked to /usr/share/acrn/conf/add/[vmname].args at integration time.
Because it is needed for AaaG one-key startup enabled build.

Tracked-On: #2040
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-12-13 09:09:41 +08:00
Jie Deng ed1c576d08 dm: pass mac seed not to use vm name
Physical NIC mac address is used for generate UOS mac address.
This patch uses a new parameters to pass this information
instead of vm name.

Tracked-On: #1987

Signed-off-by: Jie Deng <jie.deng@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-12-12 13:22:18 +08:00
Long Liu c5d827ab1f ACRN: Add runC container sample config file
This patch adds the runC container config file, we will run acrn-dm
in runC container, and set acrn QoS parameters based on runC.
In the config file we mount SOS root directory to the container and
disable network/mount/ipc namespace.

Tracked-On: projectacrn/acrn-hypervisor#2020
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-12 09:11:52 +08:00
Minggui Cao e2d093989d DM: remove ignored pci device from SOS bootargs
now hypervisor will support to hide ignored PCI device from SOS,
it need not modify SOS PCI driver to support this feature.

Tracked-On: #1923
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-03 13:20:35 +08:00
Pawel Furtak 9bf7dd5ddc Enable audio virtualization for AaaG
Based on existence of /dev/vbs_k_audio file
launch AaaG with proper audio virtualization mode

Signed-off-by: Pawel Furtak <pawel.furtak@intel.com>
Tracked-On: #1915
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2018-11-30 15:16:16 +08:00
Tomas Winkler 031191dbcd dm: apl-mrb: launch_uos: remove mei debug flags
Tracked-On: #1849
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-21 15:17:05 +08:00
Zhao Yakui 66f133bf45 DM: Fix the typo error in checking the /dev/vbs_ipu file
The /dev/vbs_ipu is used by the backend driver of IPU mediator on SOS kernel
If the file of /dev/vbs_ipu exists, it indicates that IPU works in mediator mode.
Other it will fall back to the pass-through mode.
But the commit 969f7cf071 doesn't check the file of /dev/vbs_ipu correctly.
It should be -e instead of -f.

Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Wu, BinBin <binbin.wu@intel.com>
2018-11-09 11:26:59 +08:00
Minggui Cao b58817273d DM: add interrupt storm monitor params in cmdline
To support expose "interrupt storm monitor" params setting to user;
it is easy to adjust the params in launch UOS script.

Tracked-On: #1724
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-08 14:43:05 +08:00
Binbin Wu 78dd92e4ed DM: sos_bootargs: split sos_bootargs into multiple lines
Difficult to review the changes of sos_bootargs when the args is a single line.
Split sos boot args into multiple lines.

Tracked-On: #1730
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2018-11-07 09:21:13 +08:00
Xinyun Liu ad1e2ab678 DM/sos_bootargs: remove unused parameters for graphics
remove these options from legacy release:

i915.tsd_init=7 i915.tsd_delay=2000
i915.enable_preemption=1 i915.context_priority_mode=2

Tracked-On: #1697
Signed-off-by: Xinyun Liu <xinyun.liu@intel.com>
Reviewed-by: He, Min <min.he@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-11-06 13:13:36 +08:00
Zhao Yakui 969f7cf071 DM:Check the device file of /dev/vbs_ipu to determine IPU mode
The /dev/vbs_ipu is used as the backend driver of IPU mediator on SOS kernel.
If the file of /dev/vbs_ipu exists, it indicates that IPU works in mediator mode.
Other it will fall back to the pass-through mode.

Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-11-05 14:45:38 +08:00
Minggui Cao 74a5eec3a7 DM: change SOS bootargs console ttyS0 to ttyS2
change it to match with release version.

Tracked-On: #1690
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-11-02 13:00:54 +08:00
santoshkumar b0cac0e67c Samples:Added the Kernel console parameter in boot.
For GP-MRB ACRN using ttyS0 as console,
since this is release bootargs file so ttyS0
will be skipped in booting but needed kernel
console ttyS2 in bootargs to get the Kernel console.

Tracked-On: #1655

Signed-off-by: santoshkumar <santoshkumar.laxminarayan.rai@intel.com>
2018-11-01 09:49:40 +08:00
Minggui Cao 6266dd014a DM: correct memory allocation size for UOS
on 8GB MRB: cat /proc/meminfo|head -n 1|awk '{print $2}'
it is: 7993388, it is not 8000000, so set it compare
with 7500000, then it can allocate 6GB to UOS.

Tracked-On: #1657
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-10-31 09:08:13 +08:00
Chang Rebecca Swee Fun 7169248bf0 sos_bootargs_release.txt: enable guc firmware loading
Change kernel boot cmdline to load GuC firmware for SOS.
We want to enable GuC and HuC in Service OS and this is
an effort to enable use cases across all boards.

Tracked-on: #1638

Proposed-by: Charles, Daniel <daniel.charles@intel.com>
Signed-off-by: Chang, Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
2018-10-30 12:48:31 +08:00
Rebecca Chang Swee Fun fdf1a33086 sos_bootargs_debug.txt: enable guc firmware loading
Change kernel boot cmdline to load GuC firmware for SOS.
We want to enable GuC and HuC in Service OS and this is
an effort to enable use cases across all boards.

Tracked-On: #1638 
Proposed-by: Charles, Daniel <daniel.charles@intel.com>
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
2018-10-30 12:48:31 +08:00
Zhi Jin ad1ef7ba1b samples: enable pstore via the sos kernel cmdline
Enable pstore via the sos kernel cmdline, as ABL doesn't
reserve memory and pass parameters for pstore.

Tracked-On: #1024
Signed-off-by: Zhi Jin <zhi.jin@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-10-25 13:43:25 +08:00
Jason Chen CJ 19abb419c6 launch_uos.sh: make sure cpu offline by retry
if acrnd or acrn_guest service enabled, launch_uos.sh will be called
early time during system boot up, while a pci driver module may be
insmod and disable cpu hotplug in short time, which could make
cpu offline fail, we need check it to make sure cpu offline real happen
before hypercall to disable vcpu.

Tracked-On: https://github.com/projectacrn/acrn-hypervisor/issues/1584
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-10-25 13:37:43 +08:00
Signed-off-by: Aviad Nissel 7ca1a7de7d dm: launch_uos.sh add virtio_mei mediator
Detect if SOS kernel mei drivers supports virtualization,
via driver hbm version 2.2
If yes use virtio_mei mediator for the mei device
otherwise fallback to passthrou mode.
Note that HBM version is not sufficient identification

Tracked-On: #1536
Signed-off-by: Aviad Nissel <aviad.nissel@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2018-10-23 11:40:15 +08:00
Shuo Liu 268a9f1453 [REVERTME] dm: script: disable xHCI runtime PM to WA USB role switch hang issue
When do USB role switch between host and device mode, we hit hang issue.
It might be caused by accessing suspended xHCI during that. This issue
need to be root caused later in xHCI driver.

This is a workaround solution, which will be reverted when got a fix.

Tracked-On: #1516
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2018-10-19 22:34:40 +08:00
Binbin Wu 19e0bed593 script: re-enable audio passthru
This reverts partial of commit: 9bf5aafe "script: workarounds for UOS of
4.19-rc kernel", since our fixing patch for kernel crash when audio passthru
is ready.

Tracked-On:#1461
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-16 13:30:07 +08:00
Min He 57abc88b15 script: re-enable PVMMIO ppgtt update optimization for GVT-g
This reverts partial of commit: 9bf5aafe "script: workarounds for UOS of
4.19-rc kernel", since our fixing patch for the PVMMIO ppgtt update bug
is ready.
For the remaining audio pass-through workaround, we still need to keep
it until it's fixed.

Tracked-On: #1413
Signed-off-by: Min He <min.he@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-10-12 13:21:37 +08:00
Zhao Yakui 9114fbb318 Revert "DM: Disable plane_restriction on 4.19 kernel"
This reverts commit 072e77e746 so that
plane_restriction can be enabled.

Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: He, Min <min.he@intel.com>
2018-10-12 10:58:06 +08:00
Min He 9bf5aafebe script: workarounds for UOS of 4.19-rc kernel
Currently there're two issues which prevent UOS with 4.19-rc kernel from
booting:
1. GVT-g PVMMIO ppgtt update optimization causes GPU hang
2. audio driver causes kernel panic

This patch is a temporary workaround to prelimarily support 4.19-rc UOS.
And it will be reverted after above two issues are fixed.

Tracked-On: #1413
Signed-off-by: Min He <min.he@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-10-09 15:36:23 +08:00
Minggui Cao 390861a04c DM: increase UOS memory size for MRB
on MRB, if memory >= 8GB, will allocate 6GB to UOS;
for MRB now just runs one UOS with more workload.

Tracked-On: #1369
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-09-30 14:14:08 +08:00
Zhao Yakui 072e77e746 DM: Disable plane_restriction on 4.19 kernel
Now the plane_restriction is not ready on 4.19-rcX kernel. So it will be
disabled temporally.
This change is only used to disable the plane_restriction for UOS when UOS
based on 4.14 kernel is launched in 4.19 sos kernel.

V1->V2: Commit log adds the description that this change is used to disable
the plane_restriction in 4.14 UOS kernel.

Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: He, Min <min.he@intel.com>
2018-09-30 10:54:45 +08:00
Zhao Yakui 5a64af2066 DM: Use the pass-through mode for IPU on 4.19 kernel
Now the IPU mediator driver is not ready on 4.19-rcX kernel. So the IPU will
fallback to pass-trhough mode temporally and be assigned to guest directly.
After the IPU mediator driver is ready, the ipu_passthrough flag will be
changed to zero.

V1-V2: Describe the issue clearly in commit log.

Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Wu, Binbin <binbin.wu@intel.com>
2018-09-30 10:54:45 +08:00
Zhao Yakui 38099e4b78 DM: Add the boot option to avoid loading dwc3_pci USB driver
The latest kernel has some issues when unloading dwc3_pci USB driver.
It will cause the kernel panic when unloading dwc3_pci driver in order to
assign USB controller to guest.
So the dwc3_pci won't be loaded.

Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Wu, Binbin <binbin.wu@intel.com>
2018-09-30 10:54:45 +08:00
Xiaoguang Wu 688cddac6a DM USB: xHCI: enable USB xHCI emulation in LaaG and AaaG.
Change launch_uos.sh to enable USB xHCI full emulation support.

Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Liang Yang <liang3.yang@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Tracked-On: #1242
2018-09-19 10:47:10 +08:00
Zhang, wenling f355cdf6f4 Revert "DM USB: xHCI: enable USB xHCI emulation in LaaG and AaaG."
This reverts commit c03ea2d365.
2018-09-17 15:13:05 +08:00
Xiaoguang Wu c03ea2d365 DM USB: xHCI: enable USB xHCI emulation in LaaG and AaaG.
Change launch_uos.sh to enable USB xHCI full emulation support.

Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Liang Yang <liang3.yang@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Tracked-On: #1242
2018-09-14 13:32:34 +08:00
Jiangbo Wu c6b7940bf9 samples: Add AliOS as guest launch option
Add sample script launch option to launch AliOS as a guest. And it reuse launch
android function due to the same configurations.

Tracked-On: projectacrn/acrn-hypervisor#1173
Signed-off-by: Jiangbo Wu <jiangbo.wu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Jiangbo Wu <jiangbo.wu@intel.com>
2018-09-10 11:27:09 +08:00
Jiangbo Wu a7de5a1940 samples: Add tap name as launch function parameter
launch two clearlinux will use the same 'LaaG' as tap interface name. Add tap
name as parameter that will meet two UOS using different tap interface.

Tracked-On: projectacrn/acrn-hypervisor#1194
Signed-off-by: Jiangbo Wu <jiangbo.wu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Jiangbo Wu <jiangbo.wu@intel.com>
2018-09-10 11:27:09 +08:00
Zhi Jin 96809c4a44 DM NPK: enable the NPK virtualization for AaaG
Enable the NPK virtualization for AaaG if the NPK device/driver
is present.

Tracked-On: #1138
Signed-off-by: Zhi Jin <zhi.jin@intel.com>
Reviewed-by: Chen Gang <gang.c.chen@intel.com>
2018-09-04 10:07:56 +08:00
Wei Liu 852f613fe3 samples: remove extra option for dm
remove extra "-l com1,stdio" option for dm

Tracked-On: #1123
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-08-31 09:15:49 +08:00
Yew, Chang Ching 17ef5076a4 ipu: virtio-ipu4 as default IPU DM
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
Reviewed-by: Edwin Zhai <edwin.zhai@intel.com>
Reviewed-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-08-21 18:53:53 +08:00
Liang Yang 6988a17027 DM USB: xHCI: Change the default USB xHCI support to pass through.
So far, the xHCI mediator does not support USB HUB over usb pmapper. But
there are some USB touch devices integrated internal USB HUB, then
cause such touch models can't be supported. Will consider to re-enable
xHCI mediator by default once HUB support related patches get merged in
the near future.

Signed-off-by: Liang Yang <liang3.yang@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Binbin Wu<binbin.wu@intel.com>
2018-08-21 11:59:31 +08:00
Wei Liu c8c0e10a90 HV: enlarge the CMA size for uos trusty
sometimes, there would be CMA allocate failue when doing cycle rebooting android uos.
as there are different CMA clients, and android trusty need 16M contiguous memory,
32M CMA size may make this failure easy to come out.
This patch is to enlarge the CMA size to 64M, which mitigate the failure.

Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-08-20 11:15:10 +08:00
Liang Yang d82a86e648 DM USB: xHCI: enable USB xHCI emulation in LaaG and AaaG.
Change launch_uos.sh to enable USB xHCI full emulation support.

Signed-off-by: Liang Yang <liang3.yang@intel.com>
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Binbin Wu<binbin.wu@intel.com>
2018-08-17 11:18:23 +08:00
Zhao Yakui 99e8997504 DM: Add boot option of "i915.enable_guc=0" to disable Guc on UOS new kernel
The guc boot option is refined on the new linux kernel. The boot option of
"i915.enable_guc=0" should be added in order to disable Guc instead of using
"enable_guc_loading/submission". But in order to use the same boot option on
multi kernel, both of them are kept.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Binbin Wu<binbin.wu@intel.com>
2018-08-16 16:28:17 +08:00
Zhao Yakui 36d5fdbf04 DM/Samples: Add the boot option of "i915.enable_guc=0" to disable guc on SOS new kernel
The guc boot option is refined on the new linux kernel. The boot option of
"i915.enable_guc=0" should be added in order to disable Guc instead of using
"enable_guc_loading/submission". But in order to use the same boot option on
multi kernel, both of them are kept.

V1->V2: Add the option on APL-NUC platform

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Binbin Wu<binbin.wu@intel.com>
2018-08-16 16:28:17 +08:00
ailin,yang f11b2635c5 remove 2M hugepages
remove 2M hugepages setting here because it will not use any more. 
# make sure there is enough 2M hugepages in the pool
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
2018-08-13 14:24:10 +08:00
Minggui Cao af7943c5e6 DM: check more in guest service & launch script
some exceptions can happen if westnon or network name service
not started before launch uos guest, like gvt and network exceptions,
which can cause SOS reboot. so add the dependency.

add data partiton check in launch script, for it can be called in every
clearlinux platform.

Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-08-08 16:00:56 +08:00
Jason Chen CJ a8e9d83e59 samples: change WIFI BDF to 3:0:0
SBL used to use 4:0:0 for WIFI device BDF, now it change back to 3:0:0

Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-08-01 12:46:25 +08:00
Minggui Cao d40a6b9e93 DM: add service to support auot boot UOS
add acrn_guest.service, and modify makefile to install it
into root fs.

Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Like Yan <like.yan@intel.com>
2018-07-27 16:56:07 +08:00
Minggui Cao 3cab92655d DM: add param: -V 5 to auto check/boot UOS image
it can auto check android image, if exists, then launch it;
if not, it will try to luanch clearlinux. it can be used by
acrn_guest.service to auto boot UOS.

Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-07-27 10:45:13 +08:00
Jason Chen CJ e71a0887a0 samples: offline SOS cpus before launch uos
offline SOS cpus except BSP to let them free for UOS cpu allocation

Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-25 17:18:14 +08:00