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>
This commit is contained in:
Zhi Jin 2018-08-24 13:58:11 +08:00 committed by lijinxia
parent 9a276592fb
commit 96809c4a44
1 changed files with 9 additions and 1 deletions

View File

@ -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/devices/0000:00:18.0/driver/unbind
echo "0000:00:18.0" > /sys/bus/pci/drivers/pci-stub/bind 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="" boot_ipu_option=""
if [ $ipu_passthrough == 1 ];then if [ $ipu_passthrough == 1 ];then
# for ipu passthrough - ipu device 0:3.0 # for ipu passthrough - ipu device 0:3.0
@ -286,7 +294,7 @@ else
GVT_args='' GVT_args=''
fi 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 9,virtio-net,$tap \
-s 3,virtio-blk$boot_dev_flag,/data/$5/$5.img \ -s 3,virtio-blk$boot_dev_flag,/data/$5/$5.img \
-s 7,passthru,0/15/0 \ -s 7,passthru,0/15/0 \