lkml.org 
[lkml]   [2023]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH gmem FIXUP] kvm: guestmem: do not use a file system
From
On Wed, Oct 11, 2023, Paolo Bonzini wrote:
> Your patch 2 looks good, but perhaps instead of setting the owner we could
> stash the struct module* in a global, and try_get/put it from open and
> release respectively? That is, .owner keeps the kvm module alive and the
> kvm module keeps kvm-intel/kvm-amd alive. That would subsume patches 1 and 3.

I don't think that would be a net positive. We'd have to implement .open() for
several file types just to get a reference to the sub-module. At that point, the
odds of forgetting to implement .open() are about the same as forgetting to set
.owner when adding a new file type, e.g. guest_memfd.

\
 
 \ /
  Last update: 2023-10-13 18:56    [W:0.346 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site