qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 7400d6: tcg: add early clober modifier in ato


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 7400d6: tcg: add early clober modifier in atomic16_cmpxchg...
Date: Thu, 07 Feb 2019 04:54:37 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7400d6938c6d455c4eba2b80c06d60c8fa5c5ba3
      
https://github.com/qemu/qemu/commit/7400d6938c6d455c4eba2b80c06d60c8fa5c5ba3
  Author: Catherine Ho <address@hidden>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M include/qemu/atomic128.h

  Log Message:
  -----------
  tcg: add early clober modifier in atomic16_cmpxchg on aarch64

Without this patch, gcc might up the Input/Output registers and
cause unpredictable error.

Fixes: 1ec182c33379 ("target/arm: Convert to HAVE_CMPXCHG128")

Signed-off-by: Catherine Ho <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 9fd9b7de61b24c70a8a82d9627a20ed95433e1b5
      
https://github.com/qemu/qemu/commit/9fd9b7de61b24c70a8a82d9627a20ed95433e1b5
  Author: Peter Maydell <address@hidden>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M accel/tcg/cpu-exec.c
    M include/exec/tb-lookup.h

  Log Message:
  -----------
  accel/tcg: Consider cluster index in tb_lookup__cpu_state()

In commit f7b78602fdc6c6e4be we added the CPU cluster number to the
cflags field of the TB hash; this included adding it to the value
kept in tb->cflags, since we pass that field directly into the hash
calculation in some places. Unfortunately we forgot to check whether
other parts of the code were doing comparisons against tb->cflags
that would need to be updated.

It turns out that there is exactly one such place: the
tb_lookup__cpu_state() function checks whether the TB it has
found in the tb_jmp_cache has a tb->cflags matching the cf_mask
that is passed in. The tb->cflags has the cluster_index in it
but the cf_mask does not.

Hoist the "add cluster index to the cf_mask" code up from
tb_htable_lookup() to tb_lookup__cpu_state() so it can be considered
in the "did this TB match in the jmp cache" condition, as well as
when we do the full hash lookup by physical PC, flags, etc.
(tb_htable_lookup() is only called from tb_lookup__cpu_state(),
so this change doesn't require any further knock-on changes.)

Fixes: f7b78602fdc6c6e4be ("accel/tcg: Add cluster number to TCG TB hash")
Tested-by: Cleber Rosa <address@hidden>
Tested-by: Mark Cave-Ayland <address@hidden>
Reported-by: Howard Spoelstra <address@hidden>
Reported-by: Cleber Rosa <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 713acc316ddca119fe168e72846f1d2dd0548430
      
https://github.com/qemu/qemu/commit/713acc316ddca119fe168e72846f1d2dd0548430
  Author: Peter Maydell <address@hidden>
  Date:   2019-02-07 (Thu, 07 Feb 2019)

  Changed paths:
    M accel/tcg/cpu-exec.c
    M include/exec/tb-lookup.h
    M include/qemu/atomic128.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20190206' into staging

Queued accel/tcg patches

# gpg: Signature made Wed 06 Feb 2019 03:42:52 GMT
# gpg:                using RSA key 64DF38E8AF7E215F
# gpg: Good signature from "Richard Henderson <address@hidden>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth/tags/pull-tcg-20190206:
  accel/tcg: Consider cluster index in tb_lookup__cpu_state()
  tcg: add early clober modifier in atomic16_cmpxchg on aarch64

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/3e29da9fd810...713acc316ddc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]