From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40494 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORSgA-0002DH-Ca for qemu-devel@nongnu.org; Wed, 23 Jun 2010 12:20:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORSg5-0006l0-EE for qemu-devel@nongnu.org; Wed, 23 Jun 2010 12:19:55 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:64314) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORSg5-0006kd-9j for qemu-devel@nongnu.org; Wed, 23 Jun 2010 12:19:53 -0400 Received: by pwi2 with SMTP id 2so452894pwi.4 for ; Wed, 23 Jun 2010 09:19:50 -0700 (PDT) Message-ID: <4C223423.7070603@codemonkey.ws> Date: Wed, 23 Jun 2010 11:19:47 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] fix smp with tcg mode and --enable-io-thread References: <4C1BA0B4.2010803@siemens.com> <4C1BCEB0.6050601@codemonkey.ws> <20100621193123.GA14083@amt.cnet> <4C1FCABA.3060207@web.de> <4C1FD278.5040403@web.de> <20100621230607.GA19203@amt.cnet> <4C206F1B.6080008@web.de> <4C21BB01.4020809@web.de> In-Reply-To: <4C21BB01.4020809@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Glauber Costa , Marcelo Tosatti , qemu-devel On 06/23/2010 02:42 AM, Jan Kiszka wrote: > Jan Kiszka wrote: > >> Marcelo Tosatti wrote: >> >>> On Mon, Jun 21, 2010 at 10:58:32PM +0200, Jan Kiszka wrote: >>> >>>> Jan Kiszka wrote: >>>> >>>>> Marcelo Tosatti wrote: >>>>> >>>>>> Clear exit_request when iothread grabs the global lock. >>>>>> >>>>>> Signed-off-by: Marcelo Tosatti >>>>>> >>>>>> diff --git a/cpu-exec.c b/cpu-exec.c >>>>>> index 026980a..74cb973 100644 >>>>>> --- a/cpu-exec.c >>>>>> +++ b/cpu-exec.c >>>>>> @@ -236,10 +236,8 @@ int cpu_exec(CPUState *env1) >>>>>> asm(""); >>>>>> env = env1; >>>>>> >>>>>> - if (exit_request) { >>>>>> + if (exit_request) >>>>>> env->exit_request = 1; >>>>>> - exit_request = 0; >>>>>> - } >>>>>> >>>>> Coding style... >>>>> >>>>> >>>>>> >>>>>> #if defined(TARGET_I386) >>>>>> if (!kvm_enabled()) { >>>>>> diff --git a/cpus.c b/cpus.c >>>>>> index fcd0f09..ef1ab22 100644 >>>>>> --- a/cpus.c >>>>>> +++ b/cpus.c >>>>>> @@ -598,6 +598,7 @@ void qemu_mutex_lock_iothread(void) >>>>>> } >>>>>> qemu_mutex_unlock(&qemu_fair_mutex); >>>>>> } >>>>>> + exit_request = 0; >>>>>> } >>>>>> >>>>>> void qemu_mutex_unlock_iothread(void) >>>>>> >>>>>> >>>>>> >>>>> I looked into this a bit as well, and that's what I also have in my >>>>> queue. >>>>> >>>>> But things are still widely broken: pause_all_vcpus and run_on_cpu as >>>>> there is no guarantee that all VCPUs regularly call into >>>>> qemu_wait_io_event. Also breakpoints don't work, not only in SMP mode. >>>>> >>> This fixes pause for me: >>> >>> >> Partially. It caused regressions on the SMP scheduling without the early >> loop exit in my patch. I will break up my changes later today and post >> them as series. >> > After fixing the APIC/IOAPIC fallouts, the series is almost done. > Unfortunately, host&guest debugging is totally broken for > CONFIG_IOTHREAD (I also noticed that [1] is still not merged). Did it not get applied to uq/master or has there just not been a merge request yet? Regards, Anthony LIguori > I will > try to fix this first as it may require some more refactorings. > > Jan > > [1] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/52718 > >