lkml.org 
[lkml]   [2014]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] [PATCH 4/4] x86/xen: use the maximum MFN to calculate the required DMA mask
On 19/11/14 17:51, Stefano Stabellini wrote:
> On Wed, 19 Nov 2014, David Vrabel wrote:
>>
>> +u64
>> +xen_swiotlb_get_required_mask(struct device *dev)
>> +{
>> + unsigned long max_mfn;
>> +
>> + max_mfn = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
>
> As Jan pointed out, I think you need to change the prototype of
> HYPERVISOR_memory_op to return long. Please do consistently across all
> relevant archs.

This doesn't help since 32-bit guests will still truncate. A new
hypercall op that returns the result in a uint64_t parameter is required.

There is another reason why max_mfn isn't suitable -- IOMMU usage so I
think we should assume a 64-bit DMA mask is required (this is actually
the change I put into XenServer's kernel).

David


\
 
 \ /
  Last update: 2014-11-20 13:21    [W:0.066 / U:1.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site