Re: [PATCH v1] s390x/tcg: MVCL: Exit to main loop if there are pending interrupts

2019-10-02 Thread David Hildenbrand
On 02.10.19 09:04, David Hildenbrand wrote: > On 01.10.19 23:59, Richard Henderson wrote: >> On 10/1/19 12:47 PM, David Hildenbrand wrote: >>> On 01.10.19 21:17, Richard Henderson wrote: On 10/1/19 11:16 AM, David Hildenbrand wrote: > +static inline bool should_interrupt_instruction(CPUSta

Re: [PATCH v1] s390x/tcg: MVCL: Exit to main loop if there are pending interrupts

2019-10-02 Thread David Hildenbrand
On 01.10.19 23:59, Richard Henderson wrote: > On 10/1/19 12:47 PM, David Hildenbrand wrote: >> On 01.10.19 21:17, Richard Henderson wrote: >>> On 10/1/19 11:16 AM, David Hildenbrand wrote: +static inline bool should_interrupt_instruction(CPUState *cs) +{ +/* + * Somethin

Re: [PATCH v1] s390x/tcg: MVCL: Exit to main loop if there are pending interrupts

2019-10-01 Thread Richard Henderson
On 10/1/19 12:47 PM, David Hildenbrand wrote: > On 01.10.19 21:17, Richard Henderson wrote: >> On 10/1/19 11:16 AM, David Hildenbrand wrote: >>> +static inline bool should_interrupt_instruction(CPUState *cs) >>> +{ >>> +/* >>> + * Something asked us to stop executing chained TBs, e.g., >>>

Re: [PATCH v1] s390x/tcg: MVCL: Exit to main loop if there are pending interrupts

2019-10-01 Thread David Hildenbrand
On 01.10.19 21:17, Richard Henderson wrote: > On 10/1/19 11:16 AM, David Hildenbrand wrote: >> +static inline bool should_interrupt_instruction(CPUState *cs) >> +{ >> +/* >> + * Something asked us to stop executing chained TBs, e.g., >> + * cpu_interrupt() or cpu_exit(). >> + */ >>

Re: [PATCH v1] s390x/tcg: MVCL: Exit to main loop if there are pending interrupts

2019-10-01 Thread Richard Henderson
On 10/1/19 11:16 AM, David Hildenbrand wrote: > +static inline bool should_interrupt_instruction(CPUState *cs) > +{ > +/* > + * Something asked us to stop executing chained TBs, e.g., > + * cpu_interrupt() or cpu_exit(). > + */ > +if ((int32_t)atomic_read(&cpu_neg(cs)->icount_de

[PATCH v1] s390x/tcg: MVCL: Exit to main loop if there are pending interrupts

2019-10-01 Thread David Hildenbrand
MVCL is interruptible and we should check for interrupts and process them after writing back the variables to the registers. I can see both checks triggering. Most of them pass the first check, however, sometimes also the second check strikes and an interrupt gets delivered. (I assume pending inte