Re: [PATCH 4/4] icount: preserve cflags when custom tb is about to execute

2021-11-11 Thread Pavel Dovgalyuk
On 28.10.2021 22:26, Richard Henderson wrote: On 10/28/21 4:48 AM, Pavel Dovgalyuk wrote: +    if (cpu->cflags_next_tb == -1 +    && (!use_icount || !(tb->cflags & CF_USE_ICOUNT) +    || cpu_neg(cpu)->icount_decr.u16.low >= tb->icount)) { +    /* + * i

Re: [PATCH 4/4] icount: preserve cflags when custom tb is about to execute

2021-11-03 Thread Pavel Dovgalyuk
On 28.10.2021 22:26, Richard Henderson wrote: On 10/28/21 4:48 AM, Pavel Dovgalyuk wrote: +    if (cpu->cflags_next_tb == -1 +    && (!use_icount || !(tb->cflags & CF_USE_ICOUNT) +    || cpu_neg(cpu)->icount_decr.u16.low >= tb->icount)) { +    /* + * i

Re: [PATCH 4/4] icount: preserve cflags when custom tb is about to execute

2021-10-28 Thread Richard Henderson
On 10/28/21 4:48 AM, Pavel Dovgalyuk wrote: +if (cpu->cflags_next_tb == -1 +&& (!use_icount || !(tb->cflags & CF_USE_ICOUNT) +|| cpu_neg(cpu)->icount_decr.u16.low >= tb->icount)) { +/* + * icount is disabled or there are enough instructi

[PATCH 4/4] icount: preserve cflags when custom tb is about to execute

2021-10-28 Thread Pavel Dovgalyuk
When debugging with the watchpoints, qemu may need to create TB with single instruction. This is achieved by setting cpu->cflags_next_tb. But when this block is about to execute, it may be interrupted by another thread. In this case cflags will be lost and next executed TB will not be the special o