From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create() Date: Tue, 14 Aug 2012 09:36:54 +0200 Message-ID: <502A0016.4070004@web.de> References: <1344272705-17825-1-git-send-email-peter.maydell@linaro.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig45AB21E2DD4FE6E176D15428" Cc: qemu-devel@nongnu.org, patches@linaro.org, Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org To: Peter Maydell Return-path: Received: from mout.web.de ([212.227.15.3]:58760 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754584Ab2HNHhB (ORCPT ); Tue, 14 Aug 2012 03:37:01 -0400 In-Reply-To: <1344272705-17825-1-git-send-email-peter.maydell@linaro.org> Sender: kvm-owner@vger.kernel.org List-ID: 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--