From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [RFC PATCH kernel] vfio-pci: Allow write combining Date: Tue, 14 Nov 2017 13:29:02 +1100 Message-ID: <1510626542.2397.8.camel@kernel.crashing.org> 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> <20171114022350.GA20747@umbus.fritz.box> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Alex Williamson , kvm@vger.kernel.org, Eric Auger To: David Gibson , Alexey Kardashevskiy Return-path: Received: from gate.crashing.org ([63.228.1.57]:36446 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbdKNC3S (ORCPT ); Mon, 13 Nov 2017 21:29:18 -0500 In-Reply-To: <20171114022350.GA20747@umbus.fritz.box> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 2017-11-14 at 13:23 +1100, David Gibson wrote: > > >> 1. Allow msix mapping to the userspace (to address non-64k-aligned msix 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 radix > > >> 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. So this is not a powerpc specific issue. Other archs similarily want to be able to do write combine mappings. The way sysfs does it is that for prefetchable BARs, it exposes both a resourceN and a resourceN_wc file. For VFIO it's a bit more tricky, maybe we need to game the offset using some of it as flags but that's very fishy, or maybe we do some kind of ioctl that selects the attributes used for that fd instance for subsequent mappings... I'll let Alex chose what he feels most appropriate here. > > >> 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.