Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-27 Thread Paolo Bonzini
On 27/01/2017 07:09, Pavel Dovgalyuk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 26/01/2017 15:32, Pavel Dovgalyuk wrote: From: Paolo Bonzini [mailto:pbonz...@redhat.com] On 26/01/2017 14:37, Pavel Dovgalyuk wrote: >> Simpler: >> >> use_icount &&

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 26/01/2017 15:32, Pavel Dovgalyuk wrote: > >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >> On 26/01/2017 14:37, Pavel Dovgalyuk wrote: > Simpler: > > use_icount && > ((int32_t)cpu->icount_decr.u32 < 0 || >

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 15:32, Pavel Dovgalyuk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 26/01/2017 14:37, Pavel Dovgalyuk wrote: Simpler: use_icount && ((int32_t)cpu->icount_decr.u32 < 0 || cpu->icount_decr.u16.low + cpu->icount_extra == 0) >>>

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 26/01/2017 14:37, Pavel Dovgalyuk wrote: > >> Simpler: > >> > >>use_icount && > >>((int32_t)cpu->icount_decr.u32 < 0 || > >> cpu->icount_decr.u16.low + cpu->icount_extra == 0) > > Right. > > > >> But I'm not sure that you need to

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 14:37, Pavel Dovgalyuk wrote: >> Simpler: >> >> use_icount && >> ((int32_t)cpu->icount_decr.u32 < 0 || >> cpu->icount_decr.u16.low + cpu->icount_extra == 0) > Right. > >> But I'm not sure that you need to test u32. After all you're not > Checking u32 is needed,

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 26/01/2017 13:34, Pavel Dovgalyuk wrote: > > This patch adds check to break cpu loop when icount expires without > > setting the TB_EXIT_ICOUNT_EXPIRED flag. It happens when there is no > > available

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 13:34, Pavel Dovgalyuk wrote: > This patch adds check to break cpu loop when icount expires without > setting the TB_EXIT_ICOUNT_EXPIRED flag. It happens when there is no > available translated blocks and all instructions were executed. > In icount replay mode unnecessary tb_find

[Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Pavel Dovgalyuk
This patch adds check to break cpu loop when icount expires without setting the TB_EXIT_ICOUNT_EXPIRED flag. It happens when there is no available translated blocks and all instructions were executed. In icount replay mode unnecessary tb_find will be called (which may cause an exception) and