qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines


From: Michael Walle
Subject: Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines
Date: Thu, 17 Feb 2011 23:51:10 +0100
User-agent: KMail/1.13.5 (Linux/2.6.32-5-686-bigmem; KDE/4.4.5; i686; ; )

Am Samstag 12 Februar 2011, 07:49:52 schrieb Blue Swirl:
> > That said, IMHO the best handling of unknown opcodes would be to kill the
> > VM.
> 
> In this case it should be OK. Alternatively the VM could be halted, so
> that instead of restarting QEMU, only system_reset needs to be issued.
> This may be more useful for developers, since for example registers
> and memory can be examined after the error.

Good idea! May I call vm_stop() in a tcg helper? Like in the following 
example:

void helper_vm_stop(uint32_t msg_id)
{
    if (qemu_log_enabled()) {
        qemu_log("VM stopped: %s", err_msg_str[msg_id]);
    } else {
        fprintf(stderr, "VM stopped: %s", err_msg_str[msg_id]);
    }
#ifndef CONFIG_USER_ONLY
    vm_stop(0);
#endif
    env->exception_index = EXCP_HALTED;
    cpu_loop_exit();
}

If not, what is the proper way to stop/pause the VM from within the executed 
code?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]