From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH v2] KVM: MMU: Don't use RCU for lockless shadow walking
Date: Tue, 24 Apr 2012 18:13:37 +0800 [thread overview]
Message-ID: <4F967CD1.1020605@linux.vnet.ibm.com> (raw)
In-Reply-To: <1335260845-16271-1-git-send-email-avi@redhat.com>
On 04/24/2012 05:47 PM, Avi Kivity wrote:
> static void kvm_mmu_commit_zap_page(struct kvm *kvm,
> struct list_head *invalid_list)
> {
> @@ -2021,17 +2006,17 @@ static void kvm_mmu_commit_zap_page(struct kvm *kvm,
> if (list_empty(invalid_list))
> return;
>
> - kvm_flush_remote_tlbs(kvm);
> -
> - if (atomic_read(&kvm->arch.reader_counter)) {
> - kvm_mmu_isolate_pages(invalid_list);
> - sp = list_first_entry(invalid_list, struct kvm_mmu_page, link);
> - list_del_init(invalid_list);
> + /*
> + * wmb: make sure everyone sees our modifications to the page tables
Other lockless vcpu can see a old-copy of a spte, but it is ok since all page
tables is valid to be used. (kvm_flush_remote_tlbs can stop page table to be
freed)
> + * rmb: make sure we see changes to vcpu->mode
It is the responsibility of kvm_flush_remote_tlbs to see changes to vcpu->mode.
No?
next prev parent reply other threads:[~2012-04-24 10:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 9:47 [PATCH v2] KVM: MMU: Don't use RCU for lockless shadow walking Avi Kivity
2012-04-24 10:13 ` Xiao Guangrong [this message]
2012-04-24 10:42 ` Avi Kivity
2012-04-26 22:00 ` Marcelo Tosatti
2012-04-27 6:07 ` Xiao Guangrong
2012-04-27 21:49 ` Marcelo Tosatti
2012-04-29 9:38 ` Avi Kivity
2012-04-29 9:35 ` Avi Kivity
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=4F967CD1.1020605@linux.vnet.ibm.com \
--to=xiaoguangrong@linux.vnet.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@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