mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
devices: route guest shutdown via guest exit
Plumb ACPI S5 shutdown through guest_exit_evt instead of the shared exit path. This keeps guest-triggered shutdown separate from fatal VMM exit handling. Management software, for example libvirt, expects that distinction, and making it explicit aligns Cloud Hypervisor more closely with QEMU. Only the guest shutdown path is moved here. Reboot handling stays on reset_evt and non-guest exit paths are left unchanged. On-behalf-of: SAP leander.kohler@sap.com Signed-off-by: Leander Kohler <leander.kohler@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
c698075157
commit
a159152e41
@@ -1519,9 +1519,6 @@ impl DeviceManager {
|
||||
self.reset_evt
|
||||
.try_clone()
|
||||
.map_err(DeviceManagerError::EventFd)?,
|
||||
self.exit_evt
|
||||
.try_clone()
|
||||
.map_err(DeviceManagerError::EventFd)?,
|
||||
self.guest_exit_evt
|
||||
.try_clone()
|
||||
.map_err(DeviceManagerError::EventFd)?,
|
||||
@@ -1894,8 +1891,7 @@ impl DeviceManager {
|
||||
&mut self,
|
||||
interrupt_manager: &dyn InterruptManager<GroupConfig = LegacyIrqGroupConfig>,
|
||||
reset_evt: EventFd,
|
||||
exit_evt: EventFd,
|
||||
_guest_exit_evt: EventFd,
|
||||
guest_exit_evt: EventFd,
|
||||
) -> DeviceManagerResult<Option<Arc<Mutex<devices::AcpiGedDevice>>>> {
|
||||
let vcpus_kill_signalled = self
|
||||
.cpu_manager
|
||||
@@ -1904,7 +1900,7 @@ impl DeviceManager {
|
||||
.vcpus_kill_signalled()
|
||||
.clone();
|
||||
let shutdown_device = Arc::new(Mutex::new(devices::AcpiShutdownDevice::new(
|
||||
exit_evt,
|
||||
guest_exit_evt,
|
||||
reset_evt,
|
||||
vcpus_kill_signalled,
|
||||
)));
|
||||
|
||||
Reference in New Issue
Block a user