tcg: Enforce single page access in probe_write()

Let's enforce the interface restriction.

Backports commit ca86cf328ce216bb304bbf09a43614613f945d86 from qemu
This commit is contained in:
David Hildenbrand 2020-01-14 07:02:13 -05:00 committed by Lioncash
parent b732ad9eba
commit 2bc3843fe3

View File

@ -716,6 +716,8 @@ void probe_write(CPUArchState *env, target_ulong addr, int size, int mmu_idx,
CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr);
target_ulong tlb_addr = tlb_addr_write(entry);
g_assert(-(addr | TARGET_PAGE_MASK) >= size);
if (unlikely(!tlb_hit(tlb_addr, addr))) {
if (!VICTIM_TLB_HIT(addr_write, addr)) {
tlb_fill(env_cpu(env), addr, size, MMU_DATA_STORE,