#asahi · 2021-03-28 10:55
mazFIQs routed to EL2, not even with any virtualisation going on.#asahi · 2021-03-28 10:54
maznah. there are more ISBs that you can imagine in that sequence.#asahi · 2021-03-28 10:53
mazmarcan: it just takes a read of CNTP_CTL_EL0 to see the bit drop to 0.#asahi · 2021-03-28 10:52
mazmarcan: not really. I ran a little experiment to try a find when the ISR_EL1.F bit gets cleared.#asahi · 2021-03-27 13:52
mazanyway, not something we need to worry for the M1.#asahi · 2021-03-27 13:52
mazyou have to make sure the guest IPA space doesn't overlap with the physical doorbell, which is a fixed point.#asahi · 2021-03-27 13:51
mazmarcan: 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.#asahi · 2021-03-27 13:50
mazmarcan: OK, so it is captured upstream of the DART. oddly similar to what Huawei did for their servers.#asahi · 2021-03-27 13:39
mazkettenis: do you know if the DART translates the MSI doorbell? or does it let it through untranslated, a la x86?#asahi · 2021-03-27 13:32
mazit uses HVC to call into EL2 as required.#asahi · 2021-03-27 13:31
mazmarcan: regarding your nVHE question: yes, the kernel runs at EL1 in that mode.#asahi · 2021-03-27 13:27
mazyup. I've completely gutted the mask/unmask code from the driver, and I can still run guests, and getting interrupts on the host side.#asahi · 2021-03-27 13:25
mazgetting*#asahi · 2021-03-27 13:25
mazmarcan: there is plenty of ISBs when flipping TGE. and I'm tegging the interrupt at EL2, not EL1.#asahi · 2021-03-27 13:23
mazmarcan: what I *think* this does is to turn the level interrupt into an edge.#asahi · 2021-03-27 13:23
mazmarcan: interrupts still fire just fine and my guests are happy.#asahi · 2021-03-27 13:23
mazmarcan: I have gutted out all the masking/unmasking code frop the AIC driver, leaving the two enable bits to 0.#asahi · 2021-03-27 13:22
mazmarcan: conclusion: SYS_IMP_APL_VM_TMR_FIQ_ENA_EL1 doesn't do what we think it does.#asahi · 2021-03-27 13:21
mazmarcan: but as it appears, I am still getting interrupts from these timers, despite the "disabled" state.#asahi · 2021-03-27 13:20
mazmarcan: as you found out, mask/unmask of the guest timer wasn't working, which means I was running with the guest interrupts notionally disabled.#asahi · 2021-03-27 13:19
mazmarcan: as expected, the v4 branch broke KVM. and that's where things become interesting again...#asahi · 2021-03-26 18:03
mazthey shouldn't need it.#asahi · 2021-03-26 18:03
mazfor non-MSI, I'm not sure they have the flop.#asahi · 2021-03-26 18:03
mazfor MSIs, you do.#asahi · 2021-03-26 18:02
mazindeed. or allocate the interrupts in the order that satisfies the required priority.#asahi · 2021-03-26 18:00
mazmarcan: that's consistent with the edge being consumed by Ack, which is what I'd expect.#asahi · 2021-03-26 17:57
mazsaves gates.#asahi · 2021-03-26 17:57
mazthey have probably baked the trigger mode at synth time.#asahi · 2021-03-26 17:56
mazI can rebase my stuff on top and give it a go.#asahi · 2021-03-26 17:55
mazmarcan: interesting. it just means that the timers are always disabled, and that we are just opportunistically injecting virtual interrupts into the guest as a best effort measure. given what little guest code gets run at the moment, it isn't surprising we didn't notice that.#asahi · 2021-03-25 16:32
mazmarcan: maybe. I'll look on that side.#asahi · 2021-03-25 16:21
mazor is the interrupt trigger baked and not configurable?#asahi · 2021-03-25 16:20
mazdoes anyone knows whether the AIC has a trigger configuration (level vs edge)? I have a prototype MSI implementation, but we consider so far all interrupts fed to the AIC as level, which isn't a very good match for MSIs.#asahi · 2021-03-25 14:58
mazwhich does something similar to what you'd need to implement.#asahi · 2021-03-25 14:58
mazfor irqd_irq_masked(), see https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/tree/drivers/irqchip/irq-rvic.c?h=irq/rvic&id=e460e4c66a15c4576b48b13ea028b3104c74f732#n209#asahi · 2021-03-25 14:55
mazvgic*#asahi · 2021-03-25 14:55
mazyes, please leave th vic stuff out. it depends on the previous patches which rework some of the infrastructure.#asahi · 2021-03-25 14:54
mazfeel free to fold them into the main AIC patch.#asahi · 2021-03-25 14:53
mazpatch wise, there was just the two fixes for mask/unmask as well as the initial masking state.#asahi · 2021-03-25 14:53
mazmarcan: that's right. I use the irqchip plumbing to get the AIC driver to do what I want, and I don't need direct exposure of the sysreg encoding.#asahi · 2021-03-24 17:48
mazthere are things that are worth fighting for.#asahi · 2021-03-22 12:31
mazsven: do you have to mirror the PTs? or can you just point the two darts at the same PTs and issue TLB maintenance as a group?#asahi · 2021-03-22 12:31
mazsven: do you have to mirror the PTs? or can you just point the two darts at the same PTs and issue TLB maintenance as a group?#asahi · 2021-03-20 12:46
mazsven: it'd be great if you could post this.#asahi · 2021-03-20 12:46
mazsven: it'd be great if you could post this.#asahi · 2021-03-19 15:21
mazwe have some degree of power-sequencing support in Linux, but may not be enough.#asahi · 2021-03-19 15:19
mazit would certainly remove a lot of crap from the various OSs.#asahi · 2021-03-19 15:10
mazright...#asahi · 2021-03-19 15:09
mazwhat do they do exactly?#asahi · 2021-03-19 15:08
mazkettenis2: I don't mind that as long as things like aic, timers and posted attributes follow what was agreed on with marcan.