GaloisInc / HaLVM

The Haskell Lightweight Virtual Machine (HaLVM): GHC running on Xen
BSD 3-Clause "New" or "Revised" License
1.05k stars 88 forks source link

Respond to PV shutdown / restart #46

Closed thumphries closed 9 years ago

thumphries commented 9 years ago

Relying on xl destroy to close out a domain causes problems

acw commented 9 years ago

Specifically, there's a clean shutdown VIRQ somewhere, I believe, and the HaLVM should probably do something sensible with it.

thumphries commented 9 years ago

I have been informed ACPI for a PV domain is apparently not a thing.

PV shutdown seems to be implemented via a XenStore watch, e.g. xl shutdown 10 just creates /local/domain/10/control/shutdown = "poweroff". This is easy enough to implement in HALVMCore, so I'll add a user-exposed facility there.

Is it a good idea to handle this by default? Is the HaLVM supposed to work without a xenstored? EDIT: This isn't possible from the RTS, so registration will be opt-in