On Wed, Jun 08, 2022 at 05:55:49PM -0700, Dongli Zhang wrote: > @@ -109,19 +110,25 @@ int xen_swiotlb_fixup(void *buf, unsigned long nslabs, bool high) > int rc; > unsigned int order = get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT); > unsigned int i, dma_bits = order + PAGE_SHIFT; > + unsigned int max_dma_bits = MAX_DMA32_BITS; > dma_addr_t dma_handle; > phys_addr_t p = virt_to_phys(buf); > > BUILD_BUG_ON(IO_TLB_SEGSIZE & (IO_TLB_SEGSIZE - 1)); > BUG_ON(nslabs % IO_TLB_SEGSIZE); > > + if (high) { > + dma_bits = MAX_DMA64_BITS; > + max_dma_bits = MAX_DMA64_BITS; > + } > + I think you really want to pass the addressing bits or mask to the remap callback and not do magic with a 'high' flag here. _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization