From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: High Level Proof of The Correctness of Dirty Page Tracking
Date: Sun, 01 Apr 2012 11:38:17 +0800 [thread overview]
Message-ID: <4F77CDA9.2030800@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120401001255.62d558b570abed499bc06356@gmail.com>
On 03/31/2012 11:12 PM, Takuya Yoshikawa wrote:
> This is what I wanted to read before starting GET_DIRTY_LOG work: about
> possible race between VCPU threads and GET_DIRTY_LOG thread.
>
> Although most things look trivial, there seem to be some interesting assumptions
> the correctness is based on including mmu lock usage.
>
> Takuya
>
> ===
> About MMU Page Fault Path:
> 1. Set bit in dirty bitmap
> 2. Make spte writable
> 3. Guest re-execute the write
>
> If GET_DIRTY_LOG is allowed to write protect the page between step 1 and 2,
> that page will be made writable again at step 2 and the write at step 3 will
> not be caught. Since the userspace can process that page before step 3, the
> written data may be lost. To avoid this mmu lock must be held correctly in
> both sides as the current implementation does.
>
Hmm, according to (*2), if we set the dirty bit after make spte writeable,
it should be safe without holding mmu-lock?
next prev parent reply other threads:[~2012-04-01 3:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-31 15:12 High Level Proof of The Correctness of Dirty Page Tracking Takuya Yoshikawa
2012-04-01 3:38 ` Xiao Guangrong [this message]
2012-04-02 13:53 ` 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=4F77CDA9.2030800@linux.vnet.ibm.com \
--to=xiaoguangrong@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=takuya.yoshikawa@gmail.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.