From 96809c4a44aacbba2754df1cba1ca253e937e2c1 Mon Sep 17 00:00:00 2001 From: Zhi Jin Date: Fri, 24 Aug 2018 13:58:11 +0800 Subject: [PATCH] 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 Reviewed-by: Chen Gang --- devicemodel/samples/apl-mrb/launch_uos.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/devicemodel/samples/apl-mrb/launch_uos.sh b/devicemodel/samples/apl-mrb/launch_uos.sh index 7182dfb59..8b914a0f6 100755 --- a/devicemodel/samples/apl-mrb/launch_uos.sh +++ b/devicemodel/samples/apl-mrb/launch_uos.sh @@ -216,6 +216,14 @@ echo "8086 5abc" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:00:18.0" > /sys/bus/pci/devices/0000:00:18.0/driver/unbind echo "0000:00:18.0" > /sys/bus/pci/drivers/pci-stub/bind +# Check if the NPK device/driver is present +ls -d /sys/bus/pci/drivers/intel_th_pci/0000* 2>/dev/null 1>/dev/null +if [ $? == 0 ];then + npk_virt="-s 0:0:2,npk,8/24" +else + npk_virt="" +fi + boot_ipu_option="" if [ $ipu_passthrough == 1 ];then # for ipu passthrough - ipu device 0:3.0 @@ -286,7 +294,7 @@ else GVT_args='' fi - acrn-dm -A -m $mem_size -c $2$boot_GVT_option"$GVT_args" -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio \ + acrn-dm -A -m $mem_size -c $2$boot_GVT_option"$GVT_args" -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio $npk_virt\ -s 9,virtio-net,$tap \ -s 3,virtio-blk$boot_dev_flag,/data/$5/$5.img \ -s 7,passthru,0/15/0 \