Re: [Qemu-devel] [PATCH 4/6] Handle CPU interrupts by inline checking of a flag

2013-02-27 Thread Lluís Vilanova
Forget it, I misread patch 6; sorry. Lluis Lluís Vilanova writes: > Peter Maydell writes: > [...] >> diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h >> index c858a73..384153b 100644 >> --- a/include/exec/gen-icount.h >> +++ b/include/exec/gen-icount.h >> @@ -7,10 +7,19 @@

Re: [Qemu-devel] [PATCH 4/6] Handle CPU interrupts by inline checking of a flag

2013-02-27 Thread Lluís Vilanova
Peter Maydell writes: [...] > diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h > index c858a73..384153b 100644 > --- a/include/exec/gen-icount.h > +++ b/include/exec/gen-icount.h > @@ -7,10 +7,19 @@ > static TCGArg *icount_arg; > static int icount_label; > +static int exitreq_

Re: [Qemu-devel] [PATCH 4/6] Handle CPU interrupts by inline checking of a flag

2013-02-23 Thread Peter Maydell
On 23 February 2013 10:03, Peter Maydell wrote: > On 22 February 2013 21:15, Paul Brook wrote: >>> @@ -100,6 +102,7 @@ struct CPUState { >>> bool stop; >>> bool stopped; >>> volatile sig_atomic_t exit_request; >>> +volatile sig_atomic_t tcg_exit_req; >> >> Do we really need ann

Re: [Qemu-devel] [PATCH 4/6] Handle CPU interrupts by inline checking of a flag

2013-02-23 Thread Peter Maydell
On 22 February 2013 21:15, Paul Brook wrote: >> @@ -100,6 +102,7 @@ struct CPUState { >> bool stop; >> bool stopped; >> volatile sig_atomic_t exit_request; >> +volatile sig_atomic_t tcg_exit_req; > > Do we really need annother variable/check? It seems like this should be at > l

Re: [Qemu-devel] [PATCH 4/6] Handle CPU interrupts by inline checking of a flag

2013-02-22 Thread Paul Brook
> @@ -100,6 +102,7 @@ struct CPUState { > bool stop; > bool stopped; > volatile sig_atomic_t exit_request; > +volatile sig_atomic_t tcg_exit_req; Do we really need annother variable/check? It seems like this should be at least partially redundant with the existing icount code.

[Qemu-devel] [PATCH 4/6] Handle CPU interrupts by inline checking of a flag

2013-02-22 Thread Peter Maydell
Fix some of the nasty TCG race conditions and crashes by implementing cpu_exit() as setting a flag which is checked at the start of each TB. This avoids crashes if a thread or signal handler calls cpu_exit() while the execution thread is itself modifying the TB graph (which may happen in system emu