Skip to contentSkip to conversation

kvm_main: fix some comments

PATCH Superseded Jiang Biao 2 participants 2 messages Apr 23, 2019 KVM

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jiang Biao

author
#0 lore raw

PATCH 1/1 kvm_main: fix some comments

is_dirty has been rename 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 also.

---
 virt/kvm/kvm_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
virt/kvm/kvm_main.c +2 -1
index dc8edc97ba85..40b435e77672 100644
@@ -1138,7 +1138,7 @@ EXPORT_SYMBOL_GPL(kvm_get_dirty_log);
  *	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:	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:	if TLB flush is needed by caller
  */
 int kvm_clear_dirty_log_protect(struct kvm *kvm,
 				struct kvm_clear_dirty_log *log, bool *flush)
Signature · 1 line
2.17.2 (Apple Git-113)
#1 lore raw
Quoted 1 line · On Tue, 23 Apr 2019 17:40:08 +0800 Jiang Biao <[email protected]> wrote:

is_dirty has been rename to flush, but the comment for it is

s/rename/renamed/

Quoted 14 lines

outdated. And the description about @flush parameter for kvm_clear_dirty_log_protect() is missing, add it in this patch also.

---
 virt/kvm/kvm_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
virt/kvm/kvm_main.c +0 -0
index dc8edc97ba85..40b435e77672 100644

virt/kvm/kvm_main.c EXPORT_SYMBOL_GPL(kvm_get_dirty_log); · line 1138

Quoted 1 line
virt/kvm/kvm_main.c +0 -0
@@ -1138,7 +1138,7 @@ EXPORT_SYMBOL_GPL(kvm_get_dirty_log);
  *	and reenable dirty page tracking for the corresponding pages.

BTW: Not seen in the diff, but this line and the preceding one do not really form a sentence that makes sense :) Maybe fix that as well, as you are touching the area anyway?

virt/kvm/kvm_main.c EXPORT_SYMBOL_GPL(kvm_get_dirty_log); · line 1141

Quoted 4 lines
virt/kvm/kvm_main.c +1 -1
  * @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:	if TLB flush is needed by caller

Hm, maybe "true if TLB flush is needed by caller"?

Quoted 11 lines
virt/kvm/kvm_main.c +1 -0
  *
  * 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:	if TLB flush is needed by caller
  */
 int kvm_clear_dirty_log_protect(struct kvm *kvm,
 				struct kvm_clear_dirty_log *log, bool *flush)