mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-04-17 23:51:41 +00:00
Revert "exec.c: Fix breakpoint invalidation race"
Now that we have proper locking after MTTCG patches have landed, we can revert the commit. This reverts commit a9353fe897ca2687e5b3385ed39e3db3927a90e0. Backports commit 406bc339b0505fcfc2ffcbca1f05a3756e338a65 from qemu
This commit is contained in:
parent
7b337b9c07
commit
d0a70720a3
14
qemu/exec.c
14
qemu/exec.c
|
@ -603,6 +603,7 @@ void cpu_exec_init(CPUState *cpu, void *opaque)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
static void breakpoint_invalidate(CPUState *cpu, target_ulong pc)
|
||||
{
|
||||
/* Flush the whole TB as this will not have race conditions
|
||||
|
@ -612,6 +613,19 @@ static void breakpoint_invalidate(CPUState *cpu, target_ulong pc)
|
|||
*/
|
||||
tb_flush(cpu);
|
||||
}
|
||||
#else
|
||||
static void breakpoint_invalidate(CPUState *cpu, target_ulong pc)
|
||||
{
|
||||
MemTxAttrs attrs;
|
||||
hwaddr phys = cpu_get_phys_page_attrs_debug(cpu, pc, &attrs);
|
||||
int asidx = cpu_asidx_from_attrs(cpu, attrs);
|
||||
if (phys != -1) {
|
||||
/* Locks grabbed by tb_invalidate_phys_addr */
|
||||
tb_invalidate_phys_addr(cpu->cpu_ases[asidx].as,
|
||||
phys | (pc & ~TARGET_PAGE_MASK));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
void cpu_watchpoint_remove_all(CPUState *cpu, int mask)
|
||||
|
|
|
@ -192,6 +192,9 @@ static inline void tlb_flush_page_by_mmuidx(CPUState *cpu,
|
|||
static inline void tlb_flush_by_mmuidx(CPUState *cpu, uint16_t idxmap)
|
||||
{
|
||||
}
|
||||
static inline void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#define CODE_GEN_ALIGN 16 /* must be >= of the size of a icache line */
|
||||
|
|
Loading…
Reference in a new issue