#
…

2021-03-28

00:00choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
00:05jeffmiw has joined #asahi
00:09jeffmiw has quit [Ping timeout: 252 seconds]
00:16raster has quit [Quit: Gettin' stinky!]
00:21bishopdynamics has joined #asahi
00:27bishopdynamics has quit [Quit: My machine has gone to sleep. ZZZzzz…]
00:44solarkraft has joined #asahi
00:46Nazral has joined #asahi
01:03troseman has joined #asahi
01:05troseman_ has joined #asahi
01:09troseman has quit [Ping timeout: 246 seconds]
01:27anarsoul has quit [Ping timeout: 245 seconds]
01:32anarsoul has joined #asahi
01:37solarkraft_ has joined #asahi
01:38solarkraft has quit [Ping timeout: 268 seconds]
01:42odmir has quit [Remote host closed the connection]
01:43odmir has joined #asahi
01:45troseman_ has quit [Quit: Leaving]
01:45troseman has joined #asahi
01:46riker77_ has joined #asahi
01:48odmir has quit [Ping timeout: 246 seconds]
01:48riker77 has quit [Ping timeout: 276 seconds]
01:48riker77_ is now known as riker77
02:00zkrx has quit [Ping timeout: 240 seconds]
02:14odmir has joined #asahi
02:21zkrx has joined #asahi
02:31solarkraft has joined #asahi
02:32solarkraft_ has quit [Ping timeout: 268 seconds]
02:41odmir has quit [Ping timeout: 246 seconds]
02:47PhilippvK has joined #asahi
02:47phiologe has quit [Ping timeout: 276 seconds]
02:58odmir has joined #asahi
03:08solarkraft_ has joined #asahi
03:09solarkraft has quit [Ping timeout: 265 seconds]
03:17marvin24 has quit [Ping timeout: 245 seconds]
03:18marvin24 has joined #asahi
03:25odmir has quit [Remote host closed the connection]
03:57rwhitby has joined #asahi
04:36troseman has quit [Quit: Leaving]
05:07solarkraft_ has quit [Read error: Connection reset by peer]
05:08solarkraft has joined #asahi
05:24solarkraft has quit [Ping timeout: 240 seconds]
05:43VinDuv has joined #asahi
07:03jeffmiw has joined #asahi
07:08jeffmiw has quit [Ping timeout: 265 seconds]
07:15marshmallow has quit [Ping timeout: 246 seconds]
07:50marcanmaz: I did mention that the mask registers don't work if TGE=1, right? so if Linux leaves the guest timers active when context switching out of the VM, that won't work
07:50marcanmaybe that explains the "edge triggered" thing you saw?
07:52vimal has quit [Ping timeout: 252 seconds]
08:15vimal has joined #asahi
08:17vimal has quit [Max SendQ exceeded]
08:17vimal has joined #asahi
08:22sirn has quit [Quit: Connection closed for inactivity]
09:00izzyisles[m] has quit [Quit: Idle for 30+ days]
09:53VinDuv has quit [Quit: Leaving.]
10:14uartman[m] has joined #asahi
10:42raster has joined #asahi
10:52mazmarcan: not really. I ran a little experiment to try a find when the ISR_EL1.F bit gets cleared.
10:52marcanfyi, I ended up adding EL1 support to the AIC driver since it turned out pretty easy (just guarding some stuff and mapping the IRQs differently in the translate function)
10:52marcanjust pushed that now
10:53mazmarcan: it just takes a read of CNTP_CTL_EL0 to see the bit drop to 0.
10:53marcanit's good enoug to boot after a chainload.py --el1 to m1n1, with nosmp (nosmp because I don't virtualize CPU spin-up, so the secondaries come up in EL2 and that explodes)
10:54marcanare you sure it's not a synchronization issue?
10:54marcanthough we do issue an isb...
10:54maznah. there are more ISBs that you can imagine in that sequence.
10:55marcanso wait, this is with FIQs trapped to EL2, right?
10:55mazFIQs routed to EL2, not even with any virtualisation going on.
10:56mazread ISR before reading CNTP_CTL, F is set. read it again, it is clear.
10:56marcanand with everything idle, and the timers masked, setting up a timer to fire you see it raising a FIQ in EL2?
10:56marcanwith TGE=0?
10:56mazTGE=1, I'm on the host.
10:56marcanyeah, it doesn't work in the host
10:56marcanthe guest timer masking only works with TGE=0
10:57mazthat's not the point. FIQ acts as a edge triggered interrupt, and the ack is the read of the CNT registerse.
10:57mazregisters*
10:58mazI'm talking about the HV registers here (though the guest regs behave the exact same way).
10:59marcanmaz: wait wait, are you saying that *all* the timers are *always* edge^triggered?
11:00marcanlike, the HV ones too?
11:01mazunless I've messed up my experiment (not unlikely), it looks like it.
11:03marcanI just tried it in timer_test.py and I don't see that
11:03marcanthe ISR_EL1 bit remains set (FIQ masked in DAIF)
11:04marcanI will say I *used* to think the mask register did some weird edge triggered stuff, until I realized I was missing an isb after setting TGE=0, and what I was seeing it was it not taking effect until after the first exception was taken
11:04marcanwhich is why I keep asking about isbs :-)
11:10marcanmaz: is it possible that TGE gets flipped to 1 at some point with the guest timers still firing? in that case you would get FIQs delivered to EL2
11:11marcanthough that's about the masking, I certainly can't explain any kind of edge-triggered-like behavior for the HV timers
11:15mazmarcan: we do restore the timers with TGE=1, always. but if it was a level, that interrupt would keep firing forever, because I'm not using this mask *at all*.
11:15mazand it doesn't.
11:16maznothing in the interrupt handler clears the timer.
11:16mazit stay active.
11:21svenmarcan: you'll do nvme next, right? any objections if i take a stab at i2c and that ti chip then to get closer to working usb? or is there anything else you think should come first?
11:22marcanmaz: wait, I just found something
11:22marcanremember we had the vGIC issue with not being able to control the hardware state when using the funny list register, right?
11:23marcanI just realized at at least it *does* listen to the mask register
11:23marcanso we can at least mask a firing timer, but we still can't inject a non-firing one
11:24marcananyway, that aside
11:24marcanhttps://mrcn.st/p/AYXJ2jlI here is some exhaustive testing
11:24marcanI'm definitely not seeing the ISR cleared when I read the CTL register
11:29mazmarcan: and you don't see the timers firing when the mask is set to 0?
11:29marcan*iff* TGE=0
11:29marcanof course, if you restore the timers with TGE=1, that will cause them to fire
11:29marcanwell, firing as in ISR_EL1 is zero
11:29marcanof course the timers fire in the timer registers
11:29marcanthey just don't raise a FIQ
11:30mazright. but they fire *once*, not as a level.
11:31mazotherwise I wouldn't be able to make forward progress.
11:31marcanactually, I'm not even seeing them fire when masked if TGE=1 either
11:31VinDuv has joined #asahi
11:31marcanmaybe I'm confusing myself
11:38mazI wonder if I'm being tricked by the FIQ handler dealing with both HV and guest timers *in that order*.
11:40mazif the mask is actually a mask, and that the guest timer is pending, we are still going to process the interrupt.
11:41mazand we do that irrespective of the masking.
11:41marcanI tried actually firing a FIQ (DAIF clear) and just reading (not writing) the timer registers there, and I still get a FIQ storm
11:42marcanand... yeah, the AIC code should not be dispatching guest IRQs if the masks are set, should it
11:42marcanthat's a bug
11:43mazlet me fix that locally and see what happens...
11:50marcanpushed a fix to the v4 branch
11:50marcanalso, the register name was wrong; it's _EL2, not _EL1
11:53marshmallow has joined #asahi
11:58mazmarcan: local hack fixed it indeed.
11:58mazmarcan: apologies for dragging you on the wrong path!
12:09mazmarcan: tested on top of v4, all working now.
12:16inglor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
12:17inglor has joined #asahi
12:43choozy has joined #asahi
13:00solarkraft has joined #asahi
13:06odmir has joined #asahi
13:13Namidairo has quit [Ping timeout: 252 seconds]
13:24kit_ty_kate has joined #asahi
13:33Namidairo has joined #asahi
13:33solarkraft_ has joined #asahi
13:33solarkraft has quit [Ping timeout: 240 seconds]
13:38marcanmaz: np, it was my bug after all. thanks!
13:41marcanmaz: should I send out those two VHE fix patches at the head of v4, or do you want to keep discussion of those to your thread?
13:52jeffmiw has joined #asahi
13:56jeffmiw has quit [Ping timeout: 246 seconds]
14:15solarkraft_ has quit [Ping timeout: 246 seconds]
14:34solarkraft has joined #asahi
14:35solarkraft has quit [Client Quit]
14:41solarkraft has joined #asahi
15:09odmir has quit [Remote host closed the connection]
15:15PhilippvK has quit [Ping timeout: 252 seconds]
15:15phiologe has joined #asahi
15:18choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
15:40odmir has joined #asahi
15:44dshep_ has left #asahi ["WeeChat 2.1"]
15:49VinDuv has quit [Quit: Leaving.]
16:00blazra has quit [Quit: Idle for 30+ days]
16:14goosteady has joined #asahi
16:14VinDuv has joined #asahi
16:16choozy has joined #asahi
16:20goosteadyThis is such an exciting project. I got my wife an M1 Air and am so jealous but I am not running MacOS.
16:24odmir has quit [Ping timeout: 240 seconds]
16:37odmir has joined #asahi
16:39odmir has quit [Remote host closed the connection]
16:39odmir has joined #asahi
17:01greg_newton has joined #asahi
17:04goosteady has quit [Ping timeout: 260 seconds]
17:30blazra has joined #asahi
17:31raster has quit [Quit: Gettin' stinky!]
17:56raster has joined #asahi
18:19kettenis has quit [Ping timeout: 260 seconds]
18:21kettenis_ has joined #asahi
18:27kettenis_ has quit [Ping timeout: 252 seconds]
18:30JusticeEX has quit [Quit: leaving]
18:45kettenis1 has joined #asahi
18:47djhworld has joined #asahi
19:04ephe_meral has joined #asahi
19:23odmir has quit [Remote host closed the connection]
19:24odmir has joined #asahi
19:29odmir has quit [Ping timeout: 268 seconds]
19:53PeterEaston has joined #asahi
19:53TheJollyRoger has quit [Ping timeout: 240 seconds]
19:56odmir has joined #asahi
20:12ephe_meral has quit [Ping timeout: 246 seconds]
20:19odmir has quit [Ping timeout: 240 seconds]
20:38bishopdynamics has joined #asahi
20:38bishopdynamics has quit [Client Quit]
20:46odmir has joined #asahi
20:52odmir has quit [Ping timeout: 246 seconds]
21:03VinDuv has quit [Quit: Leaving.]
21:07odmir has joined #asahi
21:31odmir has quit [Ping timeout: 240 seconds]
21:31jeffmiw has joined #asahi
21:35jeffmiw has quit [Ping timeout: 240 seconds]
21:53Fanfwe has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
21:55Fanfwe has joined #asahi
21:59Fanfwe has quit [Client Quit]
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:01yrlf has joined #asahi
22:02Fanfwe has joined #asahi
22:14odmir has joined #asahi
22:18odmir has quit [Ping timeout: 246 seconds]
22:52choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
23:06karlyeurl has quit [Quit: You think water moves fast? You should see ice.]
23:29macc24 has quit [Ping timeout: 250 seconds]
23:32odmir has joined #asahi
23:44phiologe has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
23:44phiologe has joined #asahi
23:48raster has quit [Quit: Gettin' stinky!]
…