mirror of https://github.com/xqemu/xqemu.git
exec: elide calls to tb_lock and tb_unlock
Adding assertions fixes link errors. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
beeaef55e4
commit
5aa1ef71b4
3
exec.c
3
exec.c
|
@ -2317,6 +2317,7 @@ static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
|
||||||
{
|
{
|
||||||
bool locked = false;
|
bool locked = false;
|
||||||
|
|
||||||
|
assert(tcg_enabled());
|
||||||
if (!cpu_physical_memory_get_dirty_flag(ram_addr, DIRTY_MEMORY_CODE)) {
|
if (!cpu_physical_memory_get_dirty_flag(ram_addr, DIRTY_MEMORY_CODE)) {
|
||||||
locked = true;
|
locked = true;
|
||||||
tb_lock();
|
tb_lock();
|
||||||
|
@ -2375,6 +2376,7 @@ static void check_watchpoint(int offset, int len, MemTxAttrs attrs, int flags)
|
||||||
CPUWatchpoint *wp;
|
CPUWatchpoint *wp;
|
||||||
uint32_t cpu_flags;
|
uint32_t cpu_flags;
|
||||||
|
|
||||||
|
assert(tcg_enabled());
|
||||||
if (cpu->watchpoint_hit) {
|
if (cpu->watchpoint_hit) {
|
||||||
/* We re-entered the check after replacing the TB. Now raise
|
/* We re-entered the check after replacing the TB. Now raise
|
||||||
* the debug interrupt so that is will trigger after the
|
* the debug interrupt so that is will trigger after the
|
||||||
|
@ -2820,6 +2822,7 @@ static void invalidate_and_set_dirty(MemoryRegion *mr, hwaddr addr,
|
||||||
cpu_physical_memory_range_includes_clean(addr, length, dirty_log_mask);
|
cpu_physical_memory_range_includes_clean(addr, length, dirty_log_mask);
|
||||||
}
|
}
|
||||||
if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) {
|
if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) {
|
||||||
|
assert(tcg_enabled());
|
||||||
tb_lock();
|
tb_lock();
|
||||||
tb_invalidate_phys_range(addr, addr + length);
|
tb_invalidate_phys_range(addr, addr + length);
|
||||||
tb_unlock();
|
tb_unlock();
|
||||||
|
|
Loading…
Reference in New Issue