From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753921AbdLHNsR (ORCPT ); Fri, 8 Dec 2017 08:48:17 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:38898 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753331AbdLHNsQ (ORCPT ); Fri, 8 Dec 2017 08:48:16 -0500 Subject: Re: [PATCH v3 15/16] iommu: introduce page response function To: Alex Williamson Cc: Jacob Pan , "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> <39fcbbd2-2e6a-f05a-8cb4-8e3ad4ead369@arm.com> <20171207145641.50830562@t450s.home> From: Jean-Philippe Brucker Message-ID: Date: Fri, 8 Dec 2017 13:51:48 +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: <20171207145641.50830562@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:56, Alex Williamson wrote: [...] >> Seems like VFIO should enforce this quota, since the IOMMU layer doesn't >> know which device is assigned to which VM. If it's the IOMMU that enforces >> quotas per device and a VM has 15 devices assigned, then the guest can >> still DoS the IOMMU. > > VFIO also doesn't know about VMs. We know that devices attached to the > same container are probably used by the same user, but once we add > viommu, each device(group) uses its own container and we have no idea > they're associated. So, no to VM based accounting, and it seems like > an IOMMU problem, X number of outstanding requests per device. Thanks, Ok. It's not clear anyway how the architecture and implementations expect us to virtualize stall, I'll try to clarify it. Thanks, Jean