From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753959AbdLHNsc (ORCPT ); Fri, 8 Dec 2017 08:48:32 -0500 Received: from foss.arm.com ([217.140.101.70]:38968 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753940AbdLHNs2 (ORCPT ); Fri, 8 Dec 2017 08:48:28 -0500 Subject: Re: [PATCH v3 15/16] iommu: introduce page response function To: Alex Williamson , Jacob Pan Cc: "iommu@lists.linux-foundation.org" , LKML , Joerg Roedel , David Woodhouse , Greg Kroah-Hartman , Rafael Wysocki , Lan Tianyu , Jean Delvare , Will Deacon , "Kumar, Sanjay K" References: <1510944914-54430-1-git-send-email-jacob.jun.pan@linux.intel.com> <1510944914-54430-16-git-send-email-jacob.jun.pan@linux.intel.com> <93661c1c-2d3b-295f-0b9d-52e50ea9e1d0@arm.com> <20171204133715.50c45136@jacob-builder> <20171206112521.1edf8e9b@jacob-builder> <20171207145121.23b3f26f@t450s.home> From: Jean-Philippe Brucker Message-ID: Date: Fri, 8 Dec 2017 13:52:00 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171207145121.23b3f26f@t450s.home> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/12/17 21:51, Alex Williamson wrote: >> Agree, IOMMU driver cannot enforce it. I think VFIO layer can make sure >> page response come from the assigned device and its guest/container. > > Can we enforce it via the IOMMU/VFIO interface? If the response is for > a struct device, and not an rid/did embedded in a structure, then vfio > can pass it through w/o worrying about it, ie. response comes in via > ioctl with association to vfio device fd -> struct vfio_device -> struct > device, iommu driver fills in rid/did. Thanks, Yes that's probably the best way, reporting faults and receiving responses on the device fd. Thanks, Jean