From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v2 06/20] kvm: Install optimized interrupt handler Date: Tue, 15 Mar 2011 21:12:59 +0100 Message-ID: <4D7FC84B.70906@web.de> References: <20110315171011.GA25624@amt.cnet> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC377F6B0E454838E90FF26A2" Cc: Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org To: Marcelo Tosatti Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:33915 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756429Ab1COUNH (ORCPT ); Tue, 15 Mar 2011 16:13:07 -0400 In-Reply-To: <20110315171011.GA25624@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC377F6B0E454838E90FF26A2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-03-15 18:10, Marcelo Tosatti wrote: > On Tue, Mar 15, 2011 at 12:26:17PM +0100, Jan Kiszka wrote: >> KVM only requires to set the raised IRQ in CPUState and to kick the >> receiving vcpu if it is remote. >> >> Signed-off-by: Jan Kiszka >> --- >> kvm-all.c | 11 +++++++++++ >> 1 files changed, 11 insertions(+), 0 deletions(-) >> >> diff --git a/kvm-all.c b/kvm-all.c >> index 226843c..25ab545 100644 >> --- a/kvm-all.c >> +++ b/kvm-all.c >> @@ -650,6 +650,15 @@ static CPUPhysMemoryClient kvm_cpu_phys_memory_cl= ient =3D { >> .log_stop =3D kvm_log_stop, >> }; >> =20 >> +static void kvm_handle_interrupt(CPUState *env, int mask) >> +{ >> + env->interrupt_request |=3D mask; >> + >> + if (!qemu_cpu_is_self(env)) { >> + qemu_cpu_kick(env); >> + } >> +} >> + >=20 > Not sure its worthwhile to allow different handlers. The advantage over= > tcg version is that its shorter, without cpu_unlink_tb and icount > handler? I thought about this again as well before posting, and I came to the conclusion that an important advantage is avoiding TCG surprises in KVM code paths. This way, KVM does not need to bother if cpu_unlink_tb or icount related code changes. Maybe I should have added this to the commit message. Jan --------------enigC377F6B0E454838E90FF26A2 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/ iEYEARECAAYFAk1/yEsACgkQitSsb3rl5xT3pACfWeXsSulwuzlY3ZJoiFvDF+TH R9UAn1ky0sDwMIFZVFg/3bawwgScn/u+ =3Ejc -----END PGP SIGNATURE----- --------------enigC377F6B0E454838E90FF26A2--