public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH gmem FIXUP] kvm: guestmem: do not use a file system
Date: Fri, 13 Oct 2023 09:55:33 -0700	[thread overview]
Message-ID: <ZSl2hdfF8XSXss3h@google.com> (raw)
In-Reply-To: <7c4b1c78-de74-5fff-7327-0863f403eb7e@redhat.com>

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.

  reply	other threads:[~2023-10-13 16:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28 18:06 [PATCH gmem FIXUP] kvm: guestmem: do not use a file system Paolo Bonzini
2023-09-29  2:22 ` Sean Christopherson
2023-10-09  2:22   ` Al Viro
2023-10-09  2:35     ` Al Viro
2023-10-09 14:32     ` Sean Christopherson
2023-10-09 20:06       ` Al Viro
2023-10-09 20:20         ` Sean Christopherson
2023-10-09 20:40           ` Al Viro
2023-10-09 21:26             ` Sean Christopherson
2023-10-10  0:09               ` Al Viro
2023-10-10  0:27                 ` Sean Christopherson
2023-10-10  0:37                   ` Al Viro
2023-10-10 23:30                     ` Sean Christopherson
2023-10-11 15:06                       ` Xu Yilun
2023-10-11 17:57                       ` Paolo Bonzini
2023-10-13 16:55                         ` Sean Christopherson [this message]
2023-10-16 15:19                           ` Paolo Bonzini
2023-10-09  2:16 ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZSl2hdfF8XSXss3h@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox