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>
This commit is contained in:
parent
eb5a57b780
commit
8578125fed
|
@ -30,6 +30,11 @@ echo ${passthru_vpid["sata"]} > /sys/bus/pci/drivers/pci-stub/new_id
|
|||
echo ${passthru_bdf["sata"]} > /sys/bus/pci/devices/${passthru_bdf["sata"]}/driver/unbind
|
||||
echo ${passthru_bdf["sata"]} > /sys/bus/pci/drivers/pci-stub/bind
|
||||
|
||||
# for pm setting
|
||||
pm_channel="--pm_notify_channel uart "
|
||||
pm_by_vuart="--pm_by_vuart tty,/dev/ttyS1"
|
||||
|
||||
|
||||
/usr/bin/acrn-dm -A -m $mem_size -c $1 -s 0:0,hostbridge \
|
||||
-k /usr/lib/kernel/default-iot-lts2018-preempt-rt \
|
||||
--lapic_pt \
|
||||
|
@ -37,6 +42,7 @@ echo ${passthru_bdf["sata"]} > /sys/bus/pci/drivers/pci-stub/bind
|
|||
--virtio_poll 1000000 \
|
||||
-s 2,passthru,0/17/0 \
|
||||
-s 3,virtio-console,@stdio:stdio_port \
|
||||
$pm_channel $pm_by_vuart \
|
||||
-B "root=/dev/sda3 rw rootwait maxcpus=$1 nohpet console=hvc0 \
|
||||
no_timer_check ignore_loglevel log_buf_len=16M \
|
||||
consoleblank=0 tsc=reliable x2apic_phys" hard_rtvm
|
||||
|
|
|
@ -92,6 +92,11 @@ fi
|
|||
#logger_setting, format: logger_name,level; like following
|
||||
logger_setting="--logger_setting console,level=4;kmsg,level=3;disk,level=5"
|
||||
|
||||
#for pm by vuart setting
|
||||
pm_channel="--pm_notify_channel uart "
|
||||
pm_by_vuart="--pm_by_vuart pty,/run/acrn/life_mngr_"$vm_name
|
||||
pm_vuart_node=" -s 1:0,lpc -l com2,/run/acrn/life_mngr_"$vm_name
|
||||
|
||||
#for memsize setting
|
||||
mem_size=2048M
|
||||
|
||||
|
@ -103,7 +108,7 @@ acrn-dm -A -m $mem_size -c $2 -s 0:0,hostbridge \
|
|||
-s 4,virtio-net,tap0 \
|
||||
-s 7,virtio-rnd \
|
||||
--ovmf ./OVMF.fd \
|
||||
--pm_notify_channel power_button \
|
||||
$pm_channel $pm_by_vuart $pm_vuart_node \
|
||||
$logger_setting \
|
||||
--mac_seed $mac_seed \
|
||||
$vm_name
|
||||
|
|
Loading…
Reference in New Issue