marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
neunon has quit [Quit: ZNC 1.8.2 - https://znc.in]
neunon has joined #asahi
eta has quit [Ping timeout: 260 seconds]
eta has joined #asahi
<marcan> kettenis: it does say " This architecture assumes that all PEs that use the same operating system or hypervisor are in the same Inner
<marcan> Shareable shareability domain.
<marcan> "
furkan has joined #asahi
inglor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
inglor has joined #asahi
plainbits has joined #asahi
PhilippvK has quit [Ping timeout: 240 seconds]
phiologe has joined #asahi
<marcan> arnd: 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
<marcan> in particular, the latter says the _relaxed versions do *not* guarantee ordering with spinlocks
<marcan> maz: 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
<marcan> (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)
marvin24 has quit [Ping timeout: 258 seconds]
marvin24 has joined #asahi
<marcan> also, this commit is a good read: 22ec71615
nicolas17 has quit [Quit: Konversation terminated!]
odmir has quit [Remote host closed the connection]
Tokamak_ has joined #asahi
Tokamak has quit [Ping timeout: 240 seconds]
Tokamak_ has quit [Ping timeout: 245 seconds]
Tokamak has joined #asahi
Tokamak_ has joined #asahi
Tokamak has quit [Ping timeout: 240 seconds]
VinDuv has joined #asahi
tomtastic has quit [Ping timeout: 256 seconds]
ephe_meral has quit [Ping timeout: 260 seconds]
amw has quit [Ping timeout: 240 seconds]
ky0ko has quit [Remote host closed the connection]
ephe_meral has joined #asahi
VinDuv has quit [Quit: Leaving.]
ephe_meral has quit [Ping timeout: 260 seconds]
tomtastic has joined #asahi
zarvox has joined #asahi
BaughnLogBot has quit [Ping timeout: 245 seconds]
BaughnLogBot has joined #asahi
raster has joined #asahi
plainbits has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Glanzmann has quit [Quit: leaving]
<arnd> marcan: 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
<arnd> I 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
<maz> marcan: ah, fair point about writel.
<maz> marcan: 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.
amw has joined #asahi
<kettenis> marcan: ah good I couldn't find that text
<maz> interestingly, there is no way to discover whether two blocks are in the *same* IS shareability domain.
<maz> so 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... :-/
plainbits has joined #asahi
Tokamak_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amw has quit [Ping timeout: 276 seconds]
<marcan> maz: already switched to only the required register in my local branch (or do you want all of ICH_*?)
<marcan> I'll test the 32bit build anyway to make sure
<maz> marcan: either way is fine by me, I'll leave it up to you.
<marcan> I'll do all of it then, seems cleaner. I'll make sure 32bit still builds.
<maz> cool.
<marcan> glad I found that commit though, that finally explains the dmb vs dsb story
<marcan> i.e. that it was a *change* in the spec
<marcan> which obsoletes the older thinking that dsb is needed
<marcan> so I'll buy that dmb is enough :-)
<marcan> might 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
<marcan> (plus I might find more CPU bugs... hopefully not of the security variety this time)
<marcan> watched a couple of Will's talks earlier too, those were a good source of info too (though now obsolete with the dmb story)
<kettenis> I'm currently chasing an issue with crashing userland binaries that seems to be related to TLB flushing
<kettenis> probably an OpenBSD bug revealed by th Apple cores doing more speculation
<maz> kettenis: are you using ASIDs? or just global TLBs like FreeBSD?
<kettenis> using ASIDs
<kettenis> more or less the same way as Linux does, reserving two ASIDs per process to hide the kernel mappings
<kettenis> but unlike Linux I flush the ASIDs when the process exits
<kettenis> might very well be a case where I'm not following the right "break then make" procedure
<maz> kettenis: 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?
<maz> kettenis: i.e. the PTs have been removed and there is no way the core can parse these page tables again?
<kettenis> I think that's the case
<kettenis> flushing the ASID during a context switch makes it work
<kettenis> flushing the ASID when a reallocate it doesn't work
<maz> what does your TTBR0 contain at the point where you invalidate on ASID reallocation?
<kettenis> I'm not sure...
<kettenis> will take a look at that
<kettenis> it tends to be shell processes that crash so this maybe an issue with what happens during fork()
<maz> if 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.
<kettenis> yup
<kettenis> fell into that trap at some point
<kettenis> but maybe it's not all fixed
<kettenis> aggressive caching of TLB entries always leads to interesting bugs
<kettenis> never got things quite right for PA-RISC
plainbits has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
plainbits has joined #asahi
ephe_meral has joined #asahi
furkan has quit [Ping timeout: 264 seconds]
ephe_meral has quit [Ping timeout: 264 seconds]
BaughnLogBot has quit [Ping timeout: 240 seconds]
BaughnLogBot has joined #asahi
vimal has quit [Ping timeout: 268 seconds]
vimal has joined #asahi
stemnic has quit [Quit: Ping timeout (120 seconds)]
Mrmaxmeier has quit [Quit: Ping timeout (120 seconds)]
stemnic has joined #asahi
Mrmaxmeier has joined #asahi
BaughnLogBot has quit [Ping timeout: 265 seconds]
BaughnLogBot_ has joined #asahi
BaughnLogBot_ is now known as BaughnLogBot
plainbits has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BaughnLogBot has quit [Ping timeout: 264 seconds]
BaughnLogBot has joined #asahi
nicolas17 has joined #asahi
furkan has joined #asahi
<maz> marcan: 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.
<maz> marcan: 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.
robinp_ has joined #asahi
robinp has quit [Ping timeout: 240 seconds]
<modwizcode> marcan: can you link to the commit that explains the dsb thing?
<modwizcode> thanks
<modwizcode> Heh that's kind of devious
eta has quit [Quit: Gateway shutdown]
<marcan> maz: good point; that means I need to do EL1 testing now :>
odmir has joined #asahi
kektea has joined #asahi
kektea has left #asahi [#asahi]
ky0ko has joined #asahi
tomtastic has quit [Quit: ZNC - https://znc.in]
Tokamak has joined #asahi
eta has joined #asahi
odmir has quit [Remote host closed the connection]
niv has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
niv has joined #asahi
tomtastic has joined #asahi
niv has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
niv has joined #asahi
niv has quit [Client Quit]
niv has joined #asahi
vimal has quit [Ping timeout: 272 seconds]
BaughnLogBot has quit [Ping timeout: 264 seconds]
BaughnLogBot has joined #asahi
Tokamak has quit [Ping timeout: 245 seconds]
VinDuv has joined #asahi
vimal has joined #asahi
Tokamak has joined #asahi
zkrx has quit [Ping timeout: 245 seconds]
zkrx has joined #asahi
ky0ko has quit [Remote host closed the connection]
Bublik has quit [Read error: Connection reset by peer]
ephe_meral has joined #asahi
odmir has joined #asahi
Bublik has joined #asahi
bngs[m] has joined #asahi
Bublik has quit [Quit: Bublik]
ephe_meral has quit [Ping timeout: 264 seconds]
Bublik has joined #asahi
eta has quit [Ping timeout: 240 seconds]
eta has joined #asahi
plainbits has joined #asahi
plainbits has quit [Quit: Textual IRC Client: www.textualapp.com]
ephe_meral has joined #asahi
eta has quit [Ping timeout: 264 seconds]
eta has joined #asahi
raster has quit [Quit: Gettin' stinky!]
eta has quit [Ping timeout: 276 seconds]
odmir has quit [Remote host closed the connection]
odmir has joined #asahi
Tokamak has quit [Ping timeout: 264 seconds]
Tokamak has joined #asahi
Tokamak_ has joined #asahi
odmir has quit [Ping timeout: 276 seconds]
Tokamak has quit [Ping timeout: 245 seconds]
Tokamak_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tokamak has joined #asahi
ephe_meral has quit [Ping timeout: 240 seconds]
ephe_meral has joined #asahi
odmir has joined #asahi
odmir has quit [Ping timeout: 240 seconds]
eta has joined #asahi
jeff_miw has joined #asahi
ephe_meral has quit [Ping timeout: 260 seconds]
odmir has joined #asahi
VinDuv has quit [Quit: Leaving.]
odmir has quit [Ping timeout: 245 seconds]
odmir has joined #asahi
jeff_miw has quit [Quit: Connection closed]
vlixa has quit [Read error: Connection reset by peer]
Bublik has quit [Ping timeout: 264 seconds]
amw has joined #asahi