From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= Subject: Re: PCI passthrough for HVM with stubdomain broken by "tools/libxl: handle the iomem parameter with the memory_mapping hcall" Date: Thu, 23 Jun 2016 17:49:24 +0200 Message-ID: <20160623154924.GM1593@mail-itl> References: <20160623085706.GG1593@mail-itl> <576BC42F02000078000F7F94@prv-mh.provo.novell.com> <20160623091824.GH1593@mail-itl> <20160623092353.GI1593@mail-itl> <576BCC2602000078000F7FC9@prv-mh.provo.novell.com> <20160623132551.GE410@mail-itl> <20160623152247.GK1593@mail-itl> <576C1E4502000078000F8393@prv-mh.provo.novell.com> <20160623154522.GL1593@mail-itl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6836648068752693334==" Return-path: In-Reply-To: <20160623154522.GL1593@mail-itl> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Jan Beulich Cc: Daniel De Graaf , xen-devel List-Id: xen-devel@lists.xenproject.org --===============6836648068752693334== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3e5zPOSaQk/kV0Ke" Content-Disposition: inline --3e5zPOSaQk/kV0Ke Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 23, 2016 at 05:45:22PM +0200, Marek Marczykowski-G=C3=B3recki w= rote: > On Thu, Jun 23, 2016 at 09:37:09AM -0600, Jan Beulich wrote: > > >>> On 23.06.16 at 17:22, wrote: > > > xen: allow XEN_DOMCTL_getdomaininfo for device model domains > > >=20 > > > Allow device model domain to get info about its target domain. > > > It is used during PCI passthrough setup (xc_domain_memory_mapping > > > checks for guest being auto-translated). While it happens in stubdoma= in, > > > it failed, breaking PCI passthrough in such setup. > >=20 > > If that's the route to go (which I'm not convinced of, as I'm not sure > > we won't need other xenstore domain special casing later on) I'd > > really like to ask you to mention the other broken case too, as > > described in my original patch (unless you found I was wrong with > > that). >=20 > So, maybe something like this: > case XEN_DOMCTL_getdomaininfo: > if ( current-domain->is_xenstore ) > return xsm_default_action(XSM_XS_PRIV, current->domain, d);; > return xsm_default_action(XSM_DM_PRIV, current->domain, d); >=20 >=20 > In your patch (changing XSM_XS_PRIV semantic), you implicitly considered > all domctls allowed for xenstore domain to be always a subset of those > allowed for device model domain. For now this is true, but if this set > is going to be extended in the future, your approach most likely will > lead to an error. Hmm, but if xenstore domain will never be also device model domain, this probably change nothing... --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --3e5zPOSaQk/kV0Ke Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXbAUEAAoJENuP0xzK19csj2EH/iZ4wiHuB3rzHNLDNoStTEcX C/1T6SKfEFTuXz5OkCGy091AGu8E7L/wYTIdH94c15yj5xggBhZvhf8BuCntiizf JkAnRSOjjNOBY5BUSdhU7/nz5aosX59CZ0elnWvExLtVcNvacE4lpFz5qWIEPKQq OatGQ1XRbNg8inRFCanqhZBa0yspuQxOUTqm3LxCftDadQi4QtcJmEUMSnZLmQQm eDpkirQdH9d6gKZe+FrGXyLLSbcM8RGvaVBJTOaHNPTb4EKnI/WEYaeREhAaoFg+ Fxz/6XDavVqF6VPtXc4wr08RB1w/yUurAGaw6tYiYaW90Xc4EIv2SPIX5TrVNqI= =CiDm -----END PGP SIGNATURE----- --3e5zPOSaQk/kV0Ke-- --===============6836648068752693334== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============6836648068752693334==--