kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Junaid Shahid <junaids@google.com>
Cc: Jim Mattson <jmattson@google.com>,
	kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	John Sperbeck <jsperbeck@google.com>
Subject: Re: [PATCH v2] kvm: call kvm_arch_destroy_vm if vm creation fails
Date: Wed, 23 Oct 2019 19:31:43 -0700	[thread overview]
Message-ID: <20191024023142.GB3744@linux.intel.com> (raw)
In-Reply-To: <3ccc2f6c-9695-ee76-5734-e93eb802d7e2@google.com>

On Wed, Oct 23, 2019 at 06:18:35PM -0700, Junaid Shahid wrote:
> [Plain-text resend]
> 
> On 10/23/19 5:05 PM, Sean Christopherson wrote:
> > 
> > Side topic, the loops to free the buses and memslots belong higher up,
> > the arrays aren't initialized until after hardware_enable().  Probably
> > doesn't harm anything but it's a waste of cycles.  I'll send a patch.
> > 
> 
> Aren't the x86_set_memory_region() calls inside kvm_arch_destroy_vm() going
> to be problematic if hardware_enable_all() fails? Perhaps we should move the
> memslots allocation before kvm_arch_init_vm(), or check for NULL memslots in
> kvm_arch_destroy_vm().

Oof, that does appear to be the case.  Initializing memslots and buses
before calling into arch code seems like the way to go.

      reply	other threads:[~2019-10-24  2:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23 20:32 [PATCH v2] kvm: call kvm_arch_destroy_vm if vm creation fails Jim Mattson
2019-10-24  0:05 ` Sean Christopherson
2019-10-24  1:18   ` Junaid Shahid
2019-10-24  2:31     ` Sean Christopherson [this message]

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=20191024023142.GB3744@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=jmattson@google.com \
    --cc=jsperbeck@google.com \
    --cc=junaids@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).