From: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
To: avi@redhat.com, mtosatti@redhat.com
Cc: kvm@vger.kernel.org, Wei Yongjun <yjwei@cn.fujitsu.com>
Subject: Re: [PATCH -v3 1/2] KVM: introduce kvm_uninit_mmu_notifier()
Date: Fri, 12 Mar 2010 19:12:02 +0900 [thread overview]
Message-ID: <4B9A1372.2070900@oss.ntt.co.jp> (raw)
In-Reply-To: <20100312185751.f113f603.yoshikawa.takuya@oss.ntt.co.jp>
I made this patch for the coalesced mmio's error handling work.
Though, I wanted to finish this work, I have no time this week any more.
I'll do the remaining part next week, sorry.
Takuya Yoshikawa wrote:
> We have kvm_init_mmu_notifier() for registering mmu notifier.
> This patch makes the counterpart for unregister.
>
> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
> ---
> virt/kvm/kvm_main.c | 16 +++++++++++-----
> 1 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index e758ef7..64b792c 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -359,6 +359,11 @@ static int kvm_init_mmu_notifier(struct kvm *kvm)
> return mmu_notifier_register(&kvm->mmu_notifier, current->mm);
> }
>
> +static void kvm_uninit_mmu_notifier(struct kvm *kvm)
> +{
> + mmu_notifier_unregister(&kvm->mmu_notifier, kvm->mm);
> +}
> +
> #else /* !(CONFIG_MMU_NOTIFIER && KVM_ARCH_WANT_MMU_NOTIFIER) */
>
> static int kvm_init_mmu_notifier(struct kvm *kvm)
> @@ -366,6 +371,11 @@ static int kvm_init_mmu_notifier(struct kvm *kvm)
> return 0;
> }
>
> +static void kvm_uninit_mmu_notifier(struct kvm *kvm)
> +{
> + kvm_arch_flush_shadow(kvm);
> +}
> +
> #endif /* CONFIG_MMU_NOTIFIER && KVM_ARCH_WANT_MMU_NOTIFIER */
>
> static struct kvm *kvm_create_vm(void)
> @@ -485,11 +495,7 @@ static void kvm_destroy_vm(struct kvm *kvm)
> for (i = 0; i < KVM_NR_BUSES; i++)
> kvm_io_bus_destroy(kvm->buses[i]);
> kvm_coalesced_mmio_free(kvm);
> -#if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER)
> - mmu_notifier_unregister(&kvm->mmu_notifier, kvm->mm);
> -#else
> - kvm_arch_flush_shadow(kvm);
> -#endif
> + kvm_uninit_mmu_notifier(kvm);
> kvm_arch_destroy_vm(kvm);
> hardware_disable_all();
> mmdrop(mm);
prev parent reply other threads:[~2010-03-12 10:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 3:05 [PATCH] KVM: coalesced_mmio: NULLify the pointers before freeing ring page and dev Takuya Yoshikawa
2010-03-12 3:41 ` Wei Yongjun
2010-03-12 4:15 ` Takuya Yoshikawa
2010-03-12 3:43 ` [PATCH] KVM: fix to not use NULL kvm->coalesced_mmio_ring in kvm_vcpu_fault() Wei Yongjun
2010-03-12 4:22 ` Takuya Yoshikawa
2010-03-12 7:52 ` [PATCH -v2] KVM: fix kvm_coalesced_mmio_init()'s error handling Takuya Yoshikawa
2010-03-12 7:56 ` Wei Yongjun
2010-03-12 8:00 ` Takuya Yoshikawa
2010-03-12 9:57 ` [PATCH -v3 1/2] KVM: introduce kvm_uninit_mmu_notifier() Takuya Yoshikawa
2010-03-12 10:12 ` Takuya Yoshikawa [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=4B9A1372.2070900@oss.ntt.co.jp \
--to=yoshikawa.takuya@oss.ntt.co.jp \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=yjwei@cn.fujitsu.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