From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1BgT-0001SI-5S for qemu-devel@nongnu.org; Tue, 14 Aug 2012 03:37:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1BgS-0004tJ-6k for qemu-devel@nongnu.org; Tue, 14 Aug 2012 03:37:01 -0400 Received: from mout.web.de ([212.227.15.3]:52838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1BgR-0004tF-Sx for qemu-devel@nongnu.org; Tue, 14 Aug 2012 03:37:00 -0400 Message-ID: <502A0016.4070004@web.de> Date: Tue, 14 Aug 2012 09:36:54 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1344272705-17825-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1344272705-17825-1-git-send-email-peter.maydell@linaro.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig45AB21E2DD4FE6E176D15428" Subject: Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Avi Kivity , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org, patches@linaro.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig45AB21E2DD4FE6E176D15428 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2012-08-06 19:05, Peter Maydell wrote: > Move the init of the irqchip_inject_ioctl field of KVMState out of > kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq() > can be used even when no irqchip is created (for architectures > that support async interrupt notification even without an in > kernel irqchip). >=20 > Signed-off-by: Peter Maydell > --- > We can't just set irqchip_inject_ioctl in target-*/kvm.c because > the KVMState struct layout is private to kvm-all.c. Moving the > default initialisation of this field seemed the simplest approach. > It's safe because the use in kvm_set_irq() is guarded by a check of > kvm_async_interrupts_enabled(). >=20 > The other approach would be to have a helper function for setting > the field, but that seems overkill when KVM_IRQ_LINE is the standard > default value. (KVM_IRQ_LINE_STATUS seems to be undocumented, > incidentally. I am going to assume it's another x86ism until somebody > does document it :-)) Oh, and when implementing KVM_IRQ_LINE_STATUS for ARM, please also feel free to document it in a way that it applies both to its x86 history and new architectures. Jan --------------enig45AB21E2DD4FE6E176D15428 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/ iEYEARECAAYFAlAqABYACgkQitSsb3rl5xQ4HwCdGLlyuhdOcMecHxNSHy0PKm8T +ZIAn2nebhaL5FtqEgMCbybPMtYHS4Tg =YDo5 -----END PGP SIGNATURE----- --------------enig45AB21E2DD4FE6E176D15428--