From: Peter Xu <peterx@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-stable@nongnu.org, qemu-devel@nongnu.org, dgilbert@redhat.com
Subject: Re: [PATCH 2/2] kvm: clear dirty bitmaps from all overlapping memslots
Date: Fri, 20 Sep 2019 20:18:13 +0800 [thread overview]
Message-ID: <20190920121813.GH12858@xz-x1> (raw)
In-Reply-To: <1568974882-7419-3-git-send-email-pbonzini@redhat.com>
On Fri, Sep 20, 2019 at 12:21:22PM +0200, Paolo Bonzini wrote:
> Since the KVM dirty page reporting works on guest physical addresses,
> we need to clear all of the aliases when a page is migrated, or there
> is a risk of losing writes to the aliases that were not cleared.
The patch content looks perfect to me, though I just want to make sure
I understand the issue behind, and the commit message...
IMHO we've got two issues to cover for log_clear():
(1) memory region aliasing, hence multiple GPAs can point to the same
HVA/HPA so we need to clear the memslot dirty bits on all the
mapped GPAs, and,
(2) large log_clear() request which can cover more than one valid
kvm memslots. Note that in this case, the mem slots can really
be having different HVAs so imho it should be a different issue
comparing to (1)
The commit message says it's solving problem (1). However for what I
understand, we are actually doing well on issue (1) because in
memory_region_clear_dirty_bitmap() we iterate over all the flat views
so that we should have caught all the aliasing memory regions if there
are any. However this patch should perfectly fix problem (2). Am I
right?
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2019-09-20 12:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 10:21 [PATCH 0/2] kvm: clear dirty bitmaps from all overlapping memslots Paolo Bonzini
2019-09-20 10:21 ` [PATCH 1/2] kvm: extract kvm_log_clear_one_slot Paolo Bonzini
2019-09-20 12:11 ` Peter Xu
2019-09-20 10:21 ` [PATCH 2/2] kvm: clear dirty bitmaps from all overlapping memslots Paolo Bonzini
2019-09-20 12:18 ` Peter Xu [this message]
2019-09-20 14:03 ` Paolo Bonzini
2019-09-20 12:19 ` [PATCH 0/2] " Peter Xu
2019-09-20 13:58 ` Igor Mammedov
2019-09-23 1:29 ` Peter Xu
2019-09-23 16:15 ` Igor Mammedov
2019-09-23 16:49 ` Paolo Bonzini
2019-09-24 2:53 ` Peter Xu
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=20190920121813.GH12858@xz-x1 \
--to=peterx@redhat.com \
--cc=dgilbert@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).