All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Jay Zhou <jianjay.zhou@huawei.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com,
	wangxinxin.wang@huawei.com, weidong.huang@huawei.com,
	sean.j.christopherson@intel.com, liu.jinsong@huawei.com
Subject: Re: [PATCH v2] KVM: x86: enable dirty log gradually in small chunks
Date: Thu, 20 Feb 2020 14:28:09 -0500	[thread overview]
Message-ID: <20200220192809.GA15253@xz-x1> (raw)
In-Reply-To: <20200220042828.27464-1-jianjay.zhou@huawei.com>

On Thu, Feb 20, 2020 at 12:28:28PM +0800, Jay Zhou wrote:
> @@ -5865,8 +5865,12 @@ void kvm_mmu_slot_remove_write_access(struct kvm *kvm,
>  	bool flush;
>  
>  	spin_lock(&kvm->mmu_lock);
> -	flush = slot_handle_all_level(kvm, memslot, slot_rmap_write_protect,
> -				      false);
> +	if (kvm->manual_dirty_log_protect & KVM_DIRTY_LOG_INITIALLY_SET)
> +		flush = slot_handle_large_level(kvm, memslot,
> +						slot_rmap_write_protect, false);
> +	else
> +		flush = slot_handle_all_level(kvm, memslot,
> +						slot_rmap_write_protect, false);

Another extra comment:

I think we should still keep the old behavior for KVM_MEM_READONLY (in
kvm_mmu_slot_apply_flags())) for this...  Say, instead of doing this,
maybe we want kvm_mmu_slot_remove_write_access() to take a new
parameter to decide to which level we do the wr-protect.

Thanks,

>  	spin_unlock(&kvm->mmu_lock);
>  
>  	/*

-- 
Peter Xu


  parent reply	other threads:[~2020-02-20 19:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20  4:28 [PATCH v2] KVM: x86: enable dirty log gradually in small chunks Jay Zhou
2020-02-20 19:17 ` Peter Xu
2020-02-20 19:23   ` Sean Christopherson
2020-02-20 19:42     ` Peter Xu
2020-02-21  9:43       ` Zhoujian (jay)
2020-02-21  9:31   ` Zhoujian (jay)
2020-02-21 15:19     ` Peter Xu
2020-02-22  8:11       ` Zhoujian (jay)
2020-02-20 19:28 ` Peter Xu [this message]
2020-02-21  9:53   ` Zhoujian (jay)
2020-02-21 15:41     ` Peter Xu
2020-02-22  8:18       ` Zhoujian (jay)

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=20200220192809.GA15253@xz-x1 \
    --to=peterx@redhat.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=kvm@vger.kernel.org \
    --cc=liu.jinsong@huawei.com \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=wangxinxin.wang@huawei.com \
    --cc=weidong.huang@huawei.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.