xen-swiotlb: When doing coherent alloc/dealloc check before swizzling the MFNs.
The process to swizzle a Machine Frame Number (MFN) is not always necessary. Especially if we know that we actually do not have to do it. In this patch we check the MFN against the device's coherent DMA mask and if the requested page(s) are contingous. If it all checks out we will just return the bus addr without doing the memory swizzle. Signed-off-by: Konrad Rzeszutek Wilk <email@example.com>
Showing with 24 additions and 4 deletions