From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsTcl-0000ub-ER for qemu-devel@nongnu.org; Sat, 21 Jul 2012 02:57:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsTck-0000Vs-09 for qemu-devel@nongnu.org; Sat, 21 Jul 2012 02:57:11 -0400 Received: from mout.web.de ([212.227.15.3]:54043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsTcj-0000Vm-NJ for qemu-devel@nongnu.org; Sat, 21 Jul 2012 02:57:09 -0400 Message-ID: <500A52BF.9080207@web.de> Date: Sat, 21 Jul 2012 08:57:03 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1342811652-16931-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1342811652-16931-1-git-send-email-peter.maydell@linaro.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3CA9C5AC82F78C5608C488A1" Subject: Re: [Qemu-devel] [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: kvm , Marcelo Tosatti , qemu-devel@nongnu.org, patches@linaro.org, Avi Kivity This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3CA9C5AC82F78C5608C488A1 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2012-07-20 21:14, Peter Maydell wrote: > kvm_allows_irq0_override() is a totally x86 specific concept: > move it to the target-specific source file where it belongs. > This means we need a new header file for the prototype: > kvm_i386.h, in line with the existing kvm_ppc.h. First of all, the patch is inconsistent as it lacks something like target-i386/kvm-stub.c (IOW, you forgot about kvm_allows_irq0_override in kvm-stub.c). But the approach is wrong in general, see below. >=20 > Signed-off-by: Peter Maydell > --- > I'm sure this isn't the only x86ism in the KVM generic source > files. However the thing I'm specifically trying to do is > nuke all the uses of kvm_irqchip_in_kernel() in common code, No, "irqchip in kernel" is supposed to be a generic concept. We will also have it on Power. Not sure what your plans are for ARM, maybe it will always be true there. That said, maybe there is room for discussion about what it means for the general KVM code and its users if the irqchip is in the kernel. Two things that should be common for every arch: - VCPU idle management is done inside the kernel - in-kernel KVM helpers like vhost or VFIO can inject IRQs directly The latter point implies that irqfd is available and that interrupt routes from virtual IRQs (*) (like the one associated with an irqfd) to the in-kernel IRQ controller have to be established. That's pretty generi= c. > as part of trying to untangle "what irqchip model do you want" > from other aspects of the interrupt handling model. >=20 > Other than this one, there are uses in cpus.c and hw/virtio-pci.c, > but I haven't figured out yet exactly what those bits of code > are trying to do... See above for the two reasons. Jan (*) "GSI" actually means "physical or virtual IRQ line". --------------enig3CA9C5AC82F78C5608C488A1 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/ iEYEARECAAYFAlAKUsIACgkQitSsb3rl5xRmLQCfdatEx4AcB/PqABWEu6Y/4mJU TdkAoJmNu7Ucv4oFYU4zpfJmugz5f85I =3ow5 -----END PGP SIGNATURE----- --------------enig3CA9C5AC82F78C5608C488A1--