From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 11/15] kvm: Rework inner loop of kvm_cpu_exec Date: Sat, 12 Mar 2011 10:16:10 +0100 Message-ID: <4D7B39DA.80802@web.de> References: <481368ec2de108b87df4cd11c2bd870b215e49b5.1299233998.git.jan.kiszka@siemens.com> <20110305160519.GA4387@amt.cnet> <4D727D22.2030700@web.de> <20110311213442.GA16222@amt.cnet> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig62FBA1FFD45B764F483FD7A7" Cc: Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org To: Marcelo Tosatti Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:50809 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752714Ab1CLJQQ (ORCPT ); Sat, 12 Mar 2011 04:16:16 -0500 In-Reply-To: <20110311213442.GA16222@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: 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--