#asahi-dev · 2022-09-08 12:57
skmp__if upstream doesn't want to collaborate with the end users, people will end up keeping patchsets#asahi-dev · 2022-09-08 12:57
skmp__but one way or the other, if people want to have x86 emulation, 4K pages are a given#asahi-dev · 2022-09-08 12:56
skmp__there's some tricks that can be used to make it less work#asahi-dev · 2022-09-08 12:55
skmp__and the relevant code / people to discuss#asahi-dev · 2022-09-08 12:55
skmp__@j`ey yeah, I'm just trying to figure out the upstreams right now#asahi-dev · 2022-09-08 12:54
skmp__that's all I care about#asahi-dev · 2022-09-08 12:54
skmp__opengl, vulkan#asahi-dev · 2022-09-08 12:54
skmp__> @marcan you'd only have an interworking problem if those system libraries for some reason used shared memory / protocols that depend on the page size#asahi-dev · 2022-09-08 06:52
skmp__I like* so much (damn today I keep mistyping, brb coffee + cat petting time)#asahi-dev · 2022-09-08 06:50
skmp__though, honestly, this 'bpf as a secure vm in kernel space' thing is something I don't like so much#asahi-dev · 2022-09-08 06:49
skmp__another semi-programmable middle ground could be to re-repurpose BPFs and give hooks where userspace can do what it wants, akin to how seccomp does#asahi-dev · 2022-09-08 06:46
skmp__though, conceptually, it would avoid (forward to userspace) all of those concerns#asahi-dev · 2022-09-08 06:45
skmp__maybe something more exotic that opens new frontiers would, but then again maybe the scope is much better so it won't#asahi-dev · 2022-09-08 06:45
skmp__I'm not sure a fix specifically for x86/64 emulation for linux on m1 would justify inclusion in the kernel#asahi-dev · 2022-09-08 06:44
skmp__I also poked quite a bit in that userspace paging idea - which I find much, much more exciting and extendable#asahi-dev · 2022-09-08 06:43
skmp__(s/supporting/exposing IG)#asahi-dev · 2022-09-08 06:42
skmp__I guess I also see the value of the NT kernel only supporting '64k' segments for maps even on '4k' page hosts - as much as I hated it back then I had to work around it#asahi-dev · 2022-09-08 06:41
skmp__to transparently forward#asahi-dev · 2022-09-08 06:40
skmp__we still need to be able to use host libraries in the same address space - say host opengl driver stack#asahi-dev · 2022-09-08 06:40
skmp__there's also the extra complication of interworking, even if the guest is happy and all#asahi-dev · 2022-09-08 06:40
skmp__it's a fun little problem to think before bedtime :P#asahi-dev · 2022-09-08 06:39
skmp__so maybe I overvalue how much games do the same#asahi-dev · 2022-09-08 06:39
skmp__but then again, I've been working in user space that intimetally plays with specific page sizes and semantics since for ever at this point#asahi-dev · 2022-09-08 06:38
skmp__though, I'm very uneasy of how many unhandled cases that approach has#asahi-dev · 2022-09-08 06:36
skmp__s/used/kept#asahi-dev · 2022-09-08 06:35
skmp__but nothing that can't be worked around - more so since userspace vma mappings are used#asahi-dev · 2022-09-08 06:35
skmp__there's one complication of mremap that wasn't accounted in our previous discussion there#asahi-dev · 2022-09-08 06:34
skmp__(though i'm no longer directly involved in fex)#asahi-dev · 2022-09-08 06:34
skmp__yeah I recall that, I took some notes#asahi-dev · 2022-09-08 06:34
skmp__I'm familiar with the vm 'frontend' (application <-> vma ranges interactions) as that was needed to cross check that the userspace vma tracking matched kernel#asahi-dev · 2022-09-08 06:32
skmp__yeah, that documents some form of higher order pages and also gives context on how things fit together as well as gotchas #asahi-dev · 2022-09-08 06:31
skmp__@marcan: I'd be interested for this use case (emulation in a system that the 'best' page size isn't 4k) for now, so not sure if it needs to be 'real' 4k or not#asahi-dev · 2022-09-08 00:18
skmp__which seems to be highly informative and a pretty good read, if the codebase is still similar#asahi-dev · 2022-09-07 23:57
skmp__(mainly https://www.researchgate.net/publication/2566253_Multiple_Page_Size_Support_in_the_Linux_Kernel )#asahi-dev · 2022-09-07 23:56
skmp__I've found some ibm papers, but they are from 200..2?#asahi-dev · 2022-09-07 23:55
skmp__4K page* that is#asahi-dev · 2022-09-07 23:55
skmp__o/ @marcan, in continuation of our discussion in fex-emu's tracker, got any pointers on where to get me started to poke at 4K support?