From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [RFC PATCH kernel] vfio-pci: Allow write combining Date: Mon, 16 Oct 2017 19:01:35 +1100 Message-ID: <20171016080135.GF2776@umbus.fritz.box> References: <20171009025000.39435-1-aik@ozlabs.ru> <20171010155515.39a0c5fe@t450s.home> <20171010204256.309715ce@t450s.home> <26fbe3b7-c54b-87a5-799d-22f4f043edd2@ozlabs.ru> <1507736107.25065.222.camel@kernel.crashing.org> <7ad2ee73-80dc-69ef-c98a-63b020f2f48b@ozlabs.ru> <20171016060043.GC2776@umbus.fritz.box> <67742d45-a267-0363-7448-7f8945f84c95@ozlabs.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sLx0z+5FKKtIVDwd" Cc: Benjamin Herrenschmidt , Alex Williamson , kvm@vger.kernel.org, Eric Auger To: Alexey Kardashevskiy Return-path: Received: from ozlabs.org ([103.22.144.67]:40293 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751362AbdJPIqr (ORCPT ); Mon, 16 Oct 2017 04:46:47 -0400 Content-Disposition: inline In-Reply-To: <67742d45-a267-0363-7448-7f8945f84c95@ozlabs.ru> Sender: kvm-owner@vger.kernel.org List-ID: --sLx0z+5FKKtIVDwd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 16, 2017 at 06:36:29PM +1100, Alexey Kardashevskiy wrote: > On 16/10/17 17:00, David Gibson wrote: > > On Mon, Oct 16, 2017 at 04:54:08PM +1100, Alexey Kardashevskiy wrote: > >> On 12/10/17 02:35, Benjamin Herrenschmidt wrote: > >>> On Wed, 2017-10-11 at 13:56 +1100, Alexey Kardashevskiy wrote: > >>>> Oopsie. This is because I overlooked it. Others do not use it. So I = do need > >>>> a file. But in the current scheme where all BARs share one fd - it w= on't > >>>> work - I simply cannot allow WC on non-prefetchable BARs :-/ > >>> > >>> This is an oversight in the design of VFIO-PCI, it should have a way = to > >>> specify write combine, either implicitely via such an arch hook, or > >>> explicitely via an ioctl prior to mapping the BARs for example. > >>> > >>> Alex, what do you reckon is the best approach here ? > >> > >> /me wonders if it is yet another issue for the dead issues bucket, just > >> like the msix mapping one :) > >=20 > > Maybe. Alexey, maybe you can make up a list of things that we (me, > > you, BenH) need to discuss with Alex W at KVM Forum? >=20 > "you" - you meant me? I am not coming over there :( Oh.. I thought you were. > The list is: >=20 > 1. Allow msix mapping to the userspace (to address non-64k-aligned msix b= ar) >=20 > 2. Allow write combining in vfio for the userspace (kvm guest is kinda > special and may simply ignore mapping flags in some configs but PPC radix > guests still rely on this) >=20 > 3. what callback and where needs to be added to inform HV/PR KVM about VF= IO > group, like IOMMUMR::add_vfio_group() proposal or something. Thanks. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --sLx0z+5FKKtIVDwd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlnkZ1wACgkQbDjKyiDZ s5LkFw//SQNy5u7AUbyIbUALjJ/nyJJ38GMKoqZOr11PfpGjTMHL5GbXomTah9A7 iDbuC5O/VkNMZWGLHALK0iJPPPi8drTECcLqmfyiI4tu6cc1H4iNCjOZLI5fcx/i 8sr3VZLMJV548o4ZVK1mVmcpRrv18zHLNCBZ3sC8It6bHiyBr5K7u1womEt16W0t 8jCeioCMEEviH2Vp410KvyLuVMqiOl5lJ+KsuySIrQp2r42NKp6NM0INZo+1swFn 2pf2STBLNhYgN0vZuRLqBYFlS8wgCP3UxkueSffg6VRumXDlh9nbsdElfb88T3XQ bHTXzqArvWqmitBu1U67xFXydQoEMNnDv5IBpQM0Iwe0jHT5BhFanbj0hvym2oSa FJyIFcyO5eBpK0ZVTMyOZ10oXFH6e3+WuImKohgbVHif1xUmVIVeDsdeQ2BfHzHh mPSOXX8tn42jodVPHL6QXtR5xvtiGrUNG8HGf5NFON+/dXmmkBw+OC8QXbM7oOmO SpMeewsBJuT2HsKLtBUVWxKdvpuQQbuHW0TabOuSvfWsHhU0LRfFurKDQYZtOVel npV3TarcT+MF6wqOyUUZtnw0GauV4PO6VxW2OKdAijdeGszEtNGdhRZBO3vb2iPh IJ/Y+jXWIwpECtG1fkxPzmLBS874ZYSNrThMP4GW4BxJ+R7FUcw= =kUSU -----END PGP SIGNATURE----- --sLx0z+5FKKtIVDwd--