diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 5a8d0784e7..cd7c32361b 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -40,7 +40,7 @@ #else #include "system/runstate.h" #endif - +#include "trace.h" /* List iterators for lists of tagged pointers in TranslationBlock. */ #define TB_FOR_EACH_TAGGED(head, tb, n, field) \ @@ -771,6 +771,7 @@ void tb_flush__exclusive_or_serial(void) { CPUState *cpu; + trace_tb_flush(); assert(tcg_enabled()); /* Note that cpu_in_serial_context checks cpu_in_exclusive_context. */ assert(!runstate_is_running() || diff --git a/accel/tcg/trace-events b/accel/tcg/trace-events index 14f638810c..0816cafd33 100644 --- a/accel/tcg/trace-events +++ b/accel/tcg/trace-events @@ -12,6 +12,7 @@ memory_notdirty_set_dirty(uint64_t vaddr) "0x%" PRIx64 # translate-all.c translate_block(void *tb, uintptr_t pc, const void *tb_code) "tb:%p, pc:0x%"PRIxPTR", tb_code:%p" +tb_gen_code_buffer_overflow(const char *reason) "reason: %s" # ldst_atomicity load_atom2_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x%"PRIxPTR"" @@ -24,3 +25,6 @@ store_atom2_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x%"PRIx store_atom4_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x%"PRIxPTR"" store_atom8_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x%"PRIxPTR"" store_atom16_fallback(uint32_t memop, uintptr_t ra) "mop:0x%"PRIx32", ra:0x%"PRIxPTR"" + +# tb-maint.c +tb_flush(void) "" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index da9d7f1675..fba4e9dc21 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -290,6 +290,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, TCGTBCPUState s) if (unlikely(!tb)) { /* flush must be done */ if (cpu_in_serial_context(cpu)) { + trace_tb_gen_code_buffer_overflow("tcg_tb_alloc"); tb_flush__exclusive_or_serial(); goto buffer_overflow; } @@ -325,6 +326,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, TCGTBCPUState s) if (unlikely(gen_code_size < 0)) { switch (gen_code_size) { case -1: + trace_tb_gen_code_buffer_overflow("setjmp_gen_code"); /* * Overflow of code_gen_buffer, or the current slice of it. * @@ -389,6 +391,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, TCGTBCPUState s) search_size = encode_search(tb, (void *)gen_code_buf + gen_code_size); if (unlikely(search_size < 0)) { + trace_tb_gen_code_buffer_overflow("encode_search"); tb_unlock_pages(tb); goto buffer_overflow; } diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 1bb1af7051..c3cf33904e 100644 --- a/scripts/qapi/parser.py +++ b/scripts/qapi/parser.py @@ -441,7 +441,7 @@ class QAPISchemaParser: self._literal_mode = True self._literal_mode_indent = 0 elif self._literal_mode and line: - indent = re.match(r'^ *', line).end() + indent = must_match(r'\s*', line).end() if self._literal_mode_indent == 0: self._literal_mode_indent = indent elif indent < self._literal_mode_indent: diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc index a50f57dbaa..f4192f1006 100644 --- a/target/i386/tcg/decode-new.c.inc +++ b/target/i386/tcg/decode-new.c.inc @@ -335,6 +335,8 @@ static void decode_group9(DisasContext *s, CPUX86State *env, X86OpEntry *entry, *entry = group9_reg; } else if (op == 1) { *entry = REX_W(s) ? cmpxchg16b : cmpxchg8b; + } else { + *entry = UNKNOWN_OPCODE; } } diff --git a/tests/functional/mips64el/test_replay.py b/tests/functional/mips64el/test_replay.py index 05cc585f85..e9318448fa 100755 --- a/tests/functional/mips64el/test_replay.py +++ b/tests/functional/mips64el/test_replay.py @@ -40,6 +40,7 @@ class Mips64elReplay(ReplayKernelBase): '75ba10cd35fb44e32948eeb26974f061b703c81c4ba2fab1ebcacf1d1bec3b61') @skipUntrustedTest() + @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/2013") def test_replay_mips64el_malta_5KEc_cpio(self): self.set_machine('malta') self.cpu = '5KEc'