From mboxrd@z Thu Jan 1 00:00:00 1970 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:45:22 +0200 Message-ID: <20160623154522.GL1593@mail-itl> References: <576BBABD02000078000F7F14@prv-mh.provo.novell.com> <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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5585553931524354528==" Return-path: In-Reply-To: <576C1E4502000078000F8393@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: Daniel De Graaf , xen-devel List-Id: xen-devel@lists.xenproject.org --===============5585553931524354528== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5Vr4v9a0xMzD0x07" Content-Disposition: inline --5Vr4v9a0xMzD0x07 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 stubdomain, > > 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). 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); 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. --=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? --5Vr4v9a0xMzD0x07 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXbAQTAAoJENuP0xzK19cs9csH/3SGmO4ZDFK5Vifv58I95YJX 4t2gQrSf2Gau5Psruo7XvUISrjOvSfj6MN34Ia75yDcxNcYCgn0QQd0ifGDTFiUt iTqns1AjwdnUlkgj+/h/9QGs31bnGDAnquU70aUyzw/zlwWtVXwK9V34SczQ8p/8 cQjf5u2KY/3cfsLtEH4Cebf3s/WltyFS8bNbqYf5mYUDd5prEgrCeFeKzF51KGZ9 FppxHyrJ2XPttVLVZ7O5VbTmPZRDBuRDqUtQicU0IK7ZmKzdjI/mPaMlG3lQPoOe /i7kgNddIu+RZRRduQdQTiPxn9/g9hbdi1ypUsd57CN03zy/Jb+xB0LuBkcnOC4= =7aXh -----END PGP SIGNATURE----- --5Vr4v9a0xMzD0x07-- --===============5585553931524354528== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============5585553931524354528==--