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

4k page emulation #1921

Closed
skmp opened this issue Aug 15, 2022 · 1 comment
Closed

4k page emulation #1921

skmp opened this issue Aug 15, 2022 · 1 comment

Comments

@skmp
Copy link
Contributor

skmp commented Aug 15, 2022

Splitting from #1221

from @skmp

We now have a fairly clean interface - one would need to add support for this in virtual void GuestMmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) = 0; and GuestMunmap, and maybe introduce a GuestMprotect and then it would all work.

from @marcan

mmap on files can be made to work perfectly fine as long as the vaddr is not requested as fixed. You just align the mapping to 16K and give the app an offset halfway into the page if needed. munmap would then align back before unmapping the 16K aligned block.

mprotect similarly would only fail if the app is trying to do its own page management at page granularity. Many uses of mprotect are used on whatever mmap returned, and since that would be 16K aligned (or the above hack for file maps), it could similarly be made to work.

We are already tracking guest VMAs for mtrack, so adding the few extra things needed should be fairly uneventful.

I'm putting it in the 2212 milestone, hopefully the asahi side is ready by then.

@alyssarosenzweig
Copy link
Collaborator

On the Asahi side, we're pursuing microVMs as the solution here, rather than betting on hacks in FEX. There's not a lot of enthusiasm for this on the FEX side, given it will never work as a general solution and would be challenging technically. Closing as "not planned", as the relevant use cases are better served by krun (for now?).

@alyssarosenzweig alyssarosenzweig closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Milestone
Development

No branches or pull requests

3 participants