From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55805 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0Wlt-00009R-0X for qemu-devel@nongnu.org; Fri, 18 Mar 2011 06:19:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0WlZ-00013B-3F for qemu-devel@nongnu.org; Fri, 18 Mar 2011 06:18:46 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:49805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0WlY-00012D-OJ for qemu-devel@nongnu.org; Fri, 18 Mar 2011 06:18:45 -0400 Message-ID: <4D833180.5020603@web.de> Date: Fri, 18 Mar 2011 11:18:40 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <20110315171011.GA25624@amt.cnet> <4D7FC84B.70906@web.de> In-Reply-To: <4D7FC84B.70906@web.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5B0D71124F0BEC02D841DB0E" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH v2 06/20] kvm: Install optimized interrupt handler 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) --------------enig5B0D71124F0BEC02D841DB0E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-03-15 21:12, Jan Kiszka wrote: > 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_c= lient =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); >>> + } >>> +} >>> + >> >> Not sure its worthwhile to allow different handlers. The advantage ove= r >> tcg version is that its shorter, without cpu_unlink_tb and icount >> handler? >=20 > 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. What's your opinion on this? Should I repost the remaining three with comments adjusted? Jan --------------enig5B0D71124F0BEC02D841DB0E 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/ iEYEARECAAYFAk2DMYAACgkQitSsb3rl5xRxKQCgjY9lbUBaKLSSmptm2MJ5jQXi FKAAmwboHF9PClNnJMTgzmM2tUxB14yQ =t6KF -----END PGP SIGNATURE----- --------------enig5B0D71124F0BEC02D841DB0E--