From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: Fwd: [v3 14/15] Update Posted-Interrupts Descriptor during vCPU scheduling Date: Tue, 30 Jun 2015 04:58:07 +0200 Message-ID: <1435633087.25170.274.camel@citrix.com> References: <1435123109-10481-15-git-send-email-feng.wu@intel.com> <55918214.4030102@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8943333024759378643==" Return-path: In-Reply-To: <55918214.4030102@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org Cc: kevin.tian@intel.com, keir@xen.org, george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com, xen-devel , jbeulich@suse.com, yang.z.zhang@intel.com, "feng.wu" List-Id: xen-devel@lists.xenproject.org --===============8943333024759378643== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-3C6yQrXIuPQc9ZCdHHKk" --=-3C6yQrXIuPQc9ZCdHHKk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2015-06-29 at 18:36 +0100, Andrew Cooper wrote: >=20 > The basic idea here is: > 1. When vCPU's state is RUNSTATE_running, > - set 'NV' to 'Notification Vector'. > - Clear 'SN' to accpet PI. > - set 'NDST' to the right pCPU. > 2. When vCPU's state is RUNSTATE_blocked, > - set 'NV' to 'Wake-up Vector', so we can wake up the > related vCPU when posted-interrupt happens for it. > - Clear 'SN' to accpet PI. > 3. When vCPU's state is RUNSTATE_runnable/RUNSTATE_offline, > - Set 'SN' to suppress non-urgent interrupts. > (Current, we only support non-urgent interrupts) > - Set 'NV' back to 'Notification Vector' if needed. >=20 It might be me, but it feels a bit odd to see RUNSTATE-s being (ab)used directly for this, as it does feel odd to see arch specific code being added in there. Can't this be done in context_switch(), which is already architecture specific? I was thinking to something very similar to what has been done for PSR, i.e., on x86, put everything in __context_switch(). Looking at who's prev and who's next, and at what pause_flags each has set, you should be able to implement all of the above logic. Or am I missing something? Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-3C6yQrXIuPQc9ZCdHHKk 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 v2 iEYEABECAAYFAlWSBb8ACgkQk4XaBE3IOsS46wCfTCqGq4hsyDUX1CVP+O4AixG1 aC8AnjVUgaCRg48O8cSuU1e9ZxE34ajA =Fp5W -----END PGP SIGNATURE----- --=-3C6yQrXIuPQc9ZCdHHKk-- --===============8943333024759378643== 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 --===============8943333024759378643==--