[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/3] iommu: set correct IOMMU entries when iommu_hap_pt_share == 0



>>> On 16.04.14 at 16:36, <roger.pau@xxxxxxxxxx> wrote:
> On 08/04/14 10:30, Jan Beulich wrote:
>>>>> On 07.04.14 at 18:02, <roger.pau@xxxxxxxxxx> 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.

That's fine then, and at once puts off the option of using the global
bit for something (because now we certainly have more types than
we could encode).

One request though on the changes done: Please put the p2m-type-
to-IOMMU-flags conversion into an inline function, usable by both
callers. And iirc there's a third place (in p2m-pt.c) where you also
need to do that conversion (as replacement to just special casing
p2m_ram_rw).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.