From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: Handle multiple interrupts injection in one vmexit Date: Mon, 26 May 2014 18:44:19 +0800 Message-ID: <53831B03.4010505@web.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fg0L6mF3QhJgnVfWf5K7Dm99UlDEEX4MB" To: Arthur Chunqi Li , kvm Return-path: Received: from mout.web.de ([212.227.15.4]:56237 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751501AbaEZKom (ORCPT ); Mon, 26 May 2014 06:44:42 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fg0L6mF3QhJgnVfWf5K7Dm99UlDEEX4MB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2014-05-26 15:51, Arthur Chunqi Li wrote: > Hi there, >=20 > External interrupts are injected in function vcpu_enter_guest, with > checking KVM_REQ_EVENT. If there are more than one interrupts in one > vmexit (e.g. nmi and external events occur concurrently in one > vmexit), KVM will handle only one interrupt of the highest priority > (e.g. NMI), right? So only NMI is injected in this vmexit, thus when > will the other external events injected? I don't see any extra setting > of KVM_REQ_EVENT to handle the lower priority interrupts injection in > KVM. [you should mention that you are talking about x86 here] If both events are pending, inject_pending_event will try to inject the NMI. vcpu_enter_guest will then notice that there are still pending interrupts and request the interrupt window vmexit. If the NMI should be blocked, an NMI window exit is requested. But on NMI injection, another KVM_REQ_EVENT is send (see e.g. handle_nmi_window in vmx.c). Jan --fg0L6mF3QhJgnVfWf5K7Dm99UlDEEX4MB 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.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlODGwQACgkQitSsb3rl5xSgjACgvFIApQezg/Q9PY+bxkwGeFs0 uwAAnRTrdGmof0dqmvF38Q6YtK5u7Qb/ =NLdK -----END PGP SIGNATURE----- --fg0L6mF3QhJgnVfWf5K7Dm99UlDEEX4MB--