From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v9 15/17] vmx: VT-d posted-interrupt core logic handling Date: Wed, 11 Nov 2015 15:46:39 +0100 Message-ID: <1447253199.2767.5.camel@citrix.com> References: <1446540207-4806-1-git-send-email-feng.wu@intel.com> <1446540207-4806-16-git-send-email-feng.wu@intel.com> <1447174750.6409.19.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3153593198622813629==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Wu, Feng" , "xen-devel@lists.xen.org" Cc: George Dunlap , Andrew Cooper , "Tian, Kevin" , Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============3153593198622813629== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-jdDoONlqomvu6K6Fy9pI" --=-jdDoONlqomvu6K6Fy9pI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2015-11-11 at 13:29 +0000, Wu, Feng wrote: >=20 > > -----Original Message----- > > From: Wu, Feng > > Yes, that is the case, after arch_vcpu_block() is called, we don't > > cancel it even if there are events to be delivered, so we need to > > check > > whether the NV is the right value, if it isn't, which means after > > after arch_vcpu_block(),local_events_need_delivery() check returns > > true, so we need to adjust the PI state before VM-Entry. As Jan > > mentioned > > before, we will check the value before actually update it > > atomically, so > > I think it is okay from performance point of view. >=20 > Besides the case you mentioned above, it also covers another case: > now > we remove the arch hook in vcpu_wake(), so when vCPU is woken up, > the 'NV' filed is still 'wakeup_vector', hence we need to recover it > before > VM Entry. >=20 Well, sure. That, however, could have been handled by having this code called from vmx_do_resume(), I think. In fact, waking up certainly calls for the descriptor to be updated, but it also involves scheduling (well, at least starting executing after a wakeup does). So schedule_tail(), and hence vmx_do_resume(), would at some point be involved. My question above was about confirming that the (only) reason why you need that code in vmx_enter_helper() rather than in vmx_do_resume() was the 'block cancellation issue', not about why you need to change the PI control block at all. :-) Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-jdDoONlqomvu6K6Fy9pI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlZDVM8ACgkQk4XaBE3IOsTJrQCfV3EgO2rRzsbLLPjxsQIPie4N G1UAni77DaNbqzBU+pQ5qqSm0+xnmSsA =C4WJ -----END PGP SIGNATURE----- --=-jdDoONlqomvu6K6Fy9pI-- --===============3153593198622813629== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3153593198622813629==--