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: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines
Date: Sat, 12 Feb 2011 08:49:52 +0200

On Sat, Feb 12, 2011 at 12:23 AM, Michael Walle <address@hidden> wrote:
> Hi,
>
> Regarding all the comments on raising an exception. The real hardware does
> only support a few basic exception (like div by zero or interrupts and system
> calls). There is no checking if an instruction is supported or not. If an
> illegal opcode (like divu if the hardware divider is not enabled) is decoded,
> the behaviour is undefined.
>
> Additionally, there are no privileged instructions, no distinction between
> kernel and userspace, no memory protection, the LM32 CPU targets to be a
> lightweight and relative fast softcore for FPGAs. There are many ways to kill
> the VM from 'userspace' (in real hardware and in my qemu port :) )
>
> I treat QEMU as a tool to help developers writing software for this platform,
> rather than really running software inside a VM.
>
> 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.



reply via email to

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