I started learning xv6 recently and was trying to implement a shutdown mechanism in xv6 and i was able to kill all the process running gracefully and wait for some of them to finish and then terminate them. But i am not able to close qemu from the shutdown process.
Could someone suggest how to close qemu from a a xv6 process?
I googled and found out someone used 'outb' and 'outw' commands but both of them don't work.
To exit xv6 running under QEMU you can terminate it with Ctrl-A X.
I don't know if I fully understood your question, but to close the xv6 process running with qemu I use the key combination CTRL + A
--> C
It then should show you the (qemu) terminal line that you can close with the command "q".
In QEMU, "exit the QEMU process" happens when the guest powers down the emulated hardware. So your guest OS 'shutdown' needs to work by doing the correct hardware operations to power down. (How that is done depends on what hardware QEMU is emulating -- for instance some Arm boards don't have any mechanism for software controlled powerdown at all. Check the documentation for the relevant hardware.)
I am running xv6 in ubuntu OS, for me to close qemu following command worked "control+a, release both keys and type x".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With