Skip to content
Snippets Groups Projects
  1. Jun 05, 2016
  2. May 30, 2016
  3. May 26, 2016
  4. May 19, 2016
  5. May 13, 2016
  6. Apr 18, 2016
    • Thomas Huth's avatar
      ppc: Fix migration of the XER register · aa378598
      Thomas Huth authored
      
      env->xer only holds the lower bits of the XER register nowadays, the
      SO, OV and CA bits are stored in separate variables (see the function
      cpu_write_xer() for details). Since the migration code currently only
      reads the "xer" variable, the upper bits are lost during migration.
      Fix it by using cpu_read_xer() instead.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      aa378598
    • Thomas Huth's avatar
      ppc: Fix the bad exception NIP value and the range check in LSWX · 537d3e8e
      Thomas Huth authored
      
      The range checks in the LSWX instruction are completely insufficient:
      They do not take the wrap-around case into account, and the check
      "reg < rx" should be "reg <= rx" instead. Fix it by using the new
      lsw_reg_in_range() helper function that is already used for LSWI, too.
      
      Then there is a second problem: In case the INVAL exception is generated,
      the NIP value is wrong, it currently points to the instruction before
      the LSWX instruction. This is because gen_lswx() already decreases the
      NIP value by 4 (to be prepared for page fault exceptions), and
      powerpc_excp() later decreases it again by 4 while handling the program
      exception. So to get this right, we've got to undo the "- 4" from
      gen_lswx() here before calling helper_raise_exception_err().
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      537d3e8e
    • Thomas Huth's avatar
      ppc: Fix the range check in the LSWI instruction · afbee712
      Thomas Huth authored
      
      There are two issues: First, the number of registers that are used has
      to be calculated with "(nb + 3) / 4" (i.e. round always up, not down).
      Second, the "start <= ra && (start + nr - 32) > ra" condition for the
      wrap-around case is wrong: It has to be tested with "||" instead of "&&".
      Since we can reuse this check later for the LSWX instruction, let's
      place the fixed code into a helper function, too.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      afbee712
  7. Apr 05, 2016
  8. Mar 24, 2016
Loading