#
…

2023-03-14

00:07eilnmarcan: created a pull in m1n1 with the ane tunables
01:12zkrx has quit [Remote host closed the connection]
01:15zkrx has joined #asahi-dev
01:41mini0n has joined #asahi-dev
02:00barrett has quit [Ping timeout: 480 seconds]
02:10zef_ has joined #asahi-dev
02:17zef has quit [Ping timeout: 480 seconds]
02:30sirn has quit [Read error: Connection reset by peer]
02:31sirn has joined #asahi-dev
02:32skipwich has quit [Quit: DISCONNECT]
02:32skipwich has joined #asahi-dev
02:57barrett has joined #asahi-dev
03:05marcaneiln: saw that, might wait until the current crop of kernel issues/release is sorted before merging new stuff though
03:06eilnmarcan: got it
03:42Mary6 has quit []
03:42Cromulent has joined #asahi-dev
03:42Mary6 has joined #asahi-dev
03:57pbsds has quit [Quit: The Lounge - https://thelounge.chat]
03:59pbsds has joined #asahi-dev
04:12mini0n has quit [Read error: Connection reset by peer]
04:29barrett has quit [Ping timeout: 480 seconds]
05:20blacktop has joined #asahi-dev
05:22blacktopis there a way to get the verbose boot logs to be writen to a file when booting a custom kc?
05:25blacktop has quit [Quit: leaving]
05:33skipwich_ has joined #asahi-dev
05:34skipwich has quit [Read error: Connection reset by peer]
05:47blacktop has joined #asahi-dev
06:00gladiac has joined #asahi-dev
06:06chip_x has quit [Ping timeout: 480 seconds]
06:26blacktop has quit [Quit: leaving]
08:21MajorBiscuit has joined #asahi-dev
09:04Major_Biscuit has joined #asahi-dev
09:05MajorBiscuit has quit [Ping timeout: 480 seconds]
09:06nyilas has joined #asahi-dev
09:07nyilas has quit [Remote host closed the connection]
09:09nyilas has joined #asahi-dev
09:25mazamarioguy: if you can dump these results somewhere, I'll have a look at what it means for KVM, and whether we can shoehorn that or not.
09:32Hibyehello_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
09:32Hibyehello has joined #asahi-dev
09:37Hibyehello has quit [Quit: ZNC 1.8.2 - https://znc.in]
09:38Hibyehello has joined #asahi-dev
09:48nsklaus has joined #asahi-dev
10:24MajorBiscuit has joined #asahi-dev
10:27nyilas has quit [Remote host closed the connection]
10:32Major_Biscuit has quit [Ping timeout: 480 seconds]
10:43nyilas has joined #asahi-dev
10:46veeyee has joined #asahi-dev
10:51Cromulent has quit [Quit: Connection closed for inactivity]
11:22amarioguyshould be sufficient, poke me if you need anything else tested, testing config was t6002 Mac Studio in m1n1 console
11:27nsklaus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:30mazamarioguy: cool, thanks. one question I have is whether there is a control that allows the IMPDEF PMU to count at EL1&0 with HCR_EL2.{E2H,TGE}={1,0}. From what I've seen, it normally doesn't count when running a guest.
11:32mazgiven that the KVM virtual PMU is backed by perf counters, we would need the PMU to be able to count whilst running the guest.
11:32mazI'm very reluctant to make things up.
11:32marcanasahi-6.2-7 pushed de-mailboxed
11:33amarioguymaz: got it, there should be smth that allows that given apple's official virt solution needs that to work
11:34marcannot as much of a perf improvement as I'd hoped, but the diffstat is ~-50 lines of code vs upstream and might have fixed the reboot issues and obsoletes a pile of downstream mailbox patches we had trouble upstreaming that fixed various broken stuff
11:34mazamarioguy: I'd hope so. the alternative is to snapshot the cycle counter on each entry/exit of the guest, and only expose that.
11:35mazalso, when you say that PMMIR_EL1 is not trapped: does it mean it undefs at EL1? or is always readable from EL1?
11:36amarioguymaz: not trapped as in it's undefined
11:38mazamarioguy: OK, so they don't pretend to have PMUv3p4. I guess that leaves us with PMUv3p1 at best.
11:44mazmarcan: out of morbid curiosity, what was the issue with mailbox?
11:48mazamarioguy: in your description, you're saying "Apple specific PMU control reg writes still permitted when bit 56 is set (because the apple specific controls for PMCs/Uncore PMCs are independently trapped by bits 57-58)"
11:49amarioguymaz: that was mainly to clarify that this bit does not affect read/write of the impdef stuff since that's controlled by separate bits
11:49amarioguythink you mentioned wanting to know the effects of this on that?
11:49mazthey still honour HCR_EL2.TIDCP, right?
11:50mazif they don't, we have a bigger p[roblem...
11:50amarioguythe impdef pmus?
11:50amarioguytesting that now
11:50mazthey should trap irrespective of the IMPDEF bits if HCR_EL2.TIDCP is set.
11:51maz(and I mean when accessed from EL1, of course)
11:58amarioguymaz: good news, when HCR_EL2.TIDCP = 1, all the impdef PMU regs i tested reads/writes from EL1 with, trap to EL2
11:58amarioguyESR_EL1 = 0x6239fc11
11:59amarioguymarcan: quick feature request, can we please get an "bit set/bit clear" msr command in m1n1, would make bit twiddling much easier :P
11:59amarioguy(sorta joking but you know would be nice)
12:00amarioguy(test results are serious - that is the behavior i see, and the same is true of the Uncore PMCs too)
12:05marcanamarioguy: hint: s3_1_c15_c7_2 has the same layout as PMCR1_EL1, it's probably PMCR1_EL12 (and then s3_1_c15_c6_2 is probably PMCR1_EL2)
12:05marcanthere's probably a whole set of parallel impdef PMC registers for {E2H,TGE}={1,0}, as there is for most apple impdef stuff
12:06amarioguyahhhh crap
12:06amarioguygotta redo some test then
12:09amarioguywait my tests were with bit 27 = 0
12:09amarioguyjust double checked
12:17marcanamarioguy: the PMCs definitely count for me in EL1 with those bits set, and possibly others (checking)
12:20marcanconfirmed, that seems to be all you need to get them to count in EL1
12:20marcanalso s3_1_c15_c11_0 is some kind of global enable, if that is 0 the PMCs don't count (but it's 0xfffff by default)
12:22marcanmaz: re mailbox, it's just bad. atomic mode bugs, a fixed-size queue that errors out if full instead of blocking, missing a way to set up the mailbox and *then* enable reception once everything is set up, etc.
12:23marcanand it doesn't *do* anything for us, there is no useful common functionality whatsoever
12:23amarioguymarcan: ah thanks for checking
12:23marcanI literally took the mailbox driver, ripped out the parts that talk to the subsystem, and just made rtkit call into it directly
12:23marcannow it's faster and has fewer bugs and nonsense
12:23amarioguystill not the best at MSR bit twiddling :D
12:24svenstill a pity that you didn't get much performance improvements
12:24marcanyeah, oh well
12:24marcanmaybe the old driver would've gotten more actually
12:24marcanthe synchronous one
12:24marcanwith the async one the CPU is less in the way
12:24sveni would've expected those two or three context switches for each send to matter more but I guess the CPU is just too fast
12:24marcanit's quite possible some benchmarks will notice more
12:25marcanactually I should've tested sync mode...
12:31marcanokaaay terrain 147 -> 166 in sync mode
12:31marcanthat's 13% faster
12:32svendcp will full debug spew probably also won't overflow it anymore now
12:34marcanwait no I got it backwards, it's faster with mailbox lol
12:34marcanthis is dumb
12:34marcanmaybe it's just because it slightly multithreads where it otherwise wouldn't?
12:35marcanOTOH if actually hitting the hardware is the bottleneck, then my dedup thing should help in normal mode once I implement it
12:37jannauterrain fps results weren't that stable for me over multiple runs
12:37svenyou could also try to convert that threaded recv irq to a real irq handler
12:38sveniirc it was threaded because the original rtkit implementation used that as a hack
12:38sventhough I guess that helps both versions :)
12:40marcanoh I don't think we need that any more
12:41marcanrtkit already has a workqueue
12:41sveneven the initial submission I did had that
12:41svenI just forgot to remove it from mailbox
12:41amarioguysounds like this mailbox subsystem is... """interesting"""
12:41sventhe DT abstractions are nice and in theory the idea of mailbox also makes sense. it's just that there are >10 different hw implementations that make different assumptions about the API
12:42svenand the API was really built for very simple and dumb mailboxes
12:43svenit would be nice to improve that api ofc but the last tries weren't very successful *shrug*
12:53darkapex has joined #asahi-dev
12:56darkapex1 has quit [Ping timeout: 480 seconds]
12:57darkapex1 has joined #asahi-dev
12:57barrett has joined #asahi-dev
13:01barrett has quit [Remote host closed the connection]
13:02darkapex has quit [Ping timeout: 480 seconds]
13:06Bey0ndB1nary has joined #asahi-dev
13:09darkapex1 has quit []
13:12darkapex has joined #asahi-dev
13:17j`ey_ is now known as j`ey
13:48kujeger has quit [Ping timeout: 480 seconds]
14:13nsklaus has joined #asahi-dev
14:20kujeger has joined #asahi-dev
14:21balrog has quit [Quit: Bye]
14:25nsklaus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:30nsklaus has joined #asahi-dev
14:38darkapex1 has joined #asahi-dev
14:39darkapex has quit [Ping timeout: 480 seconds]
14:53eiln has quit [Remote host closed the connection]
15:02balrog has joined #asahi-dev
15:11jannausomething strange: with mbox, rtkit, sart and nvme built-in the nvme probes only after other rtkit drivers (those start probing after waiting 10s on the root device)
15:13jannaushouldn't APPLE_RTKIT select APPLE_MBOX?
15:13marcanit doesn't?
15:14marcanoh wait this is the DT thing isn't it. ugh.
15:15marcanokay fine I'll make it a real driver
15:33jannauKconfig for mbox and rtkit is fine, I was surprised that could deselect APPLE_MBOX. That seems to be caused by ASAHI selecting RTKIT. Kconfig documentation warns about this
15:37MajorBiscuit has quit [Ping timeout: 480 seconds]
15:38MajorBiscuit has joined #asahi-dev
15:41jannauI guess the short term fix is that RUST_APPLE_RTKIT needs to slect APPLE_MBOX
16:02c10l has quit [Ping timeout: 480 seconds]
16:04marcan 9 files changed, 534 insertions(+), 535 deletions(-)
16:05marcanso much for my -50 lines... sigh
16:11nsklaus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:17marcanasahi-6.2-9 pushed, making asahi-dev packages now
16:18jannautesting now with modules enabled
16:18marcanedge should have everything as modules so we'll see
16:18marcanalso in theory on edge, dropping the asahi mkinitcpio hook now shouldn't leave your system totally unbootable I think
16:18marcanwhich is a nice bonus
16:18axboedrivers/soc/apple/rtkit.c:674:6: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
16:18axboelooks legit
16:19axboesorry :/
16:19marcanit's 1am ok :p
16:20marcanthere, asahi-6.2-10
16:21* axboechecks
16:21axboeclean as a whistle
16:22axboeboots too
16:22jannau-9 exploded while booting
16:23axboebooted for me, but "hung" on the loading screen for a while
16:23marcanuh, the changes I just made should've fixed that
16:23axboeyep -10 looks good to me
16:23axboeit was in reference to -9
16:23marcanoh 9 had that UB so who knows what that did
16:23marcanworked for me but eh
16:24axboeliving dangerously
16:24marcanalso I'd forgotten to remove the old header file
16:24marcan 10 files changed, 530 insertions(+), 554 deletions(-)
16:24marcanwe're back to some measurable reduction in code
16:25jannau-10 looks good
16:39marcanfor people with M2s, can I get some confirmation of keyboard codes? `dmesg | grep 'Keyboard type'`
16:39marcan(and what layout you have)
16:41marcanjannau: you have iso layout, right?
16:41jannau'dockchannel-hid 24eb30000.input: Keyboard type: 1' (macbook pro 13", german)
16:43jannaumarcan: do you remember where the '% 3' was coming from? maybe ansi is 7 instead of 0
16:43marcanthe % 3 was a guess
16:43marcanit was wrong
16:43marcan7 seems to be J413 ansi
16:44marcanguessing 6 is ISO but I don't have that data point
16:44marcan3/4/5 are unknown
16:44mazmarcan: [ 1.528928] dockchannel-hid 24eb30000.input: Keyboard type: 7
16:44marcanM2 Air US?
16:44mazUS ANSI, I believe.
16:44marcanyeah, that tracks
16:45marcanwould be nice to have someone with the ISO layout on that one
16:45marcanthen I'm just missing ANSI M2 Pro
16:45marcanbut I think that's 0?
16:47bluetail4 has joined #asahi-dev
16:47axboeI'll get my m2 installed as soon as it's in the installer...
16:47jannaujapanese air has Keyboard type 8?
16:48jannauaxboe: not yet speaking about the m2 pro/max models
16:48marcanthat's where the %3 guess came from, and the assumption that there was a model they scrapped between those two (or out of order)
16:48marcanbut it looks like the ordering doesn't follow a neat pattern like that
16:48axboejannau: oh...
16:49nsklaus has joined #asahi-dev
16:50nsklaus has quit []
16:50nsklaus has joined #asahi-dev
16:50nsklaus has quit []
16:52* mazholds off buying another M2 until there is something that actually boots.
16:54bluetail has quit [Ping timeout: 480 seconds]
16:56jannaumaybe we should just use kblang-calibration, we still have to make a distinction between different iso layouts in hid-apple
16:56bluetail4 has quit [Ping timeout: 480 seconds]
16:57marcanyes, the problem is that doesn't map 1:1 to the HID codes IIRC
16:57marcanthough we can map it N:1 of course
16:58marcanjannau: does hid-apple actually need to know more than iso/ansi/jis? I thought it only checked that (it can only check that, those are the only three types ever exposed in hid->country)
17:01psykose has quit [Remote host closed the connection]
17:02psykose has joined #asahi-dev
17:03veeyee has quit [Quit: Leaving.]
17:04marcanOTOH using kblang-calibration would mean we don't need to touch the driver for new devices...
17:05marcananyway, the table so far pushed to bits/090-spi-hid and asahi-wip (no tag for now)
17:05marcanI should sleep :p
17:05marcanalso -asahi10 package in asahi-dev now
17:06jannauhid.country=iso is unfortunately not enough information, there are apple iso layouts which have KEY_GRAVE on KEY_102ND and others not
17:06jannaugood night
17:07marcanjannau: I thought that flag was for iso vs non-iso, implying that all ISO layouts needed the quirk by default
17:10jannauI orginally tought so too but it differs between iso english international and german (and a other european languages)
17:11jannauI now suspect it's original intention was to make apple's iso international layout similar to the PC us international layout
17:13jannauor fixing various european iso layouts
17:14marcanI was using Greek as a test and apparently... normal Greek keyboards just have that key duplicated?
17:14marcanand so Apple decided to put backtick/tilde on 102nd and put some other stuff left of 1
17:14marcanokay, this is a mess
17:15marcanthis needs to be fixed in xkb, not as a hack in the driver
17:15marcanwe should be moving *away* from stupid driver quirks
17:15marcanwe need a pile of proper Mac layouts in xkb that actually work
17:15marcananyway, good night
17:33tobhe has joined #asahi-dev
17:35tobhe_ has quit [Ping timeout: 480 seconds]
18:02Bey0ndB1nary has quit []
18:04MajorBiscuit has quit [Quit: WeeChat 3.6]
18:05tobhe_ has joined #asahi-dev
18:11tobhe has quit [Ping timeout: 480 seconds]
18:13c10l has joined #asahi-dev
18:24eric_engestrommarcan: just saw your toot, I have what you're looking for: m2 air with iso keyboard
18:24eric_engestromhow can I help?
18:25jannaueric_engestrom: `dmesg | grep 'Keyboard type'`
18:26jannauthanks, not your fault but apple's
18:27jannauapparently they botched the keyboard type for ansi keyboard on the m2 air
18:27c10l has quit [Quit: Bye o/]
18:28jannauor they use the same type for ansi and iso
18:28eric_engestromor maybe I misremember what I got
18:28eric_engestromhow do I check?
18:30eric_engestromyeah, international english iso
18:34c10l has joined #asahi-dev
19:10___nick___ has joined #asahi-dev
19:39Cyrinux97 too for azerty keyboard
19:40___nick___ has quit []
19:43___nick___ has joined #asahi-dev
19:43___nick___ has quit []
19:46___nick___ has joined #asahi-dev
19:58bcrumb has joined #asahi-dev
20:01bcrumb has quit []
20:12hightower2 has joined #asahi-dev
20:55crabbedhaloablut has quit []
21:03crabbedhaloablut has joined #asahi-dev
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:14crabbedhaloablut has quit []
21:25crabbedhaloablut has joined #asahi-dev
22:04nyilas has quit [Remote host closed the connection]
22:42stipa is now known as Guest7738
22:42stipa has joined #asahi-dev
22:42kesslerd has joined #asahi-dev
22:43Guest7738 has quit [Read error: Connection reset by peer]
23:39eiln has joined #asahi-dev
…