#
#asahi · 2024-10-11 11:12
nickchancpu page size
#asahi · 2024-10-11 11:12
nickchanchaos_princess: the dart is the same a7-a10x so it seems like apple just didn't bother to change the dart when they changed the page size
#asahi · 2024-10-11 11:08
nickchanmaybe it's less pain
#asahi · 2024-10-11 11:08
nickchanthough that's a reverse situation than 4k kernels on asahi
#asahi · 2024-10-11 11:08
chaos_princessi can see how that happened, but still
#asahi · 2024-10-11 11:07
nickchanchaos_princess: DART on A9-A10X is 4K page but the CPU only support 16K and 64K isn't it lovely (not)
#asahi · 2024-10-11 10:58
chaos_princessneed to fight hardware all the way since it assumes 16k everywhere, and costs cpu performance due to tlb overhead and similar
#asahi · 2024-10-11 10:57
aut0chaos_princess you mentioned that was abandoned for technical reasons, are there details on that?
#asahi · 2024-10-11 10:55
aut0Mhm, doesn't make my life easer :-D. Brings me back to the original question of running a 4k asahi kernel
#asahi · 2024-10-11 10:55
aut0ah right, yes that was what i was worried about that the host s2 would be used
#asahi · 2024-10-11 10:53
j`eyaut0: https://oftc.irclog.whitequark.org/asahi/2024-10-11#33647360; from here on
#asahi · 2024-10-11 10:52
j`eyaut0: turns out the guest hypervisor needs to use 16K pages too
#asahi · 2024-10-11 10:52
aut0it seems like i am running into some FEAT_GTG related check error
#asahi · 2024-10-11 10:51
mazagain, we're only emulating S2, not S1.
#asahi · 2024-10-11 10:51
chaos_princesss/same/different/
#asahi · 2024-10-11 10:51
chaos_princessright, and that is why it does not care what the host page size is, and can use the same page size
#asahi · 2024-10-11 10:51
mazthe intermediate S2 can be bigger or the same. just not smaller. the last-level guest doesn't have any of its translation emulated, so it can do whatever it wants.
#asahi · 2024-10-11 10:51
nickchanchaos_princess: the innermost guest doesn't run a virtual machine of its own
#asahi · 2024-10-11 10:50
chaos_princess?
#asahi · 2024-10-11 10:49
chaos_princessso, since the intermediate guest's shadow page tables become shadow page tables in the host, it must be the same, but the innermost guest uses normal page tables, so it can be different size - correct
#asahi · 2024-10-11 10:49
j`eyaut0 left, gotta let them know this if they return
#asahi · 2024-10-11 10:48
chaos_princessyea, ok, got it
#asahi · 2024-10-11 10:48
nickchanBut that sounds like a horrible horrible idea that is very complicated and with questionable utility
#asahi · 2024-10-11 10:48
nickchanfor different contexts
#asahi · 2024-10-11 10:48
chaos_princessah, i get it now
#asahi · 2024-10-11 10:48
mazbecause you don't *emulate* anything.
#asahi · 2024-10-11 10:47
chaos_princessok.... but how does 16->4 work in non-nv scenario then?
#asahi · 2024-10-11 10:47
nickchanmaz: multiple set of page tables...
#asahi · 2024-10-11 10:47
j`eyoh damn
#asahi · 2024-10-11 10:47
mazthat's because you emulate the guest's S2 using the host's S2.
#asahi · 2024-10-11 10:46
maz4k -> 16k is fine, but 16k -> 4k isn't.
#asahi · 2024-10-11 10:46
maznews flash, you can't.
#asahi · 2024-10-11 10:46
mazyou flatten the translations indeed. but you need to honor the guest's hypervisor permissions at the granularity it decides. if that guest is using 4kB translations, and the host is using 16k translations, how do you fit 4 different permissions that the guest decide to use on a single page?
#asahi · 2024-10-11 10:44
chaos_princessok, i admit that i don't fully understand nv, but isn't it done by basically flattening the vm tree?
#asahi · 2024-10-11 10:43
mazstage-2 translation.
#asahi · 2024-10-11 10:42
mazoh wait, now you need sub-page permissions.
#asahi · 2024-10-11 10:42
chaos_princesswhat is s2, shadow page table?
#asahi · 2024-10-11 10:42
mazcrucially, with different permissions.
#asahi · 2024-10-11 10:42
mazthink of a 16k-based S2 on a host. How do you allow a 4k-based S2 in a guest?
#asahi · 2024-10-11 10:41
chaos_princessso, 16k -> 16k -> 4k is ok, but not 16k -> 4k -> 4k?
#asahi · 2024-10-11 10:41
chaos_princesshuh?
#asahi · 2024-10-11 10:40
mazyou can't have a guest hypervisor using a smaller page size than its host.
#asahi · 2024-10-11 10:21
aut0chaos_princess, thanks will keep trying :)
#asahi · 2024-10-11 10:21
aut0chaos_princess yes
#asahi · 2024-10-11 10:21
aut0chaos_princess, except patches from maz i think
#asahi · 2024-10-11 10:21
chaos_princess(except for nested virt)
#asahi · 2024-10-11 10:21
chaos_princessthat scenario also should just work without patches
#asahi · 2024-10-11 10:20
aut0j`ey, the scenario is host hypervisor (asahi linux) -> Guest Hypervisor (4k page size) -> Guest Hypervisor Guest VM (4k page size)
#asahi · 2024-10-11 10:20
chaos_princesswell, yes, that just works, you do not need extra patches
#asahi · 2024-10-11 10:19
aut0chaos_princess i saw that in alyssa's talk yesterday

plus ›