From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v6 2/2] xen: move TLB-flush filtering out into populate_physmap during vm creation Date: Tue, 20 Sep 2016 14:14:15 +0200 Message-ID: <1474373655.4393.201.camel@citrix.com> References: <1474338664-5054-1-git-send-email-dongli.zhang@oracle.com> <1474338664-5054-2-git-send-email-dongli.zhang@oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6097148478477153980==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: George Dunlap , Dongli Zhang , xen-devel@lists.xen.org Cc: sstabellini@kernel.org, wei.liu2@citrix.com, George.Dunlap@eu.citrix.com, jinsong.liu@alibaba-inc.com, ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com, andrew.cooper3@citrix.com List-Id: xen-devel@lists.xenproject.org --===============6097148478477153980== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-WHl9atYH3rYy5qU4kBEX" --=-WHl9atYH3rYy5qU4kBEX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-09-20 at 12:20 +0100, George Dunlap wrote: > On 20/09/16 03:31, Dongli Zhang wrote: > >=20 > > This patch implemented parts of TODO left in commit id > > a902c12ee45fc9389eb8fe54eeddaf267a555c58 (More efficient TLB-flush > > filtering in alloc_heap_pages()). It moved TLB-flush filtering out > > into > > populate_physmap. Because of TLB-flush in alloc_heap_pages, it's > > very slow > > to create a guest with memory size of more than 100GB on host with > > 100+ > > cpus. > >=20 > > This patch introduced a "MEMF_no_tlbflush" bit to memflags to > > indicate > > whether TLB-flush should be done in alloc_heap_pages or its caller > > populate_physmap.=C2=A0=C2=A0Once this bit is set in memflags, > > alloc_heap_pages will > > ignore TLB-flush. To use this bit after vm is created might lead to > > security issue, that is, this would make pages accessible to the > > guest B, > > when guest A may still have a cached mapping to them. > >=20 > > Therefore, this patch also introduced a "creation_finished" field > > to struct > > domain to indicate whether this domain has ever got unpaused by > > hypervisor. > > MEMF_no_tlbflush can be set only during vm creation phase when > > creation_finished is still false before this domain gets unpaused > > for the > > first time. > >=20 > > Signed-off-by: Dongli Zhang >=20 > Acked-by: George Dunlap >=20 FWIW, and if I'm still in time: Reviewed-by: Dario Faggioli Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-WHl9atYH3rYy5qU4kBEX 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 iQIcBAABCAAGBQJX4SgXAAoJEBZCeImluHPuGUcP/igCQ8whY4RxlSnx9/lUflF7 9SfcC+BOQEq0aEurecyfyZxDUDIYEJ6u18PyCs3PTOkb/PCEY/CNZ406fS7hSh3J /Oub5So8hum2KxTLFOnDBZwcfrHUZj7L8yAUri6txlym/dFFjGRO3aHkpLTurrc9 QPkWWuqpBCWGoRSVHzWKH7/zlMOZJCDARHLClDz0OfnPEUYeSSSYykE1RIKSRJ0D zrN+Z8HPrhKdMEl+BsiTGm4V23y9OYBvdfojFM93TuJg1J2RgsHN3CpRwamreBvT Dr3HpmFhazo45liW/lSk90zh1o1kl8ytsE6XRIrCP4FjoU35s05mKDQ+UOLsS3LC GsJTljUom0tzTvZromBiBAjyUMj9SqP3NR3HWFTdxgXf6GPfOPhQKpn4TEIG+WQG VaiMiejgMzdgfXRJR55u29vA3qKAktGVGgLrVIqP//X4kmRDBu+u9/jzm0Ojxu3J wJ8KiGT74zwmzyNrDDEcrQwls6iCh+r3t0ofFjhaXVgmguXqyvkG9qHJN54sDxcl ZZa+urBSWB7ycWZmCFBqWuphG3V4W4DiPx/lkhRLRSXOO7XwfgGGDEuLnAan+yjW fWjWNhsAOIH2KwKpTxraes5JFuz3N+bDEc/qLF7agHX0tHlhuZqJjP+Rb3JhPOjB z586hxTsZbYCTined9Kk =yLol -----END PGP SIGNATURE----- --=-WHl9atYH3rYy5qU4kBEX-- --===============6097148478477153980== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============6097148478477153980==--