Re: [Qemu-devel] TCG icount interaction with timer deadlines

2018-04-05 Thread Paolo Bonzini
- Original Message - > From: "Peter Maydell" > To: "Paolo Bonzini" > Cc: "QEMU Developers" , "Alex Bennée" > , "Richard Henderson" > , "Emilio G. Cota" , "Pavel Dovgalyuk" > > Sent: Thursday, April 5, 2018 7:35:56 PM > Subject: Re: TCG icount interaction with timer deadlines > > On

Re: [Qemu-devel] TCG icount interaction with timer deadlines

2018-04-05 Thread Peter Maydell
On 5 April 2018 at 18:07, Paolo Bonzini wrote: > On 05/04/2018 18:01, Peter Maydell wrote: >> * however, if the guest reprograms the clock during the tcg_cpu_exec() >>run, we don't do anything to cause us to stop earlier > > Anything that does this from the vCPU thread should be between > gen

Re: [Qemu-devel] TCG icount interaction with timer deadlines

2018-04-05 Thread Paolo Bonzini
On 05/04/2018 18:01, Peter Maydell wrote: > * however, if the guest reprograms the clock during the tcg_cpu_exec() >run, we don't do anything to cause us to stop earlier Anything that does this from the vCPU thread should be between gen_icount_start and gen_icount_end. (In fact, it's the ent

[Qemu-devel] TCG icount interaction with timer deadlines

2018-04-05 Thread Peter Maydell
Does anybody understand how icount TCG is supposed to arrange to respect timer deadlines? https://bugs.launchpad.net/qemu/+bug/1754038 has a test case which shows that we don't get this right. At the moment what happens is: * when we're about to call tcg_cpu_exec(), we call prepare_icount_for