qyliss changed the topic of #spectrum to: A compartmentalized operating system | https://spectrum-os.org/ | Logs: https://logs.spectrum-os.org/spectrum/
klltkr has quit [Ping timeout: 264 seconds]
cole-h has quit [Quit: Goodbye]
ashkitten has quit [Quit: WeeChat 2.8]
ashkitten has joined #spectrum
cole-h has joined #spectrum
<qyliss> puck: how likely is it that shm/memfd fds I get from the Wayland compositor will be page-aligned?
<qyliss> because it would be extremely extremely convenient for me if they were page-aligned
<puck> 100%
<puck> like
<puck> if a memfd wasn't on a page boundary you wouldn't be able to nicely mmap it in
<qyliss> Awesome!
<puck> and it's not like you could fit two memfds on a single memory page
<puck> cause that'd be impossible to properly ACL
<qyliss> so, there's a kernel API that turns a memfd into a dmabuf
<qyliss> (A userspace API, from the kernel, to be precise)
<qyliss> I'm wondering if I can use that when I receieve a memfd from a compositor, then send the dmabuf over virtio_wl
<qyliss> (This is the best documentation I could find for that API: https://lore.kernel.org/lkml/20180911134216.9760-14-kraxel@redhat.com/)
<puck> i suspect that the answer to that is "no"
<qyliss> aww :(
<qyliss> why?
<puck> the only dmabufs you can transfer over virtio-wl is the ones that are virtio-gpu created
<puck> i think
<qyliss> Oh really?
<puck> yeah
<puck> the point is that the memory backing the buffer has to be known to the virtio drivers
<puck> hrmm
<puck> i'm not entirely sure how the dmabuf stuff works
<puck> it might be possible with virtio-gpu
<qyliss> Do you know if I could use virtio-gpu without actually giving a VM GPU access?
<qyliss> and just use it for the "resources"
<puck> lol i looked up "virtio-wl" and your blogpost was the first
<puck> qyliss: i suspect so? not entirely sure on how the whole KMS/gpu thing works
<MichaelRaskin> Virgil3D sounds like they want full arbitrary Mesa setup on the host and present a consistent view on virtio-gpu side (but they are Qemu)
<MichaelRaskin> qyliss: if you have some Nix expression to build and run a script, I can check what happens if CrosVM is contained with no /dev/dri in the sandbox
klltkr has joined #spectrum