From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
KVM list <kvm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/5] KVM MMU: remove rmap before clear spte
Date: Thu, 13 May 2010 10:07:00 +0800 [thread overview]
Message-ID: <4BEB5EC4.6070802@cn.fujitsu.com> (raw)
In-Reply-To: <4BEB5E8A.7030606@cn.fujitsu.com>
Remove rmap before clear spte otherwise it will trigger BUG_ON() in
some functions such as rmap_write_protect()
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
arch/x86/kvm/mmu.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 67da751..a474d93 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1812,6 +1812,7 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
if (level > PT_PAGE_TABLE_LEVEL &&
has_wrprotected_page(vcpu->kvm, gfn, level)) {
ret = 1;
+ rmap_remove(vcpu->kvm, sptep);
spte = shadow_trap_nonpresent_pte;
goto set_pte;
}
--
1.6.1.2
next prev parent reply other threads:[~2010-05-13 2:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 2:06 [PATCH 1/5] KVM MMU: fix objects free Xiao Guangrong
2010-05-13 2:07 ` Xiao Guangrong [this message]
2010-05-13 2:08 ` [PATCH 3/5] KVM MMU: fix for got gfn when sync shadow pages Xiao Guangrong
2010-05-13 2:08 ` [PATCH 4/5] KVM MMU: fix two typos Xiao Guangrong
2010-05-13 2:09 ` [PATCH 5/5] KVM x86: cleanup unused local variable Xiao Guangrong
2010-05-14 22:50 ` [PATCH 1/5] KVM MMU: fix objects free Marcelo Tosatti
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=4BEB5EC4.6070802@cn.fujitsu.com \
--to=xiaoguangrong@cn.fujitsu.com \
--cc=avi@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 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.