[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-dev] Re: [PATCH] virtio-gpu: add shared resource feature
Hi, > > They are never taken away from guest ram. The guest is free to do > > whatever it wants with the pages. It's the job of the guest driver to > > make sure the pages are not released until the host stopped using them. > > So the host must drop all references before completing the > > DETACH_BACKING command. > > Let's write that in the spec. Yes, saying so explicitly that totally makes sense. I'll update the patch accordingly. > We (you?) need to modify drm_gem_shmem_* helpers to always be cached > for virtgpu for now, since the TTM removal changed that behavior. We can just roll our own mmap function to handle that. I'll prepare a patch (that is independent from F_SHARED anyway). > Then, we should expose host properties to the guest, like [1] suggests > (maybe something like VIRTIO_GPU_F_GUEST_ATTRIBUTE_OVERRIDE, > VIRTIO_GPU_F_GUEST_CACHE_OPS). If there's already a method to do > this, that would be awesome. We'll need that for sure when mapping host resources into the guest, but we are not there yet with F_SHARED only. > > Also: what is special in virtualization here? There are arm drivers > > using drm_gem_shmem_* helpers. How do they manage this? > > Panfrost, v3d. I'm surprised they haven't hit this issue yet. Maybe because all mappings are consistent. With virtio-gpu you could end up in a situation where the guest uses wc whereas the host uses cached and things go boom from there. cheers, Gerd
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]