Closed mihaip closed 3 months ago
We need to properly reset each and every device attached to the particular machine.
As implemented I destroy the machine object and create a new one, so all attached devices are also torn down. It ends up being more of a shutdown-and-then-startup (as opposed to a restart), though I'm not sure it makes a difference as far as the observed behavior of the guest OS.
@mihaip Adding missing descructors deserves separate commits. New functionality needs its own commit. I'd appreciate it if you could split up this PR.
@maximumspatium I've split out the destructors into separate commits, does that work for you (making each into a separate PR was going to be a lot of branch juggling). You can review each one independently, and as long as this is not squashed on merge, they will be preserved.
There are cases where when it's necessary (e.g. given uninitialized NVRAM, the Beige G3 with the 10.2 install CD inserted will update the boot device and restart to boot from it).
Restart support was done by wrapping the
ppc_exec
function in a loop. This uncovered some cases where we were not fully tearing down state (removal of refresh intervals) or resetting it (MMU regions), but with those fixed, we are able to boot the 10.2 install CD to the spinner from an empty state.