#
…

2021-03-27

00:11bpye has quit [Ping timeout: 240 seconds]
00:13bpye has joined #asahi
00:15choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
00:20anarsoul has quit [Quit: ZNC 1.8.2 - https://znc.in]
00:21anarsoul has joined #asahi
00:21odmir_ has joined #asahi
00:24furkan has quit [Ping timeout: 252 seconds]
00:24odmir has quit [Ping timeout: 240 seconds]
00:36furkan has joined #asahi
01:15arcsor5 has quit [Ping timeout: 260 seconds]
01:42odmir_ has quit [Remote host closed the connection]
01:42odmir has joined #asahi
01:47odmir has quit [Ping timeout: 260 seconds]
01:57furkan has quit [Ping timeout: 240 seconds]
02:00JusticeEX has joined #asahi
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:24Emantor has joined #asahi
02:25riker77_ has joined #asahi
02:26riker77 has quit [Ping timeout: 245 seconds]
02:26riker77_ is now known as riker77
02:51amwsvenpeter: I've updated the Developer-Quickstart Wiki page with a brief description of using your m1n1 to get normal USB CDC-ACM link going. Hope it's reasonable
03:26phiologe has quit [Ping timeout: 250 seconds]
03:26phiologe has joined #asahi
04:03odmir has joined #asahi
04:06marvin24 has quit [Ping timeout: 250 seconds]
04:06marvin24 has joined #asahi
04:08odmir has quit [Ping timeout: 265 seconds]
06:06rwhitby has quit [Ping timeout: 258 seconds]
06:11_rjeffman has joined #asahi
06:14VinDuv has joined #asahi
06:14rjeffman has quit [Ping timeout: 240 seconds]
06:22TheJollyRoger has quit [Remote host closed the connection]
06:22TheJollyRoger has joined #asahi
06:41brandas has quit [Quit: quit]
06:42brandas has joined #asahi
06:56TheJollyRoger has quit [Remote host closed the connection]
06:59TheJollyRoger has joined #asahi
07:08brandas has quit [Quit: quit]
07:37brandas has joined #asahi
07:39svenamw: nice, thanks!
07:48dibas has quit [Remote host closed the connection]
07:49dibas has joined #asahi
07:49dibas has quit [Changing host]
07:49dibas has joined #asahi
08:18jeffmiw has joined #asahi
08:21rwhitby has joined #asahi
08:22jeffmiw has quit [Ping timeout: 246 seconds]
08:34hir0 has joined #asahi
08:47ephe_meral1 has joined #asahi
09:02klaus has joined #asahi
09:17svenkettenis: did you try what happens with the PCIe dart when you just ignore that vm-base/vm-size and allow "invalid" regions?
09:44raster has joined #asahi
10:06kettenisI thought I tried this at some point; maybe I messed it up
10:07kettenisthe DART seems to work fine outside the vm-base/vm-size range
10:07kettenisI suspect that we do have to avoid the MSI address though
10:09sveninteresting. so that vm-base might actually be a software thing sometimes
10:09kettenisI suppose this means we could shelve the dma window issue for later?
10:09sveni guess so
10:09svens/guess/hope/ :)
10:10sveni've also seen "allow-subpage-mapping" in these "strange" DART device nodes
10:10svenmaybe they are even another DART variant with more mysteries
10:10sven(there is something called "SMMU" which is ofc unrelated to the ARM SMMU under the display dart device node)
10:12kettenisso I played around a bit with the boundaries
10:12kettenisstarting at 0 causes no issues
10:13kettenisand putting the window between 0xe0000000 and 0xf0000000 works as well
10:15sveni wonder why the reserve some space at the beginning then
10:16kettenismy guess would be to catch bugs
10:17svenoh.. good point
10:17kettenisa bit like not mapping the page at virtual address zero in normal user space
10:17svenmaybe that's also the reason for the empty space between the pio and "normal" region arnd observed
10:20svenhm... there's an AES engine behind that dart-sio which is one the "strange" ones. i wonder if i can get that one up and running easily
10:20sventhat would allow some easy tests
10:33furkan has joined #asahi
10:37zkrx has quit [Ping timeout: 265 seconds]
10:46zkrx has joined #asahi
10:52bisko has joined #asahi
10:55rwhitby has quit [Ping timeout: 258 seconds]
11:15vimal has quit [Quit: Leaving]
11:48brandas_ has joined #asahi
11:49brandas has quit [Read error: Connection reset by peer]
11:52JusticeEX has quit [Ping timeout: 240 seconds]
12:40NecrosporusIt seems RMS support letter is signed by more people that RMS defamation letter
12:47choozy has joined #asahi
12:53hir0 has quit [Quit: hir0]
13:01svenheh, so it looks the aes engine works in bypass mode when i set yet another bit in the TCR
13:01sveni can't seem to setup pagetables for it though. something's certainly strange there
13:03vimal has joined #asahi
13:03svenit complains that my TTBR is invalid but also sets another bit I don't know about in the error stage register
13:05kettenishow do you test the AES engine?
13:10sveni just reverse engineered the kext. i won't ever write any aes code for linux anyway :)
13:14Necrosporussven, do you make keyboards?
13:14svenuh, no
13:19mazmarcan: as expected, the v4 branch broke KVM. and that's where things become interesting again...
13:20mazmarcan: as you found out, mask/unmask of the guest timer wasn't working, which means I was running with the guest interrupts notionally disabled.
13:20svenkettenis: i always gets fault no matter what pagetables i setup in the DART. might be something rather dumb on my side.
13:21svenkettenis: but if this worked we could essentially pretend the AES engine is a DMA engine and actually figure out which addresses are good and what this pio stuff is all about
13:21mazmarcan: but as it appears, I am still getting interrupts from these timers, despite the "disabled" state.
13:22mazmarcan: conclusion: SYS_IMP_APL_VM_TMR_FIQ_ENA_EL1 doesn't do what we think it does.
13:23mazmarcan: I have gutted out all the masking/unmasking code frop the AIC driver, leaving the two enable bits to 0.
13:23mazmarcan: interrupts still fire just fine and my guests are happy.
13:23mazmarcan: what I *think* this does is to turn the level interrupt into an edge.
13:24marcanwhat acks the edge in that case?
13:24marcanI do remember we need an isb after doing things like flipping TGE
13:24marcanto make that register work properly
13:25mazmarcan: there is plenty of ISBs when flipping TGE. and I'm tegging the interrupt at EL2, not EL1.
13:25mazgetting*
13:26marcanI'll have to do some more tests in m1n1, this is interesting
13:27mazyup. I've completely gutted the mask/unmask code from the driver, and I can still run guests, and getting interrupts on the host side.
13:31mazmarcan: regarding your nVHE question: yes, the kernel runs at EL1 in that mode.
13:32mazit uses HVC to call into EL2 as required.
13:39mazkettenis: do you know if the DART translates the MSI doorbell? or does it let it through untranslated, a la x86?
13:48marcanmaz: so that wouldn't work on M1 anyway, until I fix AIC to work in EL1
13:48marcan(I mean even without using KVM)
13:49marcanmaz: if I had to guess, the PCIe endpoint handles the doorbell internally, but that's a guess
13:49marcani.e. it never hits the SoC bus
13:50mazmarcan: OK, so it is captured upstream of the DART. oddly similar to what Huawei did for their servers.
13:50marcansince the doorbell addr is the same for every endpoint, but they should have different MSI ranges
13:50marcan(I think)
13:50marcanand there's no reason to run that through DART
13:51mazmarcan: as long as you don't have a two-stage translation on the IOMMU side, you're probably OK. once you start doing device assignment, things become really funny with untranslated doorbells.
13:52mazyou have to make sure the guest IPA space doesn't overlap with the physical doorbell, which is a fixed point.
13:52mazanyway, not something we need to worry for the M1.
13:52troseman has joined #asahi
14:10marcanheh, yeah
14:20Bodzioslaw has quit [Remote host closed the connection]
14:21Bodzioslaw has joined #asahi
14:22troseman has quit [Ping timeout: 265 seconds]
14:48kettenismaz: the MSI doorbell address is programmed into the per-port host bridge registers
14:48kettenisand it isn't translated by the DART
14:50choozy has quit [Remote host closed the connection]
14:54kettenisapple seems to uniformly use 0xffff000 as the doorbell address
14:54kettenisbut programming a different address works
14:54choozy has joined #asahi
15:21bisko has quit [Read error: Connection reset by peer]
15:22marcanmaz: I'm not seeing edge-triggered behavior in m1n1
15:23marcanturning off the mask bits, resetting the timer registers and scheduling them to fire, nothing happens
15:24marcandoesn't matter if I go into el0 or el1, still nothing
15:27marcan< sven> kettenis: but if this worked we could essentially pretend the AES engine is a DMA engine <- I wonder where you got that idea from :-)
15:27ephe_meral1 has quit [Ping timeout: 240 seconds]
15:32choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
15:34svenmarcan: totally not the wii days, i swear! :P
15:35sveni don't think you can just not set encrypt/decrypt here though. so it's not that great for memcpying stuff around
15:36svenbut once i figure out why that dart doesn't like my pagetables it should be good enough to get simple view into the iova space :)
15:43marcan(one of the first things I did with what became mini and the same proxyclient stuff in m1n1 was try control bits on the Wii AES engine and discover that if you don't set encrypt/decrypt, it just does a plain copy)
15:46svendidn't you also use that to figure out that weird paddr ^ 0x40 quirk? or was that just the nand hw?
15:46marcanthat was the nand ECC syndrome calculation
15:46svenah, right.
15:46marcanfunny thing is after the "official" docs leaked a decade later, it was documented as + 0x40
15:46marcanso our docs are better :-)
15:46svenhah :)
16:00andi[m] has quit [Quit: Idle for 30+ days]
16:06Necrosporus has quit [Read error: Connection reset by peer]
16:06Necrosporus has joined #asahi
16:15kettenissven: I would avoid including a dma-ranges dt-binding tweak if you're not going to rely in dma-ranges in your DART driver
16:16VinDuv1 has joined #asahi
16:18VinDuv has quit [Ping timeout: 240 seconds]
16:21sventhe way i understand it is that dma-ranges is done completely outside of the DART driver anyway. this domain->geometry.force_aperture is on top of that and can just further limit the dma window.
16:21svenso essentially dma-ranges would be empty because in bypass mode 0x811112222 is a completely valid iova there. but once the iommu is switched to translate mode it's suddenly invalid
16:22sventhis won't be another property in the device tree. it's really just if (domain->mode != BYPASS) force_aperture_to_32bit()
16:24svenbut i can also leave it out if you think that's a bad idea as well
16:30VinDuv1 has quit [Ping timeout: 240 seconds]
16:30kettenismy point is that the clarification of dma-ranges isn't really related to the DART driver
16:31kettenisand potentially controversial since folks have different ideas about how it should be interpreted when there is an IOMMU
16:32svenpeterAh, good point.
16:33svenpeterI’ll leave it out of the series then
16:34ephe_meral has joined #asahi
17:07Baughn has quit [Read error: Connection reset by peer]
17:22Necrosporus is now known as Guest59740
17:22Guest59740 has quit [Killed (barjavel.freenode.net (Nickname regained by services))]
17:22Necrosporus has joined #asahi
17:23Baughn has joined #asahi
17:27odmir has joined #asahi
17:37JusticeEX has joined #asahi
17:43bishopdynamics has joined #asahi
17:53svenhuh. i think the dart even has some kind of feature to protect a range *within* a page
17:54svenor maybe i'm just doing something very dumb again :)
17:57marcanthat would make sense for subpages
18:34odmir has quit [Remote host closed the connection]
18:35odmir has joined #asahi
18:42odmir has quit [Ping timeout: 268 seconds]
18:47phiologe has quit [Ping timeout: 250 seconds]
18:47phiologe has joined #asahi
19:01klaus has quit [Quit: Textual IRC Client: www.textualapp.com]
19:07odmir has joined #asahi
19:21Baughn has quit [Ping timeout: 260 seconds]
19:39odmir has quit [Ping timeout: 246 seconds]
19:40Baughn has joined #asahi
19:52Fanfwe42 is now known as Fanfwe
20:00odmir has joined #asahi
20:30choozy has joined #asahi
20:34odmir has quit [Ping timeout: 260 seconds]
20:38JusticeEX has quit [Ping timeout: 268 seconds]
20:48odmir has joined #asahi
21:03jeffmiw has joined #asahi
21:20odmir has quit [Ping timeout: 240 seconds]
21:34odmir has joined #asahi
21:41ephe_meral has quit [Ping timeout: 268 seconds]
21:51bishopdynamics has quit [Quit: My machine has gone to sleep. ZZZzzz…]
21:52bishopdynamics has joined #asahi
21:59bishopdynamics has quit [Quit: My machine has gone to sleep. ZZZzzz…]
22:08odmir has quit [Ping timeout: 268 seconds]
22:20odmir has joined #asahi
22:29inglor has quit [Ping timeout: 252 seconds]
22:29inglor has joined #asahi
22:34solarkraft has quit [Quit: Bye!]
22:38JusticeEX has joined #asahi
22:53odmir has quit [Ping timeout: 246 seconds]
23:01odmir has joined #asahi
23:08jeffmiw_ has joined #asahi
23:08jeffmiw has quit [Read error: Connection reset by peer]
23:13jeffmiw_ has quit [Remote host closed the connection]
23:37coderobe has quit [Remote host closed the connection]
23:37coderobe has joined #asahi
…