Skip to content
Snippets Groups Projects
  1. Sep 27, 2022
  2. Sep 06, 2022
  3. Jun 27, 2022
  4. Apr 22, 2022
  5. Apr 06, 2022
  6. Mar 23, 2022
  7. Feb 01, 2022
  8. Jan 18, 2022
  9. Jan 11, 2022
  10. Jan 06, 2022
  11. Dec 20, 2021
  12. Nov 02, 2021
  13. Oct 01, 2021
  14. Sep 23, 2021
  15. Sep 13, 2021
  16. Aug 26, 2021
    • Peter Maydell's avatar
      target/arm: Do hflags rebuild in cpsr_write() · e784807c
      Peter Maydell authored
      
      Currently we rely on all the callsites of cpsr_write() to rebuild the
      cached hflags if they change one of the CPSR bits which we use as a
      TB flag and cache in hflags.  This is a bit awkward when we want to
      change the set of CPSR bits that we cache, because it means we need
      to re-audit all the cpsr_write() callsites to see which flags they
      are writing and whether they now need to rebuild the hflags.
      
      Switch instead to making cpsr_write() call arm_rebuild_hflags()
      itself if one of the bits being changed is a cached bit.
      
      We don't do the rebuild for the CPSRWriteRaw write type, because that
      kind of write is generally doing something special anyway.  For the
      CPSRWriteRaw callsites in the KVM code and inbound migration we
      definitely don't want to recalculate the hflags; the callsites in
      boot.c and arm-powerctl.c have to do a rebuild-hflags call themselves
      anyway because of other CPU state changes they make.
      
      This allows us to drop explicit arm_rebuild_hflags() calls in a
      couple of places where the only reason we needed to call it was the
      CPSR write.
      
      This fixes a bug where we were incorrectly failing to rebuild hflags
      in the code path for a gdbstub write to CPSR, which meant that you
      could make QEMU assert by breaking into a running guest, altering the
      CPSR to change the value of, for example, CPSR.E, and then
      continuing.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210817201843.3829-1-peter.maydell@linaro.org
      e784807c
  17. Jul 13, 2021
  18. Jul 12, 2021
  19. Jun 03, 2021
  20. May 15, 2021
  21. Mar 10, 2021
  22. Jan 18, 2021
Loading