From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] fix "info cpus" halted state display Date: Thu, 13 May 2010 15:57:05 +0200 Message-ID: <4BEC0531.5090604@web.de> References: <20100513131714.GC7757@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCDEB62C61C749F6534E6265D" Cc: avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:33601 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575Ab0EMN5O (ORCPT ); Thu, 13 May 2010 09:57:14 -0400 In-Reply-To: <20100513131714.GC7757@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCDEB62C61C749F6534E6265D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Gleb Natapov wrote: > When in-kernel irqchip is used env->halted is never used for anything > except "info cpus" command. In fact, it's used in a few more places, namely cpu_dump_state and the gdbstub. > Halted state is synced in > kvm_arch_save_mpstate() and showed by do_info_cpus() but otherwise neve= r > looked at. Zeroing it here breaks "info cpus" since before > do_info_cpus() outputs env->halted in io thread it is zeroed here when > vcpu thread reenters kernel. Looks good for current qemu-kvm. Execution of kvm_cpu_exec once depended on env->halted, even for in-kernel irqchip, right? Anyway, there are not such traces left here. We will just need to look at it again when pushing in-kernel irqchips upstream as its kvm loop looks different. Jan >=20 > Signed-off-by: Gleb Natapov > diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c > index 61d9331..0ec2881 100644 > --- a/qemu-kvm-x86.c > +++ b/qemu-kvm-x86.c > @@ -922,10 +922,6 @@ void kvm_arch_load_regs(CPUState *env, int level) > if (env->kvm_vcpu_update_vapic) > kvm_tpr_enable_vapic(env); > } > - if (kvm_irqchip_in_kernel()) { > - /* Avoid deadlock: no user space IRQ will ever clear it. */ > - env->halted =3D 0; > - } > =20 > kvm_put_vcpu_events(env, level); > kvm_put_debugregs(env); > -- > Gleb. --------------enigCDEB62C61C749F6534E6265D 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 iEYEARECAAYFAkvsBTUACgkQitSsb3rl5xSSDwCeLLGO6luWsAMWE1B52R8A6Fex OXcAnixz4tG3x0IG+nWsytJqxFMYN2BB =GJ8E -----END PGP SIGNATURE----- --------------enigCDEB62C61C749F6534E6265D--