From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Marczykowski Subject: Re: [PATCH v4 5/6] xen/x86: add PHYSDEVOP_msi_set_enable Date: Sun, 3 Mar 2019 04:26:29 +0100 Message-ID: <20190303032629.GQ19265@mail-itl> References: <5C767771020000780021AB12@prv1-mh.provo.novell.com> <20190227150508.GE19265@mail-itl> <5C77BEDD020000780021B030@prv1-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7794426974114148607==" Return-path: Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h0Hlz-00007Q-PH for xen-devel@lists.xenproject.org; Sun, 03 Mar 2019 03:26:44 +0000 In-Reply-To: <5C77BEDD020000780021B030@prv1-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" To: Jan Beulich Cc: Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , xen-devel , Daniel de Graaf , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org --===============7794426974114148607== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5KxTQ9fdN6Op3ksq" Content-Disposition: inline --5KxTQ9fdN6Op3ksq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v4 5/6] xen/x86: add PHYSDEVOP_msi_set_enable On Thu, Feb 28, 2019 at 03:58:37AM -0700, Jan Beulich wrote: > >>> On 27.02.19 at 16:05, wrote: > > On Wed, Feb 27, 2019 at 04:41:37AM -0700, Jan Beulich wrote: > >> >>> On 07.02.19 at 01:07, wrote: > >> > +int msi_msix_set_enable(struct pci_dev *pdev, int mode, int enable) > >> > +{ > >> > + int ret; > >> > + > >> > + ret =3D xsm_msi_set_enable(XSM_DM_PRIV, pdev->domain, > >> > + (pdev->seg << 16) | (pdev->bus << 8) |= pdev->devfn, > >> > + mode, enable); > >> > + if ( ret ) > >> > + return ret; > >> > + > >> > + switch ( mode ) > >> > + { > >> > + case PHYSDEVOP_MSI_SET_ENABLE_MSI: > >> > + msi_set_enable(pdev, enable); > >> > + break; > >> > + > >> > + case PHYSDEVOP_MSI_SET_ENABLE_MSIX: > >> > + msix_set_enable(pdev, enable); > >> > + break; > >> > + } > >>=20 > >> What about a call to pci_intx()?=20 > >=20 > > Should pci_intx(dev, !enable) be called in all those cases? >=20 > Well, that depends whether Dom0 is involved, which is where the > operation would normally be done. But since this is about bypassing > pciback, I think it may be needed. Shouldn't that be done by device model itself? Or even on command from the target domain? Automatically toggling INTx when manipulating MSI(-X) seems wrong. --=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? --5KxTQ9fdN6Op3ksq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAlx7SWQACgkQ24/THMrX 1yzSAgf/e3dwPS+MhF2PAdN5huECNBUZwc0usdI0mrPW+Zn1+xcJfBIGU/EEZK6Q xfVRk8g+fyLMvGiOZ9AF393O06cr2ukCgbAw/jnQbs95XB/AK2486VnNrYVz8dm9 0tbYryNPmXS7lRYJbJXmp89SzDZ5vs5Lbu6rifu75UalSvxMNHMzha5Pk6digoCj aO3SeSsivUGZp3L3RuxLUwoNvLImUPN5z1HaQlhQjPXpLMTVjjwXhUc+OYgNlLfg co9YNbTfgdlYurzs589yRdhGysnwUNBjyyk4SgcIPWneXcduk2Fnob+t/om+JfKc 0m+9qKu0OOpTLRafWs38E4Emls0Fow== =sksy -----END PGP SIGNATURE----- --5KxTQ9fdN6Op3ksq-- --===============7794426974114148607== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --===============7794426974114148607==--