From 072e77e746f39e3f9cfc50de19d9d77572f3a30c Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Sat, 29 Sep 2018 14:11:35 +0800 Subject: [PATCH] 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 Reviewed-by: He, Min --- devicemodel/samples/apl-mrb/launch_uos.sh | 10 ++++++++-- devicemodel/samples/nuc/launch_uos.sh | 10 +++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/devicemodel/samples/apl-mrb/launch_uos.sh b/devicemodel/samples/apl-mrb/launch_uos.sh index 51c88e4d3..dd64ba481 100755 --- a/devicemodel/samples/apl-mrb/launch_uos.sh +++ b/devicemodel/samples/apl-mrb/launch_uos.sh @@ -385,12 +385,18 @@ for i in `ls -d /sys/devices/system/cpu/cpu[1-99]`; do fi done +gvt_args=0x070F00 +# this is the temporal solution before plane_restriction is ready on 4.19 +if [ "$kernel_version" = "4.19" ]; then +gvt_args=0 +fi + case $launch_type in 1) echo "Launch clearlinux UOS" - launch_clearlinux 1 3 "64 448 8" 0x070F00 clearlinux "LaaG" $debug + launch_clearlinux 1 3 "64 448 8" $gvt_args clearlinux "LaaG" $debug ;; 2) echo "Launch android UOS" - launch_android 1 3 "64 448 8" 0x070F00 android "AaaG" $debug + launch_android 1 3 "64 448 8" $gvt_args android "AaaG" $debug ;; 3) echo "Launch clearlinux UOS + android UOS" launch_android 1 2 "64 448 4" 0x00000C android "AaaG" $debug & diff --git a/devicemodel/samples/nuc/launch_uos.sh b/devicemodel/samples/nuc/launch_uos.sh index c0455147c..b2d56cb2e 100755 --- a/devicemodel/samples/nuc/launch_uos.sh +++ b/devicemodel/samples/nuc/launch_uos.sh @@ -1,5 +1,7 @@ #!/bin/bash +kernel_version=$(uname -r | awk -F. '{ printf("%d.%d", $1,$2) }') + function launch_clear() { vm_name=vm$1 @@ -41,4 +43,10 @@ for i in `ls -d /sys/devices/system/cpu/cpu[1-99]`; do fi done -launch_clear 1 1 "64 448 8" 0x070F00 clear +gvt_args=0x070F00 +# this is the temporal solution before plane_restriction is ready on 4.19 +if [ "$kernel_version" = "4.19" ]; then +gvt_args=0 +fi + +launch_clear 1 1 "64 448 8" $gvt_args clear