All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Sean Christopherson <seanjc@google.com>
Cc: Eric Auger <eric.auger@redhat.com>,
	eric.auger.pro@gmail.com, broonie@kernel.org, maz@kernel.org,
	kvmarm@lists.linux.dev, kvm@vger.kernel.org, joey.gouly@arm.com,
	shuah@kernel.org, pbonzini@redhat.com
Subject: Re: [PATCH  2/3] KVM: selftests: Introduce kvm_vm_dead_free
Date: Mon, 11 Nov 2024 19:46:02 +0000	[thread overview]
Message-ID: <ZzJe-ju6pleqTfS8@linux.dev> (raw)
In-Reply-To: <Zy0ihQlkexIWc1fq@google.com>

On Thu, Nov 07, 2024 at 12:26:45PM -0800, Sean Christopherson wrote:
> On Thu, Nov 07, 2024, Oliver Upton wrote:
> > On Thu, Nov 07, 2024 at 11:56:32AM -0800, Sean Christopherson wrote:
> > > ---
> > > From: Sean Christopherson <seanjc@google.com>
> > > Date: Thu, 7 Nov 2024 11:39:59 -0800
> > > Subject: [PATCH] KVM: selftests: Don't bother deleting memslots in KVM when
> > >  freeing VMs
> > > 
> > > When freeing a VM, don't call into KVM to manually remove each memslot,
> > > simply cleanup and free any userspace assets associated with the memory
> > > region.  KVM is ultimately responsible for ensuring kernel resources are
> > > freed when the VM is destroyed, deleting memslots one-by-one is
> > > unnecessarily slow, and unless a test is already leaking the VM fd, the
> > > VM will be destroyed when kvm_vm_release() is called.
> > > 
> > > Not deleting KVM's memslot also allows cleaning up dead VMs without having
> > > to care whether or not the to-be-freed VM is dead or alive.
> > 
> > Can you add a comment to kvm_vm_free() about why we want to avoid ioctls
> > in that helper? It'd help discourage this situation from happening again
> > in the future in the unlikely case someone wants to park an ioctl there.
> > 
> > > Reported-by: Eric Auger <eric.auger@redhat.com>
> > > Reported-by: Mark Brown <broonie@kernel.org>
> > > Signed-off-by: Sean Christopherson <seanjc@google.com>
> > 
> > I'm assuming you want to take this, happy to grab it otherwise.
> 
> You take it.  Unless my git foo is off the rails, this is needs to go into 6.12,
> along with a fix for the vGIC test.  That, and I already sent Paolo a pull request
> for rc7; I don't want to overwork myself ;-)

Fine -- I _guess_ I'll do it then :) It'll just go in the 6.13 pull
request.

https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git/commit/?h=next&id=5afe18dfa47daead88517b095b6e0ce012f031f8

-- 
Thanks,
Oliver

  reply	other threads:[~2024-11-11 19:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07  9:38 [PATCH 0/3] KVM: arm64: Handle KVM_REQ_VM_DEAD in vgic_init test Eric Auger
2024-11-07  9:38 ` [PATCH 1/3] KVM: selftests: Introduce vm_dead() Eric Auger
2024-11-07  9:38 ` [PATCH 2/3] KVM: selftests: Introduce kvm_vm_dead_free Eric Auger
2024-11-07 17:55   ` Sean Christopherson
2024-11-07 18:17     ` Mark Brown
2024-11-07 19:08     ` Oliver Upton
2024-11-07 19:56       ` Sean Christopherson
2024-11-07 20:12         ` Oliver Upton
2024-11-07 20:26           ` Sean Christopherson
2024-11-11 19:46             ` Oliver Upton [this message]
2024-11-08  8:55           ` Eric Auger
2024-11-08  9:00           ` Eric Auger
2024-11-08 17:18             ` Oliver Upton
2024-11-07  9:38 ` [PATCH 3/3] KVM: selftests: Handle dead VM in vgic_init test Eric Auger

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=ZzJe-ju6pleqTfS8@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=broonie@kernel.org \
    --cc=eric.auger.pro@gmail.com \
    --cc=eric.auger@redhat.com \
    --cc=joey.gouly@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=shuah@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.