[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 00/11] Support blob memory and venus on qemu
From: |
Dmitry Osipenko |
Subject: |
Re: [PATCH v8 00/11] Support blob memory and venus on qemu |
Date: |
Tue, 23 Apr 2024 20:37:32 +0300 |
User-agent: |
Mozilla Thunderbird |
On 4/23/24 11:30, Alex Bennée wrote:
> Dmitry Osipenko <dmitry.osipenko@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-stevensd@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
- Re: [PATCH v8 08/11] virtio-gpu: Handle resource blob commands, (continued)
- [PATCH v8 10/11] virtio-gpu: Register capsets dynamically, Dmitry Osipenko, 2024/04/18
- [PATCH v8 09/11] virtio-gpu: Resource UUID, Dmitry Osipenko, 2024/04/18
- [PATCH v8 06/11] virtio-gpu: Support blob scanout using dmabuf fd, Dmitry Osipenko, 2024/04/18
- [PATCH v8 11/11] virtio-gpu: Support Venus context, Dmitry Osipenko, 2024/04/18
- Re: [PATCH v8 00/11] Support blob memory and venus on qemu, Alex Bennée, 2024/04/23
- Re: [PATCH v8 00/11] Support blob memory and venus on qemu,
Dmitry Osipenko <=