All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzbot+744e173caec2e1627ee0@syzkaller.appspotmail.com,
	David Matlack <dmatlack@google.com>
Subject: Re: [PATCH 3/3] KVM: Move coalesced MMIO initialization (back) into kvm_create_vm()
Date: Tue, 16 Aug 2022 18:04:14 +0000	[thread overview]
Message-ID: <YvvcHitVaf2EDAj0@google.com> (raw)
In-Reply-To: <20220816053937.2477106-4-seanjc@google.com>

On Tue, Aug 16, 2022 at 05:39:37AM +0000, Sean Christopherson wrote:
> Invoke kvm_coalesced_mmio_init() from kvm_create_vm() now that allocating
> and initializing coalesced MMIO objects is separate from registering any
> associated devices.  Moving coalesced MMIO cleans up the last oddity
> where KVM does VM creation/initialization after kvm_create_vm(), and more
> importantly after kvm_arch_post_init_vm() is called and the VM is added
> to the global vm_list, i.e. after the VM is fully created as far as KVM
> is concerned.
> 
> Originally, kvm_coalesced_mmio_init() was called by kvm_create_vm(), but
> the original implementation was completely devoid of error handling.
> Commit 6ce5a090a9a0 ("KVM: coalesced_mmio: fix kvm_coalesced_mmio_init()'s
> error handling" fixed the various bugs, and in doing so rightly moved the
> call to after kvm_create_vm() because kvm_coalesced_mmio_init() also
> registered the coalesced MMIO device.  Commit 2b3c246a682c ("KVM: Make
> coalesced mmio use a device per zone") cleaned up that mess by having
> each zone register a separate device, i.e. moved device registration to
> its logical home in kvm_vm_ioctl_register_coalesced_mmio().  As a result,
> kvm_coalesced_mmio_init() is now a "pure" initialization helper and can
> be safely called from kvm_create_vm().
> 
> Opportunstically drop the #ifdef, KVM provides stubs for
> kvm_coalesced_mmio_{init,free}() when CONFIG_KVM_MMIO=n (arm).
							   ^^^
We have CONFIG_KVM_MMIO=y on arm64. Is it actually s390?

--
Thanks,
Oliver

  reply	other threads:[~2022-08-16 18:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16  5:39 [PATCH 0/3] KVM: kvm_create_vm() bug fixes and cleanup Sean Christopherson
2022-08-16  5:39 ` [PATCH 1/3] KVM: Properly unwind VM creation if creating debugfs fails Sean Christopherson
2022-08-16 17:52   ` Oliver Upton
2022-08-16  5:39 ` [PATCH 2/3] KVM: Unconditionally get a ref to /dev/kvm module when creating a VM Sean Christopherson
2022-08-16 17:01   ` David Matlack
2022-08-16 21:43     ` Sean Christopherson
2022-08-16  5:39 ` [PATCH 3/3] KVM: Move coalesced MMIO initialization (back) into kvm_create_vm() Sean Christopherson
2022-08-16 18:04   ` Oliver Upton [this message]
2022-08-16 19:23     ` Sean Christopherson
2022-08-17  9:47 ` [PATCH 0/3] KVM: kvm_create_vm() bug fixes and cleanup Paolo Bonzini

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=YvvcHitVaf2EDAj0@google.com \
    --to=oliver.upton@linux.dev \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=syzbot+744e173caec2e1627ee0@syzkaller.appspotmail.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 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.