On 1/14/19 10:56 PM, Peter Maydell wrote: > Include the cluster number in the hash we use to look > up TBs. This is important because a TB that is valid > for one cluster at a given physical address and set > of CPU flags is not necessarily valid for another: > the two clusters may have different views of physical > memory, or may have different CPU features (eg FPU > present or absent). > > We put the cluster number in the high 8 bits of the > TB cflags. This gives us up to 256 clusters, which should > be enough for anybody. If we ever need more, or need > more bits in cflags for other purposes, we could make > tb_hash_func() take more data (and expand qemu_xxhash7() > to qemu_xxhash8()). > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > v1->v2: move the setting of the cluster index in > cf_mask in tb_htable_lookup() up to before we > set desc.cf_mask from it... > --- > include/exec/exec-all.h | 4 +++- > accel/tcg/cpu-exec.c | 3 +++ > accel/tcg/translate-all.c | 3 +++ > 3 files changed, 9 insertions(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~