From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRnjR-0007To-Ic for qemu-devel@nongnu.org; Wed, 20 Dec 2017 18:25:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRnjO-0000At-9L for qemu-devel@nongnu.org; Wed, 20 Dec 2017 18:25:01 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:40606) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRnjO-0000AC-3J for qemu-devel@nongnu.org; Wed, 20 Dec 2017 18:24:58 -0500 Received: by mail-wr0-f194.google.com with SMTP id q9so23701817wre.7 for ; Wed, 20 Dec 2017 15:24:58 -0800 (PST) References: <20171212051853.24583-1-aik@ozlabs.ru> <20171211224650.71237179@w520.home> <20171219070919.42d90b94@w520.home> <87e241ad-4d65-1b51-aa22-a84f18de1cb6@redhat.com> <344fb27b-1765-92e0-312f-6d5610925c5a@ozlabs.ru> From: Paolo Bonzini Message-ID: <2cded4b6-8756-43df-ad5e-e38f6a1ab028@redhat.com> Date: Thu, 21 Dec 2017 00:24:54 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH qemu] RFC: spapr/iommu: Enable in-kernel TCE acceleration via VFIO KVM device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy , Alex Williamson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson On 20/12/2017 15:13, Alexey Kardashevskiy wrote: > On 20/12/17 20:04, Paolo Bonzini wrote: >> On 20/12/2017 02:47, Alexey Kardashevskiy wrote: >>>> - if we foresee having more IOMMU devices in KVM, let's rename >>>> KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE to KVM_DEV_VFIO_GROUP_ATTACH_IOMMU and >>>> add a new function >>>> >>>> int iommu_memory_region_get_kvm_fd(IOMMUMemoryRegion *iommu); >>>> >>>> that requires no object-type check in VFIO. >>> >>> This is how it started and the comment was that this KVM fd needs to have a >>> well defined semantic which I struggle to provide. >> >> I don't think the definition should be anything more than "it can be >> passed to KVM_DEV_VFIO_GROUP_ATTACH_IOMMU". I'll discuss it with Alex >> later today. > > That was more David's concern :) The get_attr API is okay, just remove the unused set_attr and follow the other review comments from Alex. Paolo