Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spdk use paddr=vaddr during iommu_map_dma #1

Open
fengggli opened this issue Jun 25, 2019 · 0 comments
Open

spdk use paddr=vaddr during iommu_map_dma #1

fengggli opened this issue Jun 25, 2019 · 0 comments

Comments

@fengggli
Copy link
Owner

spdk_register_io_memory only uses virtual address when vfio is available! it assumes virtual address and physical address are the same?

spdk/lib/env_dpdk/vtophys.c

Lines 363 to 375 in f14c7b3

#if SPDK_VFIO_ENABLED
if (g_vfio.enabled) {
/* We'll use the virtual address as the iova. DPDK
* currently uses physical addresses as the iovas (or counts
* up from 0 if it can't get physical addresses), so
* the range of user space virtual addresses and physical
* addresses will never overlap.
*/
paddr = (uint64_t)vaddr;
rc = vtophys_iommu_map_dma((uint64_t)vaddr, paddr, VALUE_2MB);
if (rc) {
return -EFAULT;
}

@fengggli fengggli changed the title address mapping spdk use paddr=vaddr during iommu_map_dma Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant