From: Kenneth Graunke Subject: Re: [Mesa-dev] [PATCH] i965: Revert absolute mode for constant buffer pointers. Date: Mon, 23 Oct 2017 16:19:08 -0700 Message-ID: <1608938.uWnjWL9i7Y@kirito> References: <20171019231820.28804-1-kenneth@whitecape.org> <150879796346.18467.14730848540037674402@jljusten-skl> <20171023225315.o6pdscgk2lotn6ts@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1397262142==" Return-path: In-Reply-To: <20171023225315.o6pdscgk2lotn6ts@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org, Kristian =?ISO-8859-1?Q?H=F8gsberg?= , mesa-dev List-Id: intel-gfx@lists.freedesktop.org --===============1397262142== Content-Type: multipart/signed; boundary="nextPart2383303.9a38YeLxxr"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPart2383303.9a38YeLxxr Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" On Monday, October 23, 2017 3:53:15 PM PDT Rodrigo Vivi wrote: > On Mon, Oct 23, 2017 at 10:32:43PM +0000, Jordan Justen wrote: > > On 2017-10-19 16:30:44, Kristian H=F8gsberg wrote: > > > On Thu, Oct 19, 2017 at 4:18 PM, Kenneth Graunke wrote: > > > > The kernel doesn't initialize the value of the INSTPM or CS_DEBUG_M= ODE2 > > > > registers at context initialization time. Instead, they're inherit= ed > > > > from whatever happened to be running on the GPU prior to first run = of a > > > > new context. So, when we started setting these, other contexts in = the > > > > system started inheriting our values. Since this controls whether > > > > 3DSTATE_CONSTANT_* takes a pointer or an offset, getting the wrong > > > > setting is fatal for almost any process which isn't expecting this. > > > > > > > > Unfortunately, VA-API and Beignet don't initialize this (nor does o= lder > > > > Mesa), so they will die horribly if we start doing this. UXA and S= NA > > > > don't use any push constants, so they are unaffected. > > > > > > > > The kernel developers are apparently uninterested in making the pro= to- > > > > context initialize these registers to guarantee deterministic behav= ior. > > >=20 > > > Could somebody from the kernel team elaborate here? This is obviously > > > broken and undermines the security and containerization that hw > > > contexts are supposed to provide. I'm really curious what the thinking > > > is here... > > >=20 > > > Kristian > >=20 > > Cc intel-gfx, maintainers >=20 > Is this the null-state/golden-context related discussions? >=20 > I assume we are ok for older platforms, but the problem would be only for > CNL+ where we are not adding the null context initialization yet. > Am I getting it right? No, this problem exists on earlier platforms as well. We saw the issue on Broadwell and Kabylake. --nextPart2383303.9a38YeLxxr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE6OtbNAgc4e6ibv4ZW1vaBx1JzDgFAlnueOwACgkQW1vaBx1J zDiIIA/+JQ0jywBV4bn8JxCX805k0nUZOt9OKK2LtQ3mz4ZI4cfYH87/c9NXZnp4 LEhIEbuXvwrgdXmstOLjhQ/JW2wsla2+w/w513QymjjHsG261C7qVRk9IAbOwQDn FqSfrfT58R4hikPLllGcM1NP/VvAZ99SJK94DOhHyZc1UzQwF6LTyAp1ZIyly4dq SNVdBRDJ++7Y/YTd+fDPoP9/0P5NuVGLhBbrPETvt2/AeY4F/klj9Ynhc+drsI+T tk2dOSWhS2AMCf+os3Xz/Vp8szvmUd6+Op1NRbmYF7t0RsMQhkNED7CB8oBzFw1N skQD7mDYr44FnrXvgVIkvLqSUVb6thElQkE+VnVbRBhq2QQZkz2g4Yd82Bs4+SSp 9X1H9H6Segk2gnY3USff9+M5sSiifFjG3dJjaBMOyGUiuFmTo8oXrWHyig4mb6qH nDgIJslFVvnvc/ELU80+3ggUsSzzapHxWlkVlIc1q7ByFMiRIVfuNnpjVc5C4we+ MTacstnfOLryOa1EROXDO/TKwSsNfwNiowF04iX+bd239e8C4VecKrB2gCBk6kYs +HZXR7FgLULSoaHHtFCqrkog4Z90dsibEyb75fq4iZQzL9jCSZcu9Tz2mX39+oNu DMBAwvKiF1buSHXOhbtSHzRqOm1spOGJX9IvTWd6yVjdZYpb7fY= =XQEF -----END PGP SIGNATURE----- --nextPart2383303.9a38YeLxxr-- --===============1397262142== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============1397262142==--