On 4/23/24 11:30, Alex Bennée wrote: > Dmitry Osipenko <dmitry.osipe...@collabora.com> writes: > >> Hello, >> >> This series enables Vulkan Venus context support on virtio-gpu. >> >> All virglrender and almost all Linux kernel prerequisite changes >> needed by Venus are already in upstream. For kernel there is a pending >> KVM patchset that fixes mapping of compound pages needed for DRM drivers >> using TTM [1], othewrwise hostmem blob mapping will fail with a KVM error >> from Qemu. >> >> [1] >> https://lore.kernel.org/kvm/20240229025759.1187910-1-steve...@google.com/ > > Following the link for the TTM/KVM patches on the kernel side points at > changes for AMD cards getting NAK'ed so I'm a little confused as to what > parts are needed.
I wouldn't say that patches are NAK'ed, they more having a problem with getting a review. Without KMV patches host blobs don't work depending on a host GPU driver and kernel configuration. It's actually not only TTM drivers that are requiring the KVM changes, but a non-TTM GPU drivers that use huge pages may also need them too. You may need a patched KVM for i915 driver that doesn't use TTM, depending on whether transparent huge pages are enabled in the kernel config. > Is this only relevant for ensuring the virtual mappings to the > underlying hardware aren't moved around when KVM is exporting those > pages to the guest? Yes, host GPU driver needs to handle guest access page fault to keep pages in place. > Our interest is in Xen which obviously mediates everything through stage > 2 mappings to from the real PA to the IPA the domains see. However AIUI > all the blob allocation is managed by the GEM/TTM layer of whichever > kernel is responsible for driving the GPU. Does this layer work with > kernel vaddr or the underlying IPA of the resources? We shouldn't > expect the IPA to change between allocations should we? TTM works with memory pages and it moves pages around. It may swap out pages and then relies on a working page faulting notification to swap-in pages back. Whether PA stays fixed, I don't know for sure. Robert Beckett or somebody from AMD should know better how it works for Xen and may comment on it. -- Best regards, Dmitry