From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42431 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pn4xX-0008FD-P4 for qemu-devel@nongnu.org; Wed, 09 Feb 2011 02:59:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pn4xW-0007Co-Ej for qemu-devel@nongnu.org; Wed, 09 Feb 2011 02:59:31 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:39200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pn4xW-0007Cd-6C for qemu-devel@nongnu.org; Wed, 09 Feb 2011 02:59:30 -0500 Message-ID: <4D52495B.8010004@web.de> Date: Wed, 09 Feb 2011 08:59:23 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <149ef70e3a2ebe96529b0956da4bd4009099e3ac.1297077507.git.jan.kiszka@siemens.com> <20110208233903.GA16795@amt.cnet> In-Reply-To: <20110208233903.GA16795@amt.cnet> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig289A7CCE41485D06B4823D34" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 07/15] kvm: Separate TCG from KVM cpu execution 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) --------------enig289A7CCE41485D06B4823D34 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-02-09 00:39, Marcelo Tosatti wrote: > On Mon, Feb 07, 2011 at 12:19:18PM +0100, Jan Kiszka wrote: >> Mixing up TCG bits with KVM already led to problems around eflags >> emulation on x86. Moreover, quite some code that TCG requires on cpu >> enty/exit is useless for KVM. So dispatch between tcg_cpu_exec and >> kvm_cpu_exec as early as possible. >> >> The core logic of cpu_halted from cpu_exec is added to >> kvm_arch_process_irqchip_events. Moving away from cpu_exec makes >> exception_index meaningless for KVM, we can simply pass the exit reaso= n >> directly (only "EXCP_DEBUG vs. rest" is relevant). >> >> Signed-off-by: Jan Kiszka >> --- >> cpu-exec.c | 19 ++++++------------- >> cpus.c | 10 +++++----- >> kvm-all.c | 19 +++++++++---------- >> target-i386/kvm.c | 6 +++--- >> 4 files changed, 23 insertions(+), 31 deletions(-) >> >> diff --git a/target-i386/kvm.c b/target-i386/kvm.c >> index ba183c4..377a0a3 100644 >> --- a/target-i386/kvm.c >> +++ b/target-i386/kvm.c >> @@ -1502,12 +1502,13 @@ int kvm_arch_post_run(CPUState *env, struct kv= m_run *run) >> =20 >> int kvm_arch_process_irqchip_events(CPUState *env) >> { >> + if (env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_= NMI)) { >> + env->halted =3D 0; >> + } >=20 > Why is it necessary to clear env->halted here? Because we no longer come along cpu_halted() in cpu_exec(). This corresponds to the tail of process_irqchip_events() in qemu-kvm Jan --------------enig289A7CCE41485D06B4823D34 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/ iEYEARECAAYFAk1SSV8ACgkQitSsb3rl5xQl3gCgxRgsLFwnpqMy4DKSCcnnBF4l g/cAn1Ule6gegyc14/QTih9nSK2Aommv =hGQ/ -----END PGP SIGNATURE----- --------------enig289A7CCE41485D06B4823D34--