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? 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 ? 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? Thanks, Christoffer On Wed, Jul 1, 2009 at 5:00 AM, Avi Kivity<avi@xxxxxxxxxx> wrote: > On 07/01/2009 06:28 AM, Christoffer Dall wrote: >> >> Hi all. >> >> We are still working on our ARM port of KVM and we are managing to let >> the guest decompress the kernel image and run from relocated address >> and we can support enabling MMU before this. >> >> Howver, to debug relocated micro-hypervisor for exception handling, we >> are trying to implement some NOT_IMPLEMENTED() macros and ASSERT() >> macros. >> >> What we have done so far is simply to exit QEMU roughly after >> returning -EINVAL from the KVM_RUN system call, but before we start >> supporting an interrupt cycle we have to improve on this. Setting >> kvm_run->exit_reason = KVM_EXIT_EXCEPTION or kvm_run->exit_reason = >> KVM_EXIT_SHUTDOWN just results in QEMU looping in the cpu execution >> loop. >> >> Can someone point us in the direction of what we're missing here in >> order to exit the whole QEMU process from an exception occurring >> inside the guest? >> > > Not sure I understand. Can't you call exit() or abort() after kvm returns > an error? > > -- > error compiling committee.c: too many arguments to function > > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html