From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [RFC PATCH kernel] vfio-pci: Allow write combining Date: Tue, 14 Nov 2017 13:23:50 +1100 Message-ID: <20171114022350.GA20747@umbus.fritz.box> References: <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> <20171016080135.GF2776@umbus.fritz.box> <672c7172-addd-a0ca-f810-5a8deca67ff5@ozlabs.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gKMricLos+KVdGMg" Cc: Benjamin Herrenschmidt , Alex Williamson , kvm@vger.kernel.org, Eric Auger To: Alexey Kardashevskiy Return-path: Received: from ozlabs.org ([103.22.144.67]:39223 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbdKNCX5 (ORCPT ); Mon, 13 Nov 2017 21:23:57 -0500 Content-Disposition: inline In-Reply-To: <672c7172-addd-a0ca-f810-5a8deca67ff5@ozlabs.ru> Sender: kvm-owner@vger.kernel.org List-ID: --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 06, 2017 at 04:44:03PM +1100, Alexey Kardashevskiy wrote: > On 16/10/17 19:01, David Gibson wrote: > > 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= won'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 wa= y 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, j= ust > >>>> like the msix mapping one :) > >>> > >>> 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? > >> > >> "you" - you meant me? I am not coming over there :( > >=20 > > Oh.. I thought you were. > >=20 > >> The list is: > >> > >> 1. Allow msix mapping to the userspace (to address non-64k-aligned msi= x bar) We have a new plan on this - I'll discuss it over IRC. > >> 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 ra= dix > >> guests still rely on this) AIUI this isn't for radix, but for DPDK things that we need this. Ben talked about it a bit, but I don't know what the outcome was. > >> 3. what callback and where needs to be added to inform HV/PR KVM about= VFIO > >> group, like IOMMUMR::add_vfio_group() proposal or something. This was discussed, and I'm still thinking about it. It's kind of curly. --=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 --gKMricLos+KVdGMg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAloKU7QACgkQbDjKyiDZ s5K6txAAwyctozsZCnS0R3caK/Q//quQIyh3nOm07MJrNmcY0cYAGv/rqTg3J0gQ IHzeQkIIyU/jX8ENekojOE53Gk0/4OkwDcS31FpHpc6GzFk9k+/tWu4qohKp/h4/ ZpT0FxQriOxtOm0hBQBXX7mGuNFvoYnlBpli+W4401xthyDg0J5VCNPM4eFOUWxJ gJ8XnRXpj2zqgaS7m04oxvAiGnBAeDWsvt4W43DeDA23aNNZyH+925sd6qovCnaH BYcwwGpmyFIi0TTRYWINwhzKvmw5wjVPIsJoRj5WTGqF6hiYTCCgwtyszD55zOvL K5s/AzUWiX8Iz7hCF2gmB7B2oLuTZ4T1BzB087JzeMdEt2EwlBlRMaqQePIuBU2q WYjXaoENJNTAYl7hi3TcE8nr5qTIYMnSq9GzZGoC67YFxDE+IJ3Eaz2CgDiWKgv7 wGMPVUkErXBWjnCz8vqfPFMhnr+Edzp6MBRjhOl5NSYaoOwfn5VrIy8YgfatEUt2 vaqlvRDUHlbvOIUsDg1SbGDvDu8/Ma4POayXvYRnJqMGEiRmR61cP5ntjgUB1kmW AHmS2GJtI5WuEvbT+35Ny9uCDhYub/KZh4wZguduoOPPldSqsPVfeuk64EWK9rg2 zHUer1wmSICCIJHsRktoAGEl+HQgr/ghjFjHipqSQKSDhFeDXgE= =7Iot -----END PGP SIGNATURE----- --gKMricLos+KVdGMg--