diff --git a/devicemodel/samples/apl-mrb/launch_uos.sh b/devicemodel/samples/apl-mrb/launch_uos.sh index 96812b045..0d3411fe1 100755 --- a/devicemodel/samples/apl-mrb/launch_uos.sh +++ b/devicemodel/samples/apl-mrb/launch_uos.sh @@ -407,6 +407,13 @@ for i in `ls -d /sys/devices/system/cpu/cpu[1-99]`; do echo cpu$idx online=$online if [ "$online" = "1" ]; then echo 0 > $i/online + online=`cat $i/online` + # during boot time, cpu hotplug may be disabled by pci_device_probe during a pci module insmod + while [ "$online" = "1" ]; do + sleep 1 + echo 0 > $i/online + online=`cat $i/online` + done echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu fi done diff --git a/devicemodel/samples/nuc/launch_uos.sh b/devicemodel/samples/nuc/launch_uos.sh index c0455147c..3ce035188 100755 --- a/devicemodel/samples/nuc/launch_uos.sh +++ b/devicemodel/samples/nuc/launch_uos.sh @@ -37,6 +37,12 @@ for i in `ls -d /sys/devices/system/cpu/cpu[1-99]`; do echo cpu$idx online=$online if [ "$online" = "1" ]; then echo 0 > $i/online + # during boot time, cpu hotplug may be disabled by pci_device_probe during a pci module insmod + while [ "$online" = "1" ]; do + sleep 1 + echo 0 > $i/online + online=`cat $i/online` + done echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu fi done