#
…

2021-03-01

00:00neunon has quit [Quit: ZNC 1.8.2 - https://znc.in]
00:00neunon has joined #asahi
01:31eta has quit [Ping timeout: 260 seconds]
01:33eta has joined #asahi
01:33marcankettenis: it does say " This architecture assumes that all PEs that use the same operating system or hypervisor are in the same Inner
01:33marcanShareable shareability domain.
02:05furkan has joined #asahi
03:02inglor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
03:13inglor has joined #asahi
03:33plainbits has joined #asahi
03:55PhilippvK has quit [Ping timeout: 240 seconds]
03:55phiologe has joined #asahi
04:04marcanarnd: going to put together v3, but I just realized that your section of device-io.rst somewhat overlaps with, and partially contradicts, memory-barriers.txt
04:04marcanin particular, the latter says the _relaxed versions do *not* guarantee ordering with spinlocks
04:06marcanmaz: re the AIC ordering, since the IPI ack is an MMIO *write*, not a *read*, and writel() orders before the write, not after, at the very least it seems I'd need a dma_wmb() after it, before the atomic op
04:07marcan(and in that case I can get away with the relaxed; the ordering before it is guaranteed by the readl() for the main AIC reason register)
04:19marvin24 has quit [Ping timeout: 258 seconds]
04:19marvin24 has joined #asahi
04:20marcanalso, this commit is a good read: 22ec71615
05:04nicolas17 has quit [Quit: Konversation terminated!]
05:07odmir has quit [Remote host closed the connection]
06:16Tokamak_ has joined #asahi
06:19Tokamak has quit [Ping timeout: 240 seconds]
06:20Tokamak_ has quit [Ping timeout: 245 seconds]
06:22Tokamak has joined #asahi
06:24Tokamak_ has joined #asahi
06:27Tokamak has quit [Ping timeout: 240 seconds]
06:33VinDuv has joined #asahi
06:45tomtastic has quit [Ping timeout: 256 seconds]
06:55ephe_meral has quit [Ping timeout: 260 seconds]
07:11amw has quit [Ping timeout: 240 seconds]
07:16ky0ko has quit [Remote host closed the connection]
07:23ephe_meral has joined #asahi
07:27VinDuv has quit [Quit: Leaving.]
07:29ephe_meral has quit [Ping timeout: 260 seconds]
07:30tomtastic has joined #asahi
07:40zarvox has joined #asahi
08:08BaughnLogBot has quit [Ping timeout: 245 seconds]
08:10BaughnLogBot has joined #asahi
08:14raster has joined #asahi
08:29plainbits has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:42Glanzmann has quit [Quit: leaving]
08:54arndmarcan: ok, sorry about my mistake. memory-barriers.txt is correct here. I had changed the writel() description to clarify that it is not ordered against spinlocks after cross-checking, but forgot to update the writel_relaxed() description
08:55arndI think the correct explanation would be that both readl() and readl_relaxed() are fully ordered against spinlocks, while writel() and writel_relaxed() can be posted (depending on the device and mapping flags), which results in the store completion not being ordered against locking at all
08:57mazmarcan: ah, fair point about writel.
08:58mazmarcan: btw, I think the patch that moves all the ICC_* stuff into sysreg.h breaks 32bit builds (the GIC driver ls shared between the two architectures). Consider only moving the ICH_* definition instead.
09:04amw has joined #asahi
09:04kettenismarcan: ah good I couldn't find that text
09:09mazinterestingly, there is no way to discover whether two blocks are in the *same* IS shareability domain.
09:10mazso you could have all the CPUs in one IS domain, the interrupt controller and the IOMMU in another IS domain, and you'd still have to order things at the OS level... :-/
09:10plainbits has joined #asahi
09:24Tokamak_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:43amw has quit [Ping timeout: 276 seconds]
10:27marcanmaz: already switched to only the required register in my local branch (or do you want all of ICH_*?)
10:27marcanI'll test the 32bit build anyway to make sure
10:28mazmarcan: either way is fine by me, I'll leave it up to you.
10:28marcanI'll do all of it then, seems cleaner. I'll make sure 32bit still builds.
10:31marcanglad I found that commit though, that finally explains the dmb vs dsb story
10:31marcani.e. that it was a *change* in the spec
10:31marcanwhich obsoletes the older thinking that dsb is needed
10:31marcanso I'll buy that dmb is enough :-)
10:32marcanmight still play around with making a little litmus test framework for m1n1 though, because this won't be the first ordering question we have, and with Apple's proprietary sysreg stuff there are unanswered questions anyway
10:33marcan(plus I might find more CPU bugs... hopefully not of the security variety this time)
10:34marcanwatched a couple of Will's talks earlier too, those were a good source of info too (though now obsolete with the dmb story)
10:42kettenisI'm currently chasing an issue with crashing userland binaries that seems to be related to TLB flushing
10:42kettenisprobably an OpenBSD bug revealed by th Apple cores doing more speculation
10:44mazkettenis: are you using ASIDs? or just global TLBs like FreeBSD?
10:45kettenisusing ASIDs
10:46kettenismore or less the same way as Linux does, reserving two ASIDs per process to hide the kernel mappings
10:47kettenisbut unlike Linux I flush the ASIDs when the process exits
10:48kettenismight very well be a case where I'm not following the right "break then make" procedure
10:49mazkettenis: I guess you have a strong guarantee that once you marked this ASID as "invalid", you never make any use of this address space until it is reallocated?
10:50mazkettenis: i.e. the PTs have been removed and there is no way the core can parse these page tables again?
10:50kettenisI think that's the case
10:52kettenisflushing the ASID during a context switch makes it work
10:52kettenisflushing the ASID when a reallocate it doesn't work
10:55mazwhat does your TTBR0 contain at the point where you invalidate on ASID reallocation?
10:58kettenisI'm not sure...
10:58ketteniswill take a look at that
10:59kettenisit tends to be shell processes that crash so this maybe an issue with what happens during fork()
11:00mazif there is any valid level at all (not necessary leaves), you could end-up with intermediate walk entries being present, and that's no good.
11:01kettenisfell into that trap at some point
11:01kettenisbut maybe it's not all fixed
11:02kettenisaggressive caching of TLB entries always leads to interesting bugs
11:02kettenisnever got things quite right for PA-RISC
11:07plainbits has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:11plainbits has joined #asahi
11:11ephe_meral has joined #asahi
11:14furkan has quit [Ping timeout: 264 seconds]
11:19ephe_meral has quit [Ping timeout: 264 seconds]
11:44BaughnLogBot has quit [Ping timeout: 240 seconds]
11:45BaughnLogBot has joined #asahi
11:54vimal has quit [Ping timeout: 268 seconds]
12:01vimal has joined #asahi
12:16stemnic has quit [Quit: Ping timeout (120 seconds)]
12:17Mrmaxmeier has quit [Quit: Ping timeout (120 seconds)]
12:17stemnic has joined #asahi
12:17Mrmaxmeier has joined #asahi
12:42BaughnLogBot has quit [Ping timeout: 265 seconds]
12:43BaughnLogBot_ has joined #asahi
12:43BaughnLogBot_ is now known as BaughnLogBot
12:44plainbits has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:16BaughnLogBot has quit [Ping timeout: 264 seconds]
13:17BaughnLogBot has joined #asahi
13:37nicolas17 has joined #asahi
14:18furkan has joined #asahi
14:23mazmarcan: just realised another couple of nits: it'd be good if your APL-specific definitions were suffixed with the minimum EL at which they are accessible, just like any other AArch64 sysreg.
14:24mazmarcan: also, SYS_APL_VM_TMR_MASK behaves like an enable, and no a mask (bit set to allow the interrupt). it'd be good if that was reflected in the name of the sysreg.
15:01robinp_ has joined #asahi
15:04robinp has quit [Ping timeout: 240 seconds]
15:27modwizcodemarcan: can you link to the commit that explains the dsb thing?
15:38modwizcodeHeh that's kind of devious
15:45eta has quit [Quit: Gateway shutdown]
15:54marcanmaz: good point; that means I need to do EL1 testing now :>
16:11odmir has joined #asahi
16:20kektea has joined #asahi
16:21kektea has left #asahi [#asahi]
16:22ky0ko has joined #asahi
16:26tomtastic has quit [Quit: ZNC - https://znc.in]
16:27Tokamak has joined #asahi
16:27eta has joined #asahi
16:36odmir has quit [Remote host closed the connection]
16:39niv has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
16:41niv has joined #asahi
16:47tomtastic has joined #asahi
17:18niv has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
17:20niv has joined #asahi
17:21niv has quit [Client Quit]
17:21niv has joined #asahi
17:37vimal has quit [Ping timeout: 272 seconds]
17:50BaughnLogBot has quit [Ping timeout: 264 seconds]
17:53BaughnLogBot has joined #asahi
17:54Tokamak has quit [Ping timeout: 245 seconds]
17:54VinDuv has joined #asahi
17:55vimal has joined #asahi
18:07Tokamak has joined #asahi
18:09zkrx has quit [Ping timeout: 245 seconds]
18:21zkrx has joined #asahi
18:23ky0ko has quit [Remote host closed the connection]
18:30Bublik has quit [Read error: Connection reset by peer]
18:30ephe_meral has joined #asahi
18:32odmir has joined #asahi
18:33Bublik has joined #asahi
18:54bngs[m] has joined #asahi
19:09Bublik has quit [Quit: Bublik]
19:12ephe_meral has quit [Ping timeout: 264 seconds]
19:13Bublik has joined #asahi
19:14eta has quit [Ping timeout: 240 seconds]
19:15eta has joined #asahi
19:20plainbits has joined #asahi
19:39plainbits has quit [Quit: Textual IRC Client: www.textualapp.com]
19:39ephe_meral has joined #asahi
19:44eta has quit [Ping timeout: 264 seconds]
19:46eta has joined #asahi
20:02raster has quit [Quit: Gettin' stinky!]
20:13eta has quit [Ping timeout: 276 seconds]
20:42odmir has quit [Remote host closed the connection]
20:43odmir has joined #asahi
20:46Tokamak has quit [Ping timeout: 264 seconds]
20:46Tokamak has joined #asahi
20:48Tokamak_ has joined #asahi
20:48odmir has quit [Ping timeout: 276 seconds]
20:51Tokamak has quit [Ping timeout: 245 seconds]
20:58Tokamak_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:04Tokamak has joined #asahi
21:11ephe_meral has quit [Ping timeout: 240 seconds]
21:14ephe_meral has joined #asahi
21:17odmir has joined #asahi
21:26odmir has quit [Ping timeout: 240 seconds]
21:27eta has joined #asahi
21:34jeff_miw has joined #asahi
21:37ephe_meral has quit [Ping timeout: 260 seconds]
21:39odmir has joined #asahi
21:43VinDuv has quit [Quit: Leaving.]
21:43odmir has quit [Ping timeout: 245 seconds]
21:51odmir has joined #asahi
22:04jeff_miw has quit [Quit: Connection closed]
22:16vlixa has quit [Read error: Connection reset by peer]
22:51Bublik has quit [Ping timeout: 264 seconds]
23:20amw has joined #asahi
…