Skip to content
Snippets Groups Projects
  1. Feb 09, 2024
  2. Jan 25, 2024
  3. Nov 14, 2023
    • Jessica Clarke's avatar
      accel/tcg: Forward probe size on to notdirty_write · e2faabee
      Jessica Clarke authored
      
      Without this, we just dirty a single byte, and so if the caller writes
      more than one byte to the host memory then we won't have invalidated any
      translation blocks that start after the first byte and overlap those
      writes. In particular, AArch64's DC ZVA implementation uses probe_access
      (via probe_write), and so we don't invalidate the entire block, only the
      TB overlapping the first byte (and, in the unusual case an unaligned VA
      is given to the instruction, we also probe that specific address in
      order to get the right VA reported on an exception, so will invalidate a
      TB overlapping that address too). Since our IC IVAU implementation is a
      no-op for system emulation that relies on the softmmu already having
      detected self-modifying code via this mechanism, this means we have
      observably wrong behaviour when jumping to code that has been DC ZVA'ed.
      In practice this is an unusual thing for software to do, as in reality
      the OS will DC ZVA the page and the application will go and write actual
      instructions to it that aren't UDF #0, but you can write a test that
      clearly shows the faulty behaviour.
      
      For functions other than probe_access it's not clear what size to use
      when 0 is passed in. Arguably a size of 0 shouldn't dirty at all, since
      if you want to actually write then you should pass in a real size, but I
      have conservatively kept the implementation as dirtying the first byte
      in that case so as to avoid breaking any assumptions about that
      behaviour.
      
      Signed-off-by: default avatarJessica Clarke <jrtc27@jrtc27.com>
      Message-Id: <20231104031232.3246614-1-jrtc27@jrtc27.com>
      [rth: Move the dirtysize computation next to notdirty_write.]
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      e2faabee
    • Richard Henderson's avatar
      accel/tcg: Remove CF_LAST_IO · cf9b5790
      Richard Henderson authored
      
      In cpu_exec_step_atomic, we did not set CF_LAST_IO, which lead
      to a loop with cpu_io_recompile.
      
      But since 18a536f1 ("Always require can_do_io") we no longer
      need a flag to indicate when the last insn should have can_do_io set,
      so remove the flag entirely.
      
      Reported-by: default avatarClément Chigot <chigot@adacore.com>
      Tested-by: default avatarClément Chigot <chigot@adacore.com>
      Reviewed-by: default avatarClaudio Fontana <cfontana@suse.de>
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1961
      
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      cf9b5790
  4. Nov 07, 2023
  5. Nov 06, 2023
  6. Oct 31, 2023
  7. Oct 25, 2023
  8. Oct 12, 2023
  9. Oct 11, 2023
  10. Oct 08, 2023
  11. Oct 07, 2023
  12. Oct 04, 2023
Loading