当前位置:网站首页>[qnx hypervisor 2.2 user manual]5.6.1 silent device during guest shutdown

[qnx hypervisor 2.2 user manual]5.6.1 silent device during guest shutdown

2022-06-23 08:46:00 Gao Tong @bill

When one guest When you turn it off , Whether controlled or uncontrollable shutdown ,qvm Processes should try to silence those Guest Physical devices used . This ensures that Guest The driver no longer writes to physical memory , To avoid unexpected behavior or even damage to hardware .
When one Guest To turn it off , So its drive will disappear , You can't expect Host The hardware remains in the same state , Because these devices may run asynchronously ( for example , is DMA write in , Generate interrupts, etc ). To protect hardware integrity , When Guest At the end of ,qvm These devices will be silent in the process design ( To put it simply, hibernate these devices ).

To follow this design ,qvm A process can contain a vdev, It can silence the device , This device can also be configured , In order to facilitate the qvm When a process terminates, it can run its callback function , Then release the driver resources . The callback function must perform the necessary cleanup , Including silent devices . This requires shutting down the equipment as soon as possible , For convenience qvm When the process disappears , The device will no longer perform the following operations :

  • Write to physical memory ( Very dangerous operation )
  • The interrupt ( This is not serious , because hypervisor You can identify this IRQ And ignore it )

About creating customization vdev For more information , Reference resources Virtual Device Developer's Guide. More about defining a callback function registered when a process shuts down vdev Control function reference “Handling a qvm termination”.
Be careful !
Guest You can try to silence a device . however hypervisor Can't rely on Guest To perform device hibernation . When running the QNX  Hypervisor yes Safety variant , You have to provide a vdev To silence the physical device when it is shut down . For non safe QNX Hypervisor variant , It is also recommended to do so , But don't ask .

原网站

版权声明
本文为[Gao Tong @bill]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206230824418045.html