Review Board 2.0.15


cpu: Make sure that a drained timing CPU isn't executing ucode

Review Request #1566 - Created Dec. 6, 2012 and submitted

Information
Ali Saidi
gem5
default
Reviewers
Default
Changeset 9415:3d92fcea205c
---------------------------
cpu: Make sure that a drained timing CPU isn't executing ucode

Currently, the timing CPU can be in the middle of a microcode sequence
or multicycle (stayAtPC is true) instruction when it is drained. This
leads to two problems:

 * When switching to a hardware virtualized CPU, we obviously can't
   execute gem5 microcode.

 * If stayAtPC is true we might execute half of an instruction twice
   when restoring a checkpoint or switching CPUs, which leads to an
   incorrect execution.

After applying this patch, the CPU will be on a proper instruction
boundary, which means that it is safe to switch to any CPU model
(including hardware virtualized ones). This changeset also fixes a bug
where the timing CPU sometimes switches out with while stayAtPC is
true, which corrupts the target state after a CPU switch or
checkpoint.

Note: This changeset removes the so_state variable from checkpoints
since the drain state isn't used anymore.

   
Review request changed
Updated (Jan. 7, 2013, 2:08 a.m.)

Status: Closed (submitted)