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

Driver VM Unable to DMA #99

Closed
erichchan999 opened this issue Aug 2, 2024 · 2 comments
Closed

Driver VM Unable to DMA #99

erichchan999 opened this issue Aug 2, 2024 · 2 comments

Comments

@erichchan999
Copy link
Contributor

erichchan999 commented Aug 2, 2024

To allow DMA from within the driver VMs we need to allow read/write from linux userspace directly. The virtualiser passes a physical address to DMA into/from, and we wish to create a mapping in linux to this physical address to interact with. Linux does not seem to provide that option. The uio memory mappings we've been using so far are special mappings with VM_IO / VM_PFNMAP flag set in the VMA that fails direct I/O validations. The culprit seems to be remap_pfn_range, which marks the range of addresses as VM_IO. The same issue occurs when trying to mmap /dev/mem. For now all DMAable devices still require an extra copy.

@Ivan-Velickovic
Copy link
Collaborator

Maybe worth putting this in a comment under #97 instead of a new issue.

@erichchan999
Copy link
Contributor Author

Fair point, moved this over and will be closing this

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

2 participants