Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Close qemu from a process in xv6

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.

like image 225
Abhay smith Avatar asked Nov 09 '17 19:11

Abhay smith


People also ask

How do I close QEMU xv6?

To exit xv6 running under QEMU you can terminate it with Ctrl-A X.


3 Answers

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".

like image 161
Nicolò Gasparini Avatar answered Oct 10 '22 19:10

Nicolò Gasparini


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.)

like image 24
Peter Maydell Avatar answered Oct 10 '22 19:10

Peter Maydell


I am running xv6 in ubuntu OS, for me to close qemu following command worked "control+a, release both keys and type x".

like image 3
Shubham Singh Avatar answered Oct 10 '22 20:10

Shubham Singh