From: Paolo Bonzini <pbonzini@redhat.com>
To: lantianyu1986@gmail.com
Cc: Lan Tianyu <Tianyu.Lan@microsoft.com>,
rkrcmar@redhat.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com
Subject: Re: [PATCH] Revert "KVM: Eliminate extra function calls in kvm_get_dirty_log_protect()"
Date: Thu, 14 Feb 2019 17:42:05 +0100 [thread overview]
Message-ID: <c253c775-bc32-7cb4-e090-3f5764ea1285@redhat.com> (raw)
In-Reply-To: <20190202092027.54890-1-Tianyu.Lan@microsoft.com>
On 02/02/19 10:20, lantianyu1986@gmail.com wrote:
> From: Lan Tianyu <Tianyu.Lan@microsoft.com>
>
> The value of "dirty_bitmap[i]" is already check before setting its value
> to mask. The following check of "mask" is redundant. The check of "mask" was
> introduced by commit 58d2930f4ee3(("KVM: Eliminate extra function calls in
> kvm_get_dirty_log_protect()"). This patch is to revert the patch.
>
> Signed-off-by: Lan Tianyu <Tianyu.Lan@microsoft.com>
> ---
> virt/kvm/kvm_main.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 2bdc827b9ee9..ef06cfb9b52b 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -1200,11 +1200,9 @@ int kvm_get_dirty_log_protect(struct kvm *kvm,
> mask = xchg(&dirty_bitmap[i], 0);
> dirty_bitmap_buffer[i] = mask;
>
> - if (mask) {
> - offset = i * BITS_PER_LONG;
> - kvm_arch_mmu_enable_log_dirty_pt_masked(kvm, memslot,
> - offset, mask);
> - }
> + offset = i * BITS_PER_LONG;
> + kvm_arch_mmu_enable_log_dirty_pt_masked(kvm, memslot,
> + offset, mask);
> }
> spin_unlock(&kvm->mmu_lock);
> }
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2019-02-14 16:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-02 9:20 lantianyu1986
2019-02-14 16:42 ` Paolo Bonzini [this message]
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=c253c775-bc32-7cb4-e090-3f5764ea1285@redhat.com \
--to=pbonzini@redhat.com \
--cc=Tianyu.Lan@microsoft.com \
--cc=kvm@vger.kernel.org \
--cc=lantianyu1986@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@redhat.com \
--cc=sean.j.christopherson@intel.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
all inboxes | Powered by JetHome®