From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Subject: Re: [PATCH 1/3] iommu: set correct IOMMU entries when iommu_hap_pt_share == 0 Date: Wed, 16 Apr 2014 16:36:18 +0200 Message-ID: <534E9562.2060804@citrix.com> References: <1396886524-16921-1-git-send-email-roger.pau@citrix.com> <1396886524-16921-2-git-send-email-roger.pau@citrix.com> <5343CFD4020000780000672B@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WaQwp-0003nU-Uu for xen-devel@lists.xenproject.org; Wed, 16 Apr 2014 14:36:25 +0000 In-Reply-To: <5343CFD4020000780000672B@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel@lists.xenproject.org, Tim Deegan List-Id: xen-devel@lists.xenproject.org On 08/04/14 10:30, Jan Beulich wrote: >>>> On 07.04.14 at 18:02, wrote: >> If the memory map is not shared between HAP and IOMMU we fails to set >> correct IOMMU mappings for memory types different than p2m_ram_rw. >> >> This patchs adds IOMMU support for the following memory types: >> p2m_grant_map_rw, p2m_map_foreign, p2m_ram_ro and p2m_grant_map_ro. > > I'm curious about the justification for p2m_map_foreign; the others > I agree with. I've spoken with Stefano about this, because I've seen Qemu use foreign mapped pages as arguments to systems calls like pread/pwrite, and I'm quite sure we need IOMMU entries for foreign mappings. If Qemu opens the disk file with O_DIRECT foreign mappings can end up in DMA requests. Roger.