Skip to content

Commit 8578125

Browse files
mgcaoacrnsi
authored andcommitted
DM: add power off by vuart setting to launch script
1. for post-launch general VM, like LaaG, the vUART is emulated in DM, so the power off control channel is: acrn-dm:pty[master <-> salve] <--> acrn-dm:vUART <--> UOS:vUART 2. for RTVM, like RT-Linux, the vUART is emulated in hypervisor layer, so the control channel is: acrn-dm <--> SOS:/dev/ttyS1 <--> Hypervisor <--> UOS:vUART. So the settings in launch script are different. Tracked-On: #3564 Signed-off-by: Minggui Cao <minggui.cao@intel.com> Reviewed-by: Binbin Wu <binbin.wu@intel.com>
1 parent eb5a57b commit 8578125

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

devicemodel/samples/nuc/launch_hard_rt_vm.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,19 @@ echo ${passthru_vpid["sata"]} > /sys/bus/pci/drivers/pci-stub/new_id
3030
echo ${passthru_bdf["sata"]} > /sys/bus/pci/devices/${passthru_bdf["sata"]}/driver/unbind
3131
echo ${passthru_bdf["sata"]} > /sys/bus/pci/drivers/pci-stub/bind
3232

33+
# for pm setting
34+
pm_channel="--pm_notify_channel uart "
35+
pm_by_vuart="--pm_by_vuart tty,/dev/ttyS1"
36+
37+
3338
/usr/bin/acrn-dm -A -m $mem_size -c $1 -s 0:0,hostbridge \
3439
-k /usr/lib/kernel/default-iot-lts2018-preempt-rt \
3540
--lapic_pt \
3641
--rtvm \
3742
--virtio_poll 1000000 \
3843
-s 2,passthru,0/17/0 \
3944
-s 3,virtio-console,@stdio:stdio_port \
45+
$pm_channel $pm_by_vuart \
4046
-B "root=/dev/sda3 rw rootwait maxcpus=$1 nohpet console=hvc0 \
4147
no_timer_check ignore_loglevel log_buf_len=16M \
4248
consoleblank=0 tsc=reliable x2apic_phys" hard_rtvm

devicemodel/samples/nuc/launch_uos.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ fi
9292
#logger_setting, format: logger_name,level; like following
9393
logger_setting="--logger_setting console,level=4;kmsg,level=3;disk,level=5"
9494

95+
#for pm by vuart setting
96+
pm_channel="--pm_notify_channel uart "
97+
pm_by_vuart="--pm_by_vuart pty,/run/acrn/life_mngr_"$vm_name
98+
pm_vuart_node=" -s 1:0,lpc -l com2,/run/acrn/life_mngr_"$vm_name
99+
95100
#for memsize setting
96101
mem_size=2048M
97102

@@ -103,7 +108,7 @@ acrn-dm -A -m $mem_size -c $2 -s 0:0,hostbridge \
103108
-s 4,virtio-net,tap0 \
104109
-s 7,virtio-rnd \
105110
--ovmf ./OVMF.fd \
106-
--pm_notify_channel power_button \
111+
$pm_channel $pm_by_vuart $pm_vuart_node \
107112
$logger_setting \
108113
--mac_seed $mac_seed \
109114
$vm_name

0 commit comments

Comments
 (0)