From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48218 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORKbx-0002BR-QO for qemu-devel@nongnu.org; Wed, 23 Jun 2010 03:43:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORKbw-0000Dn-5V for qemu-devel@nongnu.org; Wed, 23 Jun 2010 03:43:05 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:52495) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORKbv-0000Db-Nl for qemu-devel@nongnu.org; Wed, 23 Jun 2010 03:43:04 -0400 Message-ID: <4C21BB01.4020809@web.de> Date: Wed, 23 Jun 2010 09:42:57 +0200 From: Jan Kiszka MIME-Version: 1.0 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> In-Reply-To: <4C206F1B.6080008@web.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig17B61DF9F689D0DFE84992D6" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH] fix smp with tcg mode and --enable-io-thread List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: Glauber Costa , qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig17B61DF9F689D0DFE84992D6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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.=20 >>>>> >>>>> 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 =3D env1; >>>>> =20 >>>>> - if (exit_request) { >>>>> + if (exit_request) >>>>> env->exit_request =3D 1; >>>>> - exit_request =3D 0; >>>>> - } >>>> Coding style... >>>> >>>>> =20 >>>>> #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 =3D 0; >>>>> } >>>>> =20 >>>>> 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 a= s >>>> there is no guarantee that all VCPUs regularly call into >>>> qemu_wait_io_event. Also breakpoints don't work, not only in SMP mod= e. >> This fixes pause for me: >> >=20 > Partially. It caused regressions on the SMP scheduling without the earl= y > 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). 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 --------------enig17B61DF9F689D0DFE84992D6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkwhuwUACgkQitSsb3rl5xQSrwCghjsLireoLBg66rdEURQceoku Vi8AoLItoADR+B4FYtuoprrYuwejd61d =awjB -----END PGP SIGNATURE----- --------------enig17B61DF9F689D0DFE84992D6--