[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <546DD3A8.2060404@citrix.com>
Date: Thu, 20 Nov 2014 11:42:32 +0000
From: David Vrabel <david.vrabel@...rix.com>
To: Stefano Stabellini <stefano.stabellini@...citrix.com>
CC: <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<x86@...nel.org>, Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, <xen-devel@...ts.xenproject.org>,
Thomas Gleixner <tglx@...utronix.de>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists