mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-25 18:46:47 +00:00
cputlb: handle first atomic write to the page
In case where the conditional write is the first write to the page, TLB_NOTDIRTY will be set and stop_the_world is triggered. Handle this as a special case and set the dirty bit. After that fall through to the actual atomic instruction below. Backports commit 7f9af1abdcc69fd1d3d8d2be68464329600616d6 from qemu
This commit is contained in:
parent
00ebbae128
commit
d907423bac
|
@ -581,7 +581,13 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,
|
||||||
tlb_addr = tlbe->addr_write;
|
tlb_addr = tlbe->addr_write;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Notice an IO access, or a notdirty page. */
|
/* Check notdirty */
|
||||||
|
if (unlikely(tlb_addr & TLB_NOTDIRTY)) {
|
||||||
|
tlb_set_dirty(ENV_GET_CPU(env), addr);
|
||||||
|
tlb_addr = tlb_addr & ~TLB_NOTDIRTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notice an IO access */
|
||||||
if (unlikely(tlb_addr & ~TARGET_PAGE_MASK)) {
|
if (unlikely(tlb_addr & ~TARGET_PAGE_MASK)) {
|
||||||
/* There's really nothing that can be done to
|
/* There's really nothing that can be done to
|
||||||
support this apart from stop-the-world. */
|
support this apart from stop-the-world. */
|
||||||
|
|
Loading…
Reference in a new issue