Re: [Xen-devel] [PATCH 4/4] x86/xen: use the maximum MFN to calculate the required DMA mask

2014-11-20 Thread David Vrabel
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

Re: [Xen-devel] [PATCH 4/4] x86/xen: use the maximum MFN to calculate the required DMA mask

2014-11-20 Thread Jan Beulich
>>> On 19.11.14 at 17:02, wrote: > On a Xen PV guest the DMA addresses and physical addresses are not 1:1 > (such as Xen PV guests) and the generic dma_get_required_mask() does > not return the correct mask (since it uses max_pfn). > > Some device drivers (such as mptsas, mpt2sas) use > dma_get_r

Re: [Xen-devel] [PATCH 4/4] x86/xen: use the maximum MFN to calculate the required DMA mask

2014-11-19 Thread Stefano Stabellini
On Wed, 19 Nov 2014, David Vrabel wrote: > On a Xen PV guest the DMA addresses and physical addresses are not 1:1 > (such as Xen PV guests) and the generic dma_get_required_mask() does > not return the correct mask (since it uses max_pfn). > > Some device drivers (such as mptsas, mpt2sas) use > dm

[Xen-devel] [PATCH 4/4] x86/xen: use the maximum MFN to calculate the required DMA mask

2014-11-19 Thread David Vrabel
On a Xen PV guest the DMA addresses and physical addresses are not 1:1 (such as Xen PV guests) and the generic dma_get_required_mask() does not return the correct mask (since it uses max_pfn). Some device drivers (such as mptsas, mpt2sas) use dma_get_required_mask() to set the device's DMA mask to