Review Board 2.0.15


X86: Define fault objects to carry debug messages.

Review Request #471 - Created Feb. 11, 2011 and submitted

Information
Gabe Black
gem5
Reviewers
Default
ali, gblack, nate, stever
X86: Define fault objects to carry debug messages.

These faults can panic/warn/warn_once, etc., instead of instructions doing
that themselves directly. That way, instructions can be speculatively
executed, and only if they're actually going to commit will their fault be
invoked and the panic, etc., happen.

   
Posted (Feb. 12, 2011, 12:12 a.m.)
I like this idea, but:
1. it would be much nicer to push this up out of the x86 code so other ISAs can use it... there's nothing x86-specific about it
2. I'd encode the panic/fatal/warn/warn_once distinction in a flag rather than as part of the type, even though that makes the call more ugly, because then you don't have to mess with the template.  Having one switch statement in one rarely called function is better than what you have there IMO.
3. Do we have examples of faults that are not panics?  Even hypothetical ones?  If not, I'd be inclined to keep things simple by just having a bool and a string that standardizes the M5PanicFault behavior and leave the other ones out until we see that we actually need them.
  1. 1. I like the idea of moving this out of x86, although practically speaking I don't know that any other ISA would be able to use it right now. I'll still move it though. This is, of course, talking about the faults themselves and not the instruction objects. The instructions are x86 specific.
    2. Ok. I don't really see how it's better, but I don't think it's worse.
    3. Yes. X86 uses all those for it's debugging microops. They were brought into existence so that those microops could be speculatively executed safely.