#
#asahi-dev · 2023-05-04 13:26
marcanwhich means when the *next* IRQ comes in, until this thing times out, it doesn't get delivered
#asahi-dev · 2023-05-04 13:26
marcanI'm not sure how this causes breakage, but for example I wouldn't be surprised if this machinery running is blocking
#asahi-dev · 2023-05-04 13:25
marcanbut it looks like what fails to ack here isn't the IRQ itself, it's the lower level mechanism that picks a CPU to interrupt
#asahi-dev · 2023-05-04 13:25
mazbecause if you're interrupting while running a guest, it takes significantly longer to handle the interrupt than if you were running userspace.
#asahi-dev · 2023-05-04 13:25
marcanthe ack has the same latency in both cases (I'm grabbing the counter right before triggering the IRQ and right after acking it in the EL2 IRQ handler that fired from EL1 context)
#asahi-dev · 2023-05-04 13:24
mazI wonder if that has something to do with how long it takes to ack the interrupt.
#asahi-dev · 2023-05-04 13:24
mazhmmm. I positively hate magic.
#asahi-dev · 2023-05-04 13:23
marcanbet it changes
#asahi-dev · 2023-05-04 13:23
marcanmacOS sets magic_reg = 0 on normal boots, but who knows what it does with virtualization
#asahi-dev · 2023-05-04 13:22
marcansooo... m1n1 fix.
#asahi-dev · 2023-05-04 13:22
marcanturns out magic_reg = 2 makes everything work
#asahi-dev · 2023-05-04 13:22
marcanmagic_reg = 3 is the boot value we know doesn't work
#asahi-dev · 2023-05-04 13:22
marcanthat's with magic_reg = 0
#asahi-dev · 2023-05-04 13:22
marcanit's as if the "delivered to CPU core" signal never gets back to AIC even though it has
#asahi-dev · 2023-05-04 13:21
marcanI don't know *why* it's broken, but the symptoms seem to be that the IRQ gets delivered but AIC somehow thinks it isn't, even after it gets acked, and ends up timing out and also delivering to some other CPU
#asahi-dev · 2023-05-04 13:21
marcanmaz: aaand it's the impdef register
#asahi-dev · 2023-05-04 13:10
marcanmaz: m1n1, but this is weird.
#asahi-dev · 2023-05-04 13:10
marcankettenis: not yet
#asahi-dev · 2023-05-04 13:08
kettenisdid you push the updated masks for iova and size for the oslog messages somewhere?
#asahi-dev · 2023-05-04 13:08
mazmarcan: what latency do you measure? from what point to what point? m1n1 or KVM?
#asahi-dev · 2023-05-04 13:07
kettenisok
#asahi-dev · 2023-05-04 13:07
marcanthe SRAM bypasses that
#asahi-dev · 2023-05-04 13:06
marcanand passing through DART mappings is a world of pain (see DCP)
#asahi-dev · 2023-05-04 13:06
marcanno, because they go through a DART
#asahi-dev · 2023-05-04 13:06
kettenismarcan: regarding the oslog buffers, wouldn't it be better for u-boot to allocate those in RAM and make sure the memory gets reserved in the FDT and the EFI memory map?
#asahi-dev · 2023-05-04 13:01
marcanactually no, the real latency looks small?
#asahi-dev · 2023-05-04 12:53
marcanmaz: IRQs do kick us out of the guest but I think the latency is total crap. I suspect an IMPDEF to control that...
#asahi-dev · 2023-05-04 11:43
kettenisbut if a user (or OS installer) overrides BootOrder it will do what the user requested
#asahi-dev · 2023-05-04 11:42
kettenisthis way, a newly installed system should boot from the right partition
#asahi-dev · 2023-05-04 11:42
kettenisif the BootOrder variable already exists, it doesn't do anything
#asahi-dev · 2023-05-04 11:41
kettenisso what my new code does is create a Boot0000 boot option that points at the ESP with the UUID given by asahi,efi-system-partition and creates a BootOrder variable that points at that option
#asahi-dev · 2023-05-04 11:39
kettenisthat in itself shouldn't be a problem if they set the variables to point at the right partition and bootloader
#asahi-dev · 2023-05-04 11:37
jannauI think some fedora variant shipped at some point u-boot built from the wrong branch and had efi variables enabled
#asahi-dev · 2023-05-04 11:37
kettenisI really should install Asahi Linux on at least one of the machines I have
#asahi-dev · 2023-05-04 11:36
kettenisthanks
#asahi-dev · 2023-05-04 11:36
jannaukettenis: I'll try later
#asahi-dev · 2023-05-04 11:35
kettenis(that file is where u-boot stores the EFI variables)
#asahi-dev · 2023-05-04 11:35
kettenisI think Fedora does set EFI variables
#asahi-dev · 2023-05-04 11:34
kettenisuntil users start messing around with EFI variables themselves
#asahi-dev · 2023-05-04 11:34
kettenisbut I guess it doesn't hurt
#asahi-dev · 2023-05-04 11:32
kettenisso it shouldn't be needed
#asahi-dev · 2023-05-04 11:32
kettenisthe u-boot that you've been shipping had the option that generates this file disabled
#asahi-dev · 2023-05-04 11:31
marcankettenis: should I be removing that from linux in our update script?
#asahi-dev · 2023-05-04 11:30
kettenisprobably best to remove the ubootefi.var from the ESP before trying this diff
#asahi-dev · 2023-05-04 11:29
kettenisjannau: pushed the code to generate an EFI boot option to the asahi branch
#asahi-dev · 2023-05-04 11:28
mazknow*
#asahi-dev · 2023-05-04 11:27
mazanyway, if you find a KVM bug, you now where to shout!
#asahi-dev · 2023-05-04 11:27
marcanwe know there's weird magic involved
#asahi-dev · 2023-05-04 11:27
marcanyup, but we also know Apple have a magic IMPDEF we need to poke to make AIC IRQ delivery work *at all* so...
#asahi-dev · 2023-05-04 11:27
mazwell, we set IMO+FMO+AMO, so *everything* has to take us to EL2. If that's not obeyed, that's pretty bad.

plus ›