From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Exception handling between QEMU and KVM Date: Wed, 01 Jul 2009 18:02:59 +0300 Message-ID: <4A4B7AA3.6000400@redhat.com> References: <7d08b87d0906302028q4bd7c9efifd399be9529fdc5b@mail.gmail.com> <4A4B25A0.70800@redhat.com> <7d08b87d0907010659v6e0efac1va906991402589ab7@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andreas Nilsson To: Christoffer Dall Return-path: In-Reply-To: <7d08b87d0907010659v6e0efac1va906991402589ab7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org On 07/01/2009 04:59 PM, Christoffer Dall wrote: > OK, my question is this: > > If I want to tell QEMU to quit from within the KVM_RUN ioctl in a way > that causes QEMU to exit gracefully (e.g. free any allocated memory > etc.) what is the way to do that? > Have KVM_RUN return -ESOMETHING, qemu should abort when it sees that. > I have tried setting EXIT_REASON to both KVM_EXIT_EXCEPTION and > KVM_EXIT_SHUTDOWN, but QEMU stays in the execution loop and > re-executes the machine over and over. > > Is this some logic that has to be done architecture specifically in > kvm_arch_post_run(...) or ? > I don't remember exactly. It also depends on what version of the source you're looking at. > And yes, any exceptions should be handled in KVM, but in the case of > an unrecoverable error I'm left with reporting this to the user and > end the QEMU process, right? > Yes. Current sources pause the vm so you can inspect guest state via the monitor. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html