From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
Gleb Natapov <gleb@redhat.com>,
LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: [PATCH 1/5] Revert "KVM: x86: Optimize mmio spte zapping when, creating/moving memslot"
Date: Fri, 15 Mar 2013 23:26:59 +0800 [thread overview]
Message-ID: <51433DC3.1070404@linux.vnet.ibm.com> (raw)
In-Reply-To: <51433D98.4050605@linux.vnet.ibm.com>
This reverts commit 982b3394dd23eec6e5a2f7871238435a167b63cc.
This way is not scale, will use a simple and scale way to zap all
mmio sptes later
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/mmu.c | 18 ------------------
arch/x86/kvm/x86.c | 2 +-
3 files changed, 1 insertions(+), 20 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 3f205c6c..9b75cae 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -767,7 +767,6 @@ void kvm_mmu_write_protect_pt_masked(struct kvm *kvm,
struct kvm_memory_slot *slot,
gfn_t gfn_offset, unsigned long mask);
void kvm_mmu_zap_all(struct kvm *kvm);
-void kvm_mmu_zap_mmio_sptes(struct kvm *kvm);
unsigned int kvm_mmu_calculate_mmu_pages(struct kvm *kvm);
void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages);
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index c1a9b7b..de45ec1 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -4189,24 +4189,6 @@ restart:
spin_unlock(&kvm->mmu_lock);
}
-void kvm_mmu_zap_mmio_sptes(struct kvm *kvm)
-{
- struct kvm_mmu_page *sp, *node;
- LIST_HEAD(invalid_list);
-
- spin_lock(&kvm->mmu_lock);
-restart:
- list_for_each_entry_safe(sp, node, &kvm->arch.active_mmu_pages, link) {
- if (!sp->mmio_cached)
- continue;
- if (kvm_mmu_prepare_zap_page(kvm, sp, &invalid_list))
- goto restart;
- }
-
- kvm_mmu_commit_zap_page(kvm, &invalid_list);
- spin_unlock(&kvm->mmu_lock);
-}
-
static int mmu_shrink(struct shrinker *shrink, struct shrink_control *sc)
{
struct kvm *kvm;
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index d3c4787..61a5bb6 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6991,7 +6991,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
* mmio sptes.
*/
if ((change == KVM_MR_CREATE) || (change == KVM_MR_MOVE)) {
- kvm_mmu_zap_mmio_sptes(kvm);
next prev parent reply other threads:[~2013-03-15 15:27 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 15:26 [PATCH 0/5] KVM: MMU: fast invalid all mmio sptes Xiao Guangrong
2013-03-15 15:26 ` Xiao Guangrong [this message]
2013-03-16 2:07 ` [PATCH 1/5] Revert "KVM: x86: Optimize mmio spte zapping when, creating/moving memslot" Takuya Yoshikawa
2013-03-18 7:36 ` Xiao Guangrong
2013-03-15 15:27 ` [PATCH 2/5] Revert "KVM: MMU: Mark sp mmio cached when creating mmio spte" Xiao Guangrong
2013-03-15 15:28 ` [PATCH 3/5] KVM: MMU: retain more available bits available on mmio spte Xiao Guangrong
2013-03-15 15:29 ` [PATCH 4/5] KVM: MMU: store generation-number into " Xiao Guangrong
2013-03-18 11:19 ` Paolo Bonzini
2013-03-18 12:42 ` Xiao Guangrong
2013-03-18 12:48 ` Gleb Natapov
2013-03-20 18:43 ` Marcelo Tosatti
2013-03-15 15:29 ` [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes Xiao Guangrong
2013-03-16 2:13 ` Takuya Yoshikawa
2013-03-18 7:38 ` Xiao Guangrong
2013-03-17 15:02 ` Gleb Natapov
2013-03-18 8:08 ` Xiao Guangrong
2013-03-18 9:13 ` Gleb Natapov
2013-03-18 12:29 ` Xiao Guangrong
2013-03-18 12:46 ` Gleb Natapov
2013-03-18 13:09 ` Xiao Guangrong
2013-03-18 13:19 ` Gleb Natapov
2013-03-18 13:25 ` Xiao Guangrong
2013-03-18 13:27 ` Gleb Natapov
2013-03-18 13:32 ` Xiao Guangrong
2013-03-18 22:16 ` Eric Northup
2013-03-19 3:15 ` Xiao Guangrong
2013-03-19 7:36 ` Gleb Natapov
2013-03-19 7:52 ` Xiao Guangrong
2013-03-16 2:06 ` [PATCH 0/5] " Takuya Yoshikawa
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=51433DC3.1070404@linux.vnet.ibm.com \
--to=xiaoguangrong@linux.vnet.ibm.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@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