From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: KVM handling external interrupts Date: Thu, 07 Jun 2012 13:13:45 +0200 Message-ID: <4FD08CE9.4070906@web.de> References: <4FD062BC.5090703@web.de> <4FD06E27.9020201@web.de> <4FD087A7.8000508@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig23069FC0F485D509C565D52B" Cc: Alex Landau , Dan Tsafrir , sheng qiu , kvm , Muli Ben-Yehuda , Nadav Har'El , Nadav Amit To: Abel Gordon Return-path: Received: from mout.web.de ([212.227.17.12]:65185 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760728Ab2FGLNs (ORCPT ); Thu, 7 Jun 2012 07:13:48 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig23069FC0F485D509C565D52B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-06-07 13:05, Abel Gordon wrote: >=20 >=20 > Jan Kiszka wrote on 07/06/2012 13:51:19: >=20 >>>> My first feeling is that it's not easily upstreamable due to the nee= d > to >>>> fiddle with the host's IDT, specifically on VCPU task migration. But= I >>>> need to read the requirements of this more carefully. Still > interesting >>>> work! >>> >>> You don't need to fiddle with the host's IDT, you need to fiddle with= >>> the shadow IDT and interrupt vector mapping/remapping. >> >> Yes, but you need to sync the host IDT into the shadow table. This may= >> require some hooks in generic code to avoid scanning the host table on= >> each guest entry. >=20 > Well, the shadow IDT only needs to be synced with interrupts coming fro= m > assigned devices. The rest of the entries doesn't matter, they just > generate an exception. Once they generate an exception, they are delive= red > through the host IDT. So, all you need to know are the vectors assigned= > to the guest to build the shadow IDT. Not totally true. If the host decides to allocate some new vector that collides with some guest usage, you need to rearrange the shadow IDT and the physical IRQ routing. So you need to track what the host does. Jan --------------enig23069FC0F485D509C565D52B 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.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/QjOkACgkQitSsb3rl5xSL7wCgpBWY3n1Yv4vwLnbOl35y8Sgu pCMAn3IEBq2Hiv6Tuiq5k6VOeCzEz+n+ =/MGF -----END PGP SIGNATURE----- --------------enig23069FC0F485D509C565D52B--