From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths Date: Thu, 09 Nov 2017 11:39:03 +0100 Message-ID: <1510223943.4517.194.camel@linux.it> References: <58A596C0020000780013AA84@prv-mh.provo.novell.com> <58A597D8020000780013AAAF@prv-mh.provo.novell.com> <5ca9f140-a574-a8d0-1231-4ce0aec0e124@citrix.com> <5A0177B8020000780018CCC9@prv-mh.provo.novell.com> <1510221291.4517.170.camel@linux.it> <5A043944020000780018D7B6@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6981960933565302818==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCkEm-0001I7-1Z for xen-devel@lists.xenproject.org; Thu, 09 Nov 2017 10:39:08 +0000 Received: by mail-wr0-f173.google.com with SMTP id u97so5168384wrc.1 for ; Thu, 09 Nov 2017 02:39:06 -0800 (PST) In-Reply-To: <5A043944020000780018D7B6@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Jan Beulich Cc: Sergey Dyasli , Kevin Tian , Igor Druzhinin , Andrew Cooper , Anshul Makkar , JunNakajima , xen-devel List-Id: xen-devel@lists.xenproject.org --===============6981960933565302818== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-srTr7AMBtMKuGDwB1wCr" --=-srTr7AMBtMKuGDwB1wCr Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2017-11-09 at 03:17 -0700, Jan Beulich wrote: > > > > On 09.11.17 at 10:54, wrote: > > On Tue, 2017-11-07 at 14:24 +0000, Igor Druzhinin wrote: > > > Perhaps I should improve my diagram: > > >=20 > > > pCPU1: vCPUx of domain X -> migrate to pCPU2 -> switch to idle > > > context > > > -> RCU callbacks -> vcpu_destroy(vCPUy of domain Y) -> > > > vmx_vcpu_disable_pml() -> vmx_vmcs_clear() (VMCS is trashed at > > > this > > > point on pCPU1) > > >=20 > > > pCPU2: context switch into vCPUx -> vCPUx.is_running =3D 1 -> TLB > > > flush > > > from context switch to clean TLB on pCPU1 > >=20 > > But, more important, how come you are context switching to > > something > > that has is_running =3D=3D 1 ? That should not be possible. >=20 > That's not what Igor's diagram says - it's indicating the fact that > is_running is being set to 1 in the process of context switching > into vCPUx. >=20 Ah, ok. So I was right: I indeed was misunderstanding something, i.e., the diagram itself. :-) Now I get it. Sorry for the noise, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli --=-srTr7AMBtMKuGDwB1wCr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEES5ssOj3Vhr0WPnOLFkJ4iaW4c+4FAloEMEcACgkQFkJ4iaW4 c+4/NBAA60XwMDCibkrISlhueeMPfFIUMLCBEFCKel5i29iPk2AT4eg0Zue0vPcv Wh6kQNOo7yZNc55CdOx2fb1N1DY39DowSXw4UGWPmeZoQdpG1doyT1+GL/6fy3er DT6l0XDo3M9XcBkn0aeBzFeHtIUGeo5I6sya3IDQZn+GHBchDHs/C1dLL8Rm1UMe cBGyelggFfxt7mC5Zbve6hCKh0UVo8d4HsaUpb2ei2NoUfiYfdSC0M6hor1kbJUe DbFvKZ1dTbj5U0t2Y8gOAM9exDy1kkIz1L/Kq26MTvHDrYnF3AzkqdDV3ApbC3x5 LIYKm4dqnxD2vCVs2rtveWFdiMR1ci67uqj2LJlaNp2L6sXrJoUJP1R5WSWp1GSt K6x23h/F3wVyUP06JYt29q+c4v16j1mJscShvaloGYY/mL+WmV22NNQCc6hfJ880 nBjJUHuONhDOU/Ne2SLV3D3aJ0BckMlfSaW38wHU77inDF/heazoUZrXseDiDCDA 6EUTTQ4fUc3WtRMlSLw1LcgPtUAqYorJVp31QBsRQSB9agWEXlQY2eLxjpzZPlPn LL/jFGe4bPJ0MoXpUDW8gm3WFeF82ZOII1f78F7Qqwro3MrqMW31+DT8kg+kHWSE x4g7qhe/pP8g7uFu3tKOrWGx6zYEX9THvs+ZcEJ8SfFkwkPgecs= =SAQA -----END PGP SIGNATURE----- --=-srTr7AMBtMKuGDwB1wCr-- --===============6981960933565302818== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============6981960933565302818==--