#asahi-dev · 2022-12-15 13:06
marcankarpouzi: that patch is not upstream, I think it was never merged#asahi-dev · 2022-12-15 11:41
marcanand then we'll find out exactly what we can do with it#asahi-dev · 2022-12-15 11:41
marcanbecause the short-term solution is almost certainly going to be a m1n1 option to enable TSO globally, and a /chosen/asahi,tso flag so userspace can know it's available#asahi-dev · 2022-12-15 11:41
marcanmind you, yeah I was just about to say that#asahi-dev · 2022-12-15 11:40
marcanand so there might come a day, if things work out like that, where gaming on Macs ends up being conditional on Linux supporting that TSO bit#asahi-dev · 2022-12-15 11:39
marcanbut we'll get there eventually#asahi-dev · 2022-12-15 11:39
marcanobviously we're some time away from that point#asahi-dev · 2022-12-15 11:39
marcanbut if it's "you can actually play x86 games at good performance on fanless laptops with better graphics than on macOS with three graphics translation layers, but only if Linux supports this one thing" then...#asahi-dev · 2022-12-15 11:38
marcanas I said, if it's 5%, whatever#asahi-dev · 2022-12-15 11:38
marcanright, I think the issue here is how much benefit we get out of it#asahi-dev · 2022-12-15 11:37
marcan(if it's like 5% benefit for normal load/stores and TSO over normal mode and atomics, I don't care)#asahi-dev · 2022-12-15 11:37
marcan(mind you, this is all conditional on TSO actually mattering - it's entirely possible FEX could just use atomics everywhere and not lose too much, we'll find out once I put a knob for systemwide TSO in m1n1 so they can try both)#asahi-dev · 2022-12-15 11:36
marcanthe reality is we have a huge amount of hardware out there that could potentially benefit from this, and if that conflicts with kernel policy, that's kind of a problem#asahi-dev · 2022-12-15 11:35
marcanbut if there's a bit I can flip to make FEX not suck the calculus is different#asahi-dev · 2022-12-15 11:35
marcanI have no intention of implementing AMX because that sounds like a giant pain, with more EL0 state and undocumented *instructions* and just no#asahi-dev · 2022-12-15 11:35
marcanto be clear, my policy here isn't to implement all the Apple nonsense, kernel be damned#asahi-dev · 2022-12-15 11:34
marcanyeah, I'm just saying, if upstream doesn't want this to happen whatsoever, I don't see ourselves not doing it downstream if the benefits are significant#asahi-dev · 2022-12-15 11:33
marcanI'm not a fan of IMP-DEF nonsense but I see why Apple did what they did here#asahi-dev · 2022-12-15 11:33
marcandon't blame me for every other vendor failing to deliver#asahi-dev · 2022-12-15 11:33
marcanwell, this hardware is also twice as fast as the competition already :)#asahi-dev · 2022-12-15 11:32
marcanand even if M4 or whatever ends up doing it a more "standard" way, I'm not keen on leaving earlier users screwed#asahi-dev · 2022-12-15 11:32
marcanI don't have a particularly big horse in this race, but if FEX ends up being like twice as fast with TSO mode the end result is just going to be us supporting it downstream and ending up with the resulting API fork, because it's too much benefit to just leave on the table#asahi-dev · 2022-12-15 11:29
marcanbut then with nested virt you have the same problem#asahi-dev · 2022-12-15 11:29
marcanOTOH there is an argument that x86 emu folks should use VMs anyway to get 4K pages, which could also involve a VM-global TSO switch#asahi-dev · 2022-12-15 11:29
marcansure, but that seems like a somewhat orthogonal problem to support at EL2 for userspace purposes?#asahi-dev · 2022-12-15 11:27
marcannull: IIRC you can actually control whether VMs trap to EL2 or not for this#asahi-dev · 2022-12-15 11:26
marcanoh like kvm VMs?#asahi-dev · 2022-12-15 11:25
marcanhm, what's the distinction exactly?#asahi-dev · 2022-12-15 11:25
marcanmaz: so what you're saying is we should just enable it downstream and let the gamer voices eventually become loud enough to annoy upstream into finding a solution ;)#asahi-dev · 2022-12-15 11:21
marcanI get your point but I don't see how you could possibly do both#asahi-dev · 2022-12-15 11:21
marcanyeah okay, any better ideas besides crippling performance of x86 emulation? :p#asahi-dev · 2022-12-15 11:20
marcanthis is intended for x86 emulators#asahi-dev · 2022-12-15 11:19
marcanuh... effective fork of the whole userspace ABI?#asahi-dev · 2022-12-15 11:16
marcanmaz: re TSO, how much pushback do you think I'll get for trying to get it added to prctl? :p#asahi-dev · 2022-12-15 08:03
marcan(this is why I prefer to do DT changes via our tree, because then I don't have to wait for the upstream merge to get dependencies in and it avoids the merge conflicts)#asahi-dev · 2022-12-15 08:02
marcanzzywysm: looks sane, and that reminds me I should send out the t600x bluetooth changes too (those are in the intersection of two things now already merged in)#asahi-dev · 2022-12-14 14:30
marcansent the fix#asahi-dev · 2022-12-14 14:20
marcanlooking at the nvmem code, I see what happened: there's a race where it registers the nvmem device before adding its cells, so you can end up with a consumer not getting deferred but still failing to find cells#asahi-dev · 2022-12-14 14:19
marcanwell that's a new one#asahi-dev · 2022-12-14 14:19
marcan[ 0.487375] macsmc-rtc macsmc-rtc: error -ENOENT: Failed to get rtc_offset NVMEM cell#asahi-dev · 2022-12-13 16:38
marcanncopa: I assume you saw https://github.com/AsahiLinux/docs/wiki/Open-OS-Ecosystem-on-Apple-Silicon-Macs#asahi-dev · 2022-12-13 09:06
marcanyeah, makes sense#asahi-dev · 2022-12-13 08:46
marcanit could be something dumb like that#asahi-dev · 2022-12-13 08:46
marcancyrozap: I already fixed one of these in the FireWire OHCI driver - some JMicron controllers overread queue entries (because they read a fixed size regardless of the queue entry type), so the driver has to leave a bit of space at the end to avoid it ever overreading into unmapped space#asahi-dev · 2022-12-13 08:44
marcanah neat, drm_of_component_* is a thing#asahi-dev · 2022-12-13 08:29
marcanit could also be a driver issue though, perhaps a bad interaction with that particular IOMMU driver#asahi-dev · 2022-12-13 08:28
marcantell me about it (I wrote the QEMU virtual xHCI emulation...)#asahi-dev · 2022-12-13 08:25
marcand#asahi-dev · 2022-12-13 08:05
marcanlike policy->suspend_freq = dev_pm_opp_get_suspend_opp_freq(...) / 1000#asahi-dev · 2022-12-13 08:05
marcankettenis: not with the current driver, the code would have to be changed to explicitly pick that up from the OPP