#asahi · 2024-11-11 17:37
mazyeah. that's just bogus.#asahi · 2024-11-11 17:18
mazI guess the allocation fails because it ends-up with 0 pages.#asahi · 2024-11-11 17:11
mazEFI mandates 4k indeed. but it shouldn't apply to the payload being booted.#asahi · 2024-10-24 14:25
mazwhich is in 6.11.#asahi · 2024-10-24 14:25
mazsome additional named events have been added in 3cce331ee2a4cc99328757a9bd297ad9a39609e8#asahi · 2024-10-24 14:25
mazyou can access all events if you specify the raw number.#asahi · 2024-10-24 09:57
mazyup, that one.#asahi · 2024-10-24 09:57
mazperf_event_open(2)#asahi · 2024-10-24 09:43
mazhopefully the perf code should give you an idea of what is needed for that.#asahi · 2024-10-24 09:42
mazI never tried that myself though.#asahi · 2024-10-24 09:42
mazyou can't directly access the counters from userspace, but you should be able to call into the perf API to add a counter, run the bit of code you're interested in, and read back the counter right after it.#asahi · 2024-10-24 09:22
mazperf is the way.#asahi · 2024-10-11 10:51
mazagain, we're only emulating S2, not S1.#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:48
mazbecause you don't *emulate* anything.#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:43
mazstage-2 translation.#asahi · 2024-10-11 10:42
mazoh wait, now you need sub-page permissions.#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:40
mazyou can't have a guest hypervisor using a smaller page size than its host.#asahi · 2024-10-10 12:43
mazwithout a clear description of what you are trying to achieve, it is a bit hard to define the boundaries of such an interface. Also, who is going to maintain that? with what userspace? I'm sure you are doing interesting stuff, but there is a balance to be found. Also, this is getting way OT ;-)#asahi · 2024-10-10 12:36
mazaut0: a marginally better option would be to trap all timer accesses and route all of that to userspace. You get to implement everything there, and the kernel doesn't get in the way.#asahi · 2024-10-10 12:21
mazit's a bad idea, it makes the code far worse than it needs to be, and it serves no real purpose. #asahi · 2024-10-10 12:20
mazaut0: which is my point. I don't want it to work.#asahi · 2024-10-10 11:38
mazyou can't really do nested with it anyway, because you'd have to track the nesting in userspace (how are you going to handle a write to a LR, for example?)#asahi · 2024-10-10 11:36
mazno, but it has been broken for years, and I don't plan to fix it.#asahi · 2024-10-10 11:33
mazaut0: I don't really see the point, but sure, why not. Note that I intend to finish the removal of timer interrupt signalling to userspace very shortly.#asahi · 2024-10-10 11:29
mazaut0: no GIC, no fun. M2 has barely enough GIC support to make it workable, but anything less can burn in hell.#asahi · 2024-10-09 14:34
mazchaos_princess: saw that one a while ago, but clearly vendors don't align with that.#asahi · 2024-10-09 14:32
mazbut you are on your own when it comes to userspace.#asahi · 2024-10-09 14:32
mazaut0: my current sandbox is at https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/nv-next-fruit#asahi · 2024-10-09 14:29
mazso far, what I found was more in the 15k category...#asahi · 2024-10-09 14:29
mazchaos_princess: under 5k? where?#asahi · 2024-10-09 14:29
mazaut0: it is doubtful that you are testing it, unless you are directly picking the patches from my tree. and if you do, the way to report issues is to post on the kvmarm list.#asahi · 2024-10-08 08:58
maznor in any official tree. it will take some time (“Eternity is awful long time, especially towards the end.”)#asahi · 2024-09-26 09:32
mazj`ey: not on Fedora, but I regularly use x86 cross-compilers on my Debian arm64 host. only to build kernels though, so YMMV.#asahi · 2024-06-18 09:00
mazI now fully understand why the HW folks keep pestering me with the complexity of the walks. and that's without any of POE, D128 LPAx and D128!#asahi · 2024-06-18 08:57
mazyup, and that's still the fast path. but now we are able to handle the failures gracefully and report accurate level information.#asahi · 2024-06-18 08:55
mazj`ey: for system instructions only. I needed the PTW to emulate AT correctly, even when the page-tables are incomplete or swapped out.#asahi · 2024-06-18 08:51
mazwrote*#asahi · 2024-06-18 08:51
maz(I just write a full stage-1 PTW, and it's fun. not)#asahi · 2024-06-18 08:44
mazand it's definitely *not* ready.#asahi · 2024-06-18 08:44
mazzj: it will be ready when it is ready. i.e. when I decide it is.#asahi · 2024-06-15 09:38
mazj`ey: only a guess, I haven't actually checked.#asahi · 2024-06-15 09:37
mazI guess dcp is connected to the HDMI output on M1-Ultra#asahi · 2024-05-30 16:40
mazj`ey: watch it! ;-)