From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60396 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PyKvr-0007Wl-0L for qemu-devel@nongnu.org; Sat, 12 Mar 2011 04:16:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PyKvp-00046i-FQ for qemu-devel@nongnu.org; Sat, 12 Mar 2011 04:16:18 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:50806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PyKvp-00046a-4k for qemu-devel@nongnu.org; Sat, 12 Mar 2011 04:16:17 -0500 Message-ID: <4D7B39DA.80802@web.de> Date: Sat, 12 Mar 2011 10:16:10 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <481368ec2de108b87df4cd11c2bd870b215e49b5.1299233998.git.jan.kiszka@siemens.com> <20110305160519.GA4387@amt.cnet> <4D727D22.2030700@web.de> <20110311213442.GA16222@amt.cnet> In-Reply-To: <20110311213442.GA16222@amt.cnet> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig62FBA1FFD45B764F483FD7A7" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 11/15] kvm: Rework inner loop of kvm_cpu_exec List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig62FBA1FFD45B764F483FD7A7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-03-11 22:34, Marcelo Tosatti wrote: > On Sat, Mar 05, 2011 at 07:12:50PM +0100, Jan Kiszka wrote: >>>> @@ -956,7 +956,6 @@ int kvm_cpu_exec(CPUState *env) >>>> abort(); >>>> } >>>> =20 >>>> - ret =3D 0; /* exit loop */ >>>> switch (run->exit_reason) { >>> >>> Better keep ret assignment here so default behaviour is to=20 >>> exit loop? EXCP_INTERRUPT. >> >> There is no real default behavior: in two cases we stay in the loop, i= n >> two others we leave, and the rest obtains ret from a return value. >> Moreover, if a new case misses to set ret, the compiler will complain.= >> >> Jan >=20 > It will not complain because "ret" is used to store return value > of KVM_RUN. >=20 Right, I'll disentangle this duplicate use of 'ret' (writing patches is likely much better than watching more news this morning...). Jan --------------enig62FBA1FFD45B764F483FD7A7 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.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk17Od0ACgkQitSsb3rl5xRr2ACghol3PbjjuZDTsmDwHall6h64 NCEAniXyj9zvS+K2fv9eoaSUQm2P3CBD =uBpr -----END PGP SIGNATURE----- --------------enig62FBA1FFD45B764F483FD7A7--