#
✕ nick:rqou_
#asahi-dev · 2022-04-09 07:18
rqou_btw there are also scary/cursed high performance networking use cases where people run userspace pci drivers
#asahi-dev · 2022-04-09 07:17
rqou_lol
#asahi-dev · 2022-04-09 07:16
rqou_and like i said, i was testing it on m1 hoping i could prototype a driver in userspace
#asahi-dev · 2022-04-09 07:15
rqou_i've used it for "enthusiast" gpu passthrough on x86 (mostly works)
#asahi-dev · 2022-04-09 07:14
rqou_idk if that's something we can get properly supported
#asahi-dev · 2022-04-09 07:14
rqou_there's an option to tell vfio to ignore that, which works
#asahi-dev · 2022-04-09 07:14
rqou_but i have no idea what that actually means or how interrupts actually work on pcie
#asahi-dev · 2022-04-09 07:14
rqou_vfio even on a 16k kernel still has the problem with "unsafe interrupt remapping"
#asahi-dev · 2022-04-09 07:13
rqou_btw 16k kernels break sublime text (because jemalloc)
#asahi-dev · 2022-04-09 07:13
rqou_yeah, i did that for testing, but i'm hitting a different issue unrelated to any of this
#asahi-dev · 2022-04-09 07:12
rqou_at least on x86, vfio has a bunch of enthusiast users doing totally wild things
#asahi-dev · 2022-04-09 07:12
rqou_like the option that outright ignores improperly configured iommu
#asahi-dev · 2022-04-09 07:12
rqou_won't be the first time vfio has a bunch of random scary opt-in config options
#asahi-dev · 2022-04-09 07:11
rqou_fair enough
#asahi-dev · 2022-04-09 07:11
rqou_and by userspace afaict i just mean "qemu"
#asahi-dev · 2022-04-09 07:10
rqou_but who knows what userspace does
#asahi-dev · 2022-04-09 07:10
rqou_as far as i understand it, returning an iommu page size > cpu page size and then failing when attempting to map an improperly aligned page does not violate the api specification
#asahi-dev · 2022-04-09 07:09
rqou_i think it's probably for large page support, but it doesn't actually say so explicitly
#asahi-dev · 2022-04-09 07:08
rqou_well, i tried, but it fails before it can even get there
#asahi-dev · 2022-04-09 07:07
rqou_so this looks like it should be theoretically possible
#asahi-dev · 2022-04-09 07:07
rqou_but VFIO_IOMMU_GET_INFO returns a struct containing a bitmap of supported iova page sizes
#asahi-dev · 2022-04-09 07:06
rqou_neither do i lol, i just used it for the first time today
#asahi-dev · 2022-04-09 07:05
rqou_vfio exposes iommu page sizes in the userspace api
#asahi-dev · 2022-04-09 07:05
rqou_seems like it should be possible for vfio?
#asahi-dev · 2022-04-09 07:03
rqou_i don't understand why it can't work with vfio though
#asahi-dev · 2022-04-09 07:03
rqou_right, sven wrote something that can support mixed iommu/cpu pages sizes
#asahi-dev · 2022-04-09 06:23
rqou_why not though? the vfio api seems to be able to expose iommu page sizes that differ from cpu page sizes
#asahi-dev · 2022-04-09 01:49
rqou_unless i have to do something with the config space that i don't understand
#asahi-dev · 2022-04-09 01:45
rqou_apparently vfio-pci is just broken in a way i don't understand, because doing exactly what the macos driver is doing crashes the system
#asahi-dev · 2022-04-09 01:43
rqou_how difficult is it to bring up PCIe from within a m1n1 experiment?
#asahi-dev · 2022-04-09 00:49
rqou_... reading a bad address on pcie will instantly hang the whole system until it watchdog resets. that seems suboptimal
#asahi-dev · 2022-04-09 00:12
rqou_how feasible would it be to get this actually working? since once we have thunderbolt, vfio passthrough to a vm isn't unthinkable
#asahi-dev · 2022-04-09 00:12
rqou_actually, even with a 16k kernel vfio would still fail with "no interrupt remapping support"
#asahi-dev · 2022-04-08 23:58
rqou_as for the reason i was trying this, i was hoping i would be able to prototype something that pokes at the bluetooth hardware from linux userspace
#asahi-dev · 2022-04-08 23:58
rqou_notably it fails on vfio_set_iommu, before attempting to map any memory
#asahi-dev · 2022-04-08 23:57
rqou_sven: i found an unexpected (to me) limitation of your 4k iommu patch -- it breaks vfio-pci (i promise i have a not-entirely-terrible reason for wanting this)
#asahi-dev · 2022-04-08 06:24
rqou_jannau: it definitely panics, idk if that's related to suspend or not
#asahi-dev · 2022-04-08 06:24
rqou_i just copy binaries from my real macos install
#asahi-dev · 2022-04-08 06:24
rqou_i don't have xcode installed on my hacking partition
#asahi-dev · 2022-04-08 06:20
rqou_works for very basic tracing
#asahi-dev · 2022-04-08 06:20
rqou_not pausing seems to have worked for me, but the hv is definitely not super reliable
#asahi-dev · 2022-04-08 06:19
rqou_but synchronous tracing seems "fine" for short sessions, like jannau said
#asahi-dev · 2022-04-08 06:19
rqou_i regularly get panics on t6001 if i pause for too long
#asahi-dev · 2022-04-07 09:06
rqou_also one for a ProRes experiment, but that's much more incomplete: https://github.com/AsahiLinux/m1n1/pull/191
#asahi-dev · 2022-04-07 09:06
rqou_i've been exercising my t8110 dart code enough that i'm confident enough to send a PR: https://github.com/AsahiLinux/m1n1/pull/190
#asahi-dev · 2022-04-07 05:48
rqou_i definitely observed e.g. m1n1 hypervisor debug printing affecting the race
#asahi-dev · 2022-04-07 05:46
rqou_yeah i dunno
#asahi-dev · 2022-04-07 05:41
rqou_rn i have my own branch that's an ad-hoc merging of features i've tried out
#asahi-dev · 2022-04-07 05:41
rqou_or the DCP driver
#asahi-dev · 2022-04-07 05:40
rqou_no, i mean things like "sven's 4k patch" or "sven's atcphy"

plus ›