From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 14/35] kvm: Drop return value of kvm_cpu_exec Date: Sat, 08 Jan 2011 14:09:25 +0100 Message-ID: <4D286205.40909@web.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF96197B63843CA279FE9D11B" Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: Marcelo Tosatti , Anthony Liguori Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:35870 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752029Ab1AHNJg (ORCPT ); Sat, 8 Jan 2011 08:09:36 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF96197B63843CA279FE9D11B Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Am 06.01.2011 18:56, Marcelo Tosatti wrote: > From: Jan Kiszka >=20 > It is not used, it is not needed, so let's remove it. >=20 Please do not apply this for now. Digging deeper into execution loop issues, it turned out that we likely do need the return code to clean up the kvm mess in cpu_exec. Jan > Signed-off-by: Jan Kiszka > Signed-off-by: Marcelo Tosatti > --- > kvm-all.c | 6 ++---- > kvm-stub.c | 4 ++-- > kvm.h | 2 +- > 3 files changed, 5 insertions(+), 7 deletions(-) >=20 > diff --git a/kvm-all.c b/kvm-all.c > index 2538283..7518f2c 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -850,7 +850,7 @@ void kvm_cpu_synchronize_post_init(CPUState *env) > env->kvm_vcpu_dirty =3D 0; > } > =20 > -int kvm_cpu_exec(CPUState *env) > +void kvm_cpu_exec(CPUState *env) > { > struct kvm_run *run =3D env->kvm_run; > int ret; > @@ -943,7 +943,7 @@ int kvm_cpu_exec(CPUState *env) > #ifdef KVM_CAP_SET_GUEST_DEBUG > if (kvm_arch_debug(&run->debug.arch)) { > env->exception_index =3D EXCP_DEBUG; > - return 0; > + return; > } > /* re-enter, this exception was guest-internal */ > ret =3D 1; > @@ -960,8 +960,6 @@ int kvm_cpu_exec(CPUState *env) > env->exit_request =3D 0; > env->exception_index =3D EXCP_INTERRUPT; > } > - > - return ret; > } > =20 > int kvm_ioctl(KVMState *s, int type, ...) > diff --git a/kvm-stub.c b/kvm-stub.c > index 5384a4b..352c6a6 100644 > --- a/kvm-stub.c > +++ b/kvm-stub.c > @@ -79,9 +79,9 @@ void kvm_cpu_synchronize_post_init(CPUState *env) > { > } > =20 > -int kvm_cpu_exec(CPUState *env) > +void kvm_cpu_exec(CPUState *env) > { > - abort (); > + abort(); > } > =20 > int kvm_has_sync_mmu(void) > diff --git a/kvm.h b/kvm.h > index 60a9b42..51ad56f 100644 > --- a/kvm.h > +++ b/kvm.h > @@ -46,7 +46,7 @@ int kvm_has_xcrs(void); > #ifdef NEED_CPU_H > int kvm_init_vcpu(CPUState *env); > =20 > -int kvm_cpu_exec(CPUState *env); > +void kvm_cpu_exec(CPUState *env); > =20 > #if !defined(CONFIG_USER_ONLY) > int kvm_log_start(target_phys_addr_t phys_addr, ram_addr_t size); --------------enigF96197B63843CA279FE9D11B 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/ iEYEARECAAYFAk0oYgoACgkQitSsb3rl5xSL5wCglMIeIT2ZuxF3uZ8eGhiL8aSO fjsAoOAYQZEss1rCks+GxEcWcxuea0r6 =4XJi -----END PGP SIGNATURE----- --------------enigF96197B63843CA279FE9D11B-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54266 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbYY6-0006Zh-IL for qemu-devel@nongnu.org; Sat, 08 Jan 2011 08:09:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PbYY5-00063e-2j for qemu-devel@nongnu.org; Sat, 08 Jan 2011 08:09:38 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:35863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PbYY4-00063P-JX for qemu-devel@nongnu.org; Sat, 08 Jan 2011 08:09:37 -0500 Message-ID: <4D286205.40909@web.de> Date: Sat, 08 Jan 2011 14:09:25 +0100 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF96197B63843CA279FE9D11B" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 14/35] kvm: Drop return value of kvm_cpu_exec List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti , Anthony Liguori Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF96197B63843CA279FE9D11B Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Am 06.01.2011 18:56, Marcelo Tosatti wrote: > From: Jan Kiszka >=20 > It is not used, it is not needed, so let's remove it. >=20 Please do not apply this for now. Digging deeper into execution loop issues, it turned out that we likely do need the return code to clean up the kvm mess in cpu_exec. Jan > Signed-off-by: Jan Kiszka > Signed-off-by: Marcelo Tosatti > --- > kvm-all.c | 6 ++---- > kvm-stub.c | 4 ++-- > kvm.h | 2 +- > 3 files changed, 5 insertions(+), 7 deletions(-) >=20 > diff --git a/kvm-all.c b/kvm-all.c > index 2538283..7518f2c 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -850,7 +850,7 @@ void kvm_cpu_synchronize_post_init(CPUState *env) > env->kvm_vcpu_dirty =3D 0; > } > =20 > -int kvm_cpu_exec(CPUState *env) > +void kvm_cpu_exec(CPUState *env) > { > struct kvm_run *run =3D env->kvm_run; > int ret; > @@ -943,7 +943,7 @@ int kvm_cpu_exec(CPUState *env) > #ifdef KVM_CAP_SET_GUEST_DEBUG > if (kvm_arch_debug(&run->debug.arch)) { > env->exception_index =3D EXCP_DEBUG; > - return 0; > + return; > } > /* re-enter, this exception was guest-internal */ > ret =3D 1; > @@ -960,8 +960,6 @@ int kvm_cpu_exec(CPUState *env) > env->exit_request =3D 0; > env->exception_index =3D EXCP_INTERRUPT; > } > - > - return ret; > } > =20 > int kvm_ioctl(KVMState *s, int type, ...) > diff --git a/kvm-stub.c b/kvm-stub.c > index 5384a4b..352c6a6 100644 > --- a/kvm-stub.c > +++ b/kvm-stub.c > @@ -79,9 +79,9 @@ void kvm_cpu_synchronize_post_init(CPUState *env) > { > } > =20 > -int kvm_cpu_exec(CPUState *env) > +void kvm_cpu_exec(CPUState *env) > { > - abort (); > + abort(); > } > =20 > int kvm_has_sync_mmu(void) > diff --git a/kvm.h b/kvm.h > index 60a9b42..51ad56f 100644 > --- a/kvm.h > +++ b/kvm.h > @@ -46,7 +46,7 @@ int kvm_has_xcrs(void); > #ifdef NEED_CPU_H > int kvm_init_vcpu(CPUState *env); > =20 > -int kvm_cpu_exec(CPUState *env); > +void kvm_cpu_exec(CPUState *env); > =20 > #if !defined(CONFIG_USER_ONLY) > int kvm_log_start(target_phys_addr_t phys_addr, ram_addr_t size); --------------enigF96197B63843CA279FE9D11B 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/ iEYEARECAAYFAk0oYgoACgkQitSsb3rl5xSL5wCglMIeIT2ZuxF3uZ8eGhiL8aSO fjsAoOAYQZEss1rCks+GxEcWcxuea0r6 =4XJi -----END PGP SIGNATURE----- --------------enigF96197B63843CA279FE9D11B--