hypervisor: increase ipa limit from 36 bits to 39#127
Conversation
|
Just a note: according to switchbrew, the virtual user address space can have 38 bits at most (https://switchbrew.org/wiki/Memory_layout), so I guess 39 bits for the physical one should be enough. I will just test the PR and then merge it afterwards |
I'm not 100% sure how hydra handles the address space but from what I can tell, Hydra maps the host memory address to the guest's "physical" address (ipa) 1:1, and then the guest virtual address is mapped with TTBR0, (which is hydra's One way we could probably fix this completely is to skip the |
Disabling the MMU would be viable only on Tahoe and later as before that the physical address space supported only 16KiB pages (and the Switch uses 4KiB ones) |
c906a37 to
73e5f30
Compare
73e5f30 to
3aab152
Compare
|
Marking this as draft for now because as far as I can tell, Edit: |
|
@exverge-0 I get |
That's |
|
It works now, but I tried logging |
|
According to an "Apple" QEMU patch (this is the closest thing to documentation I could find), 36 bits is the default on all systems with 39 bits being the max on macOS 13+ and 40 on 15+, so I have no idea why your machine would only support 36. (unless you're on a version lower than that?) Either way I'd still recommend you merge this as at least on my machine (M4 on both 26 & 27), |
Ok great, I will merge this then once you've reverted those kernel changes 👍 |
This reverts commit f90ba2c.
Increases IPA limit from the default 36 bits to 39.
I also replaced
posix_memalignwithmmapas the Apple documentation advises against it.