linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] kvm_main: fix some comments
@ 2019-04-23 11:40 Jiang Biao
  2019-04-23 11:47 ` Cornelia Huck
  2019-04-30 19:09 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Jiang Biao @ 2019-04-23 11:40 UTC (permalink / raw)
  To: pbonzini, rkrcmar; +Cc: kvm, linux-kernel, benbjiang, cohuck

is_dirty has been renamed to flush, but the comment for it is
outdated. And the description about @flush parameter for
kvm_clear_dirty_log_protect() is missing, add it in this patch
as well.

Signed-off-by: Jiang Biao <benbjiang@tencent.com>
---
 virt/kvm/kvm_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index dc8edc97ba85..6cf7e99e6003 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1134,11 +1134,11 @@ EXPORT_SYMBOL_GPL(kvm_get_dirty_log);
 
 #ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT
 /**
- * kvm_get_dirty_log_protect - get a snapshot of dirty pages, and if any pages
+ * kvm_get_dirty_log_protect - get a snapshot of dirty pages
  *	and reenable dirty page tracking for the corresponding pages.
  * @kvm:	pointer to kvm instance
  * @log:	slot id and address to which we copy the log
- * @is_dirty:	flag set if any page is dirty
+ * @flush:	true if TLB flush is needed by caller
  *
  * We need to keep it in mind that VCPU threads can write to the bitmap
  * concurrently. So, to avoid losing track of dirty pages we keep the
@@ -1223,6 +1223,7 @@ EXPORT_SYMBOL_GPL(kvm_get_dirty_log_protect);
  *	and reenable dirty page tracking for the corresponding pages.
  * @kvm:	pointer to kvm instance
  * @log:	slot id and address from which to fetch the bitmap of dirty pages
+ * @flush:	true if TLB flush is needed by caller
  */
 int kvm_clear_dirty_log_protect(struct kvm *kvm,
 				struct kvm_clear_dirty_log *log, bool *flush)
-- 
2.17.2 (Apple Git-113)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] kvm_main: fix some comments
  2019-04-23 11:40 [PATCH v2] kvm_main: fix some comments Jiang Biao
@ 2019-04-23 11:47 ` Cornelia Huck
  2019-04-30 19:09 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Cornelia Huck @ 2019-04-23 11:47 UTC (permalink / raw)
  To: Jiang Biao; +Cc: pbonzini, rkrcmar, kvm, linux-kernel

On Tue, 23 Apr 2019 19:40:30 +0800
Jiang Biao <benbjiang@tencent.com> wrote:

> is_dirty has been renamed to flush, but the comment for it is
> outdated. And the description about @flush parameter for
> kvm_clear_dirty_log_protect() is missing, add it in this patch
> as well.
> 
> Signed-off-by: Jiang Biao <benbjiang@tencent.com>
> ---
>  virt/kvm/kvm_main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] kvm_main: fix some comments
  2019-04-23 11:40 [PATCH v2] kvm_main: fix some comments Jiang Biao
  2019-04-23 11:47 ` Cornelia Huck
@ 2019-04-30 19:09 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2019-04-30 19:09 UTC (permalink / raw)
  To: Jiang Biao, rkrcmar; +Cc: kvm, linux-kernel, cohuck

On 23/04/19 13:40, Jiang Biao wrote:
> is_dirty has been renamed to flush, but the comment for it is
> outdated. And the description about @flush parameter for
> kvm_clear_dirty_log_protect() is missing, add it in this patch
> as well.
> 
> Signed-off-by: Jiang Biao <benbjiang@tencent.com>
> ---
>  virt/kvm/kvm_main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index dc8edc97ba85..6cf7e99e6003 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -1134,11 +1134,11 @@ EXPORT_SYMBOL_GPL(kvm_get_dirty_log);
>  
>  #ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT
>  /**
> - * kvm_get_dirty_log_protect - get a snapshot of dirty pages, and if any pages
> + * kvm_get_dirty_log_protect - get a snapshot of dirty pages
>   *	and reenable dirty page tracking for the corresponding pages.
>   * @kvm:	pointer to kvm instance
>   * @log:	slot id and address to which we copy the log
> - * @is_dirty:	flag set if any page is dirty
> + * @flush:	true if TLB flush is needed by caller
>   *
>   * We need to keep it in mind that VCPU threads can write to the bitmap
>   * concurrently. So, to avoid losing track of dirty pages we keep the
> @@ -1223,6 +1223,7 @@ EXPORT_SYMBOL_GPL(kvm_get_dirty_log_protect);
>   *	and reenable dirty page tracking for the corresponding pages.
>   * @kvm:	pointer to kvm instance
>   * @log:	slot id and address from which to fetch the bitmap of dirty pages
> + * @flush:	true if TLB flush is needed by caller
>   */
>  int kvm_clear_dirty_log_protect(struct kvm *kvm,
>  				struct kvm_clear_dirty_log *log, bool *flush)
> 

Queued, thanks.

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-30 19:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 11:40 [PATCH v2] kvm_main: fix some comments Jiang Biao
2019-04-23 11:47 ` Cornelia Huck
2019-04-30 19:09 ` Paolo Bonzini

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).