All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Fix various comment errors
@ 2019-12-11  6:26 linmiaohe
  2019-12-11  6:26 ` [PATCH 1/6] KVM: Fix some wrong function names in comment linmiaohe
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: linmiaohe @ 2019-12-11  6:26 UTC (permalink / raw)
  To: pbonzini, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
	jmattson, joro, tglx, mingo, bp, hpa
  Cc: linmiaohe, kvm, linux-kernel, x86

From: Miaohe Lin <linmiaohe@huawei.com>

Fix various comment mistakes, such as typo, grammar mistake, out-dated
function name, writing error and so on. It is a bit tedious and many
thanks for review in advance.

Miaohe Lin (6):
  KVM: Fix some wrong function names in comment
  KVM: Fix some out-dated function names in comment
  KVM: Fix some comment typos and missing parentheses
  KVM: Fix some grammar mistakes
  KVM: hyperv: Fix some typos in vcpu unimpl info
  KVM: Fix some writing mistakes

 arch/x86/include/asm/kvm_host.h       | 2 +-
 arch/x86/kvm/hyperv.c                 | 6 +++---
 arch/x86/kvm/ioapic.c                 | 2 +-
 arch/x86/kvm/lapic.c                  | 4 ++--
 arch/x86/kvm/vmx/nested.c             | 2 +-
 arch/x86/kvm/vmx/vmcs_shadow_fields.h | 4 ++--
 arch/x86/kvm/vmx/vmx.c                | 8 ++++----
 virt/kvm/kvm_main.c                   | 6 +++---
 8 files changed, 17 insertions(+), 17 deletions(-)

-- 
2.19.1


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

* [PATCH 1/6] KVM: Fix some wrong function names in comment
  2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
@ 2019-12-11  6:26 ` linmiaohe
  2019-12-11  6:26 ` [PATCH 2/6] KVM: Fix some out-dated " linmiaohe
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: linmiaohe @ 2019-12-11  6:26 UTC (permalink / raw)
  To: pbonzini, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
	jmattson, joro, tglx, mingo, bp, hpa
  Cc: linmiaohe, kvm, linux-kernel, x86

From: Miaohe Lin <linmiaohe@huawei.com>

Fix some wrong function names in comment. mmu_check_roots is a typo for
mmu_check_root, vmcs_read_any should be vmcs12_read_any and so on.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 arch/x86/kvm/vmx/vmcs_shadow_fields.h | 2 +-
 virt/kvm/kvm_main.c                   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/vmx/vmcs_shadow_fields.h b/arch/x86/kvm/vmx/vmcs_shadow_fields.h
index eb1ecd16fd22..5f3d95c18c39 100644
--- a/arch/x86/kvm/vmx/vmcs_shadow_fields.h
+++ b/arch/x86/kvm/vmx/vmcs_shadow_fields.h
@@ -28,7 +28,7 @@ BUILD_BUG_ON(1)
 
 /*
  * Keeping the fields ordered by size is an attempt at improving
- * branch prediction in vmcs_read_any and vmcs_write_any.
+ * branch prediction in vmcs12_read_any and vmcs12_write_any.
  */
 
 /* 16-bits */
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 3aa21bec028d..63df3586f062 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1117,7 +1117,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
 		 *
 		 * validation of sp->gfn happens in:
 		 *	- gfn_to_hva (kvm_read_guest, gfn_to_pfn)
-		 *	- kvm_is_visible_gfn (mmu_check_roots)
+		 *	- kvm_is_visible_gfn (mmu_check_root)
 		 */
 		kvm_arch_flush_shadow_memslot(kvm, slot);
 
-- 
2.19.1


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

* [PATCH 2/6] KVM: Fix some out-dated function names in comment
  2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
  2019-12-11  6:26 ` [PATCH 1/6] KVM: Fix some wrong function names in comment linmiaohe
@ 2019-12-11  6:26 ` linmiaohe
  2019-12-11  6:26 ` [PATCH 3/6] KVM: Fix some comment typos and missing parentheses linmiaohe
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: linmiaohe @ 2019-12-11  6:26 UTC (permalink / raw)
  To: pbonzini, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
	jmattson, joro, tglx, mingo, bp, hpa
  Cc: linmiaohe, kvm, linux-kernel, x86

From: Miaohe Lin <linmiaohe@huawei.com>

Since commit b1346ab2afbe ("KVM: nVMX: Rename prepare_vmcs02_*_full to
prepare_vmcs02_*_rare"), prepare_vmcs02_full has been renamed to
prepare_vmcs02_rare.
nested_vmx_merge_msr_bitmap is renamed to nested_vmx_prepare_msr_bitmap
since commit c992384bde84 ("KVM: vmx: speed up MSR bitmap merge").

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 arch/x86/kvm/vmx/vmcs_shadow_fields.h | 2 +-
 arch/x86/kvm/vmx/vmx.c                | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kvm/vmx/vmcs_shadow_fields.h b/arch/x86/kvm/vmx/vmcs_shadow_fields.h
index 5f3d95c18c39..cad128d1657b 100644
--- a/arch/x86/kvm/vmx/vmcs_shadow_fields.h
+++ b/arch/x86/kvm/vmx/vmcs_shadow_fields.h
@@ -23,7 +23,7 @@ BUILD_BUG_ON(1)
  *
  * When adding or removing fields here, note that shadowed
  * fields must always be synced by prepare_vmcs02, not just
- * prepare_vmcs02_full.
+ * prepare_vmcs02_rare.
  */
 
 /*
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 51e3b27f90ed..bf24fbb2056c 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -2016,7 +2016,7 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 		 *
 		 * For nested:
 		 * The handling of the MSR bitmap for L2 guests is done in
-		 * nested_vmx_merge_msr_bitmap. We should not touch the
+		 * nested_vmx_prepare_msr_bitmap. We should not touch the
 		 * vmcs02.msr_bitmap here since it gets completely overwritten
 		 * in the merging. We update the vmcs01 here for L1 as well
 		 * since it will end up touching the MSR anyway now.
@@ -2052,7 +2052,7 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 		 *
 		 * For nested:
 		 * The handling of the MSR bitmap for L2 guests is done in
-		 * nested_vmx_merge_msr_bitmap. We should not touch the
+		 * nested_vmx_prepare_msr_bitmap. We should not touch the
 		 * vmcs02.msr_bitmap here since it gets completely overwritten
 		 * in the merging.
 		 */
-- 
2.19.1


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

* [PATCH 3/6] KVM: Fix some comment typos and missing parentheses
  2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
  2019-12-11  6:26 ` [PATCH 1/6] KVM: Fix some wrong function names in comment linmiaohe
  2019-12-11  6:26 ` [PATCH 2/6] KVM: Fix some out-dated " linmiaohe
@ 2019-12-11  6:26 ` linmiaohe
  2019-12-11 15:46   ` Sean Christopherson
  2019-12-11  6:26 ` [PATCH 4/6] KVM: Fix some grammar mistakes linmiaohe
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: linmiaohe @ 2019-12-11  6:26 UTC (permalink / raw)
  To: pbonzini, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
	jmattson, joro, tglx, mingo, bp, hpa
  Cc: linmiaohe, kvm, linux-kernel, x86

From: Miaohe Lin <linmiaohe@huawei.com>

Fix some typos and add missing parentheses in the comments.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 arch/x86/kvm/hyperv.c     | 2 +-
 arch/x86/kvm/lapic.c      | 2 +-
 arch/x86/kvm/vmx/nested.c | 2 +-
 arch/x86/kvm/vmx/vmx.c    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index c7d4640b7b1c..a48d5708f1f8 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -1122,7 +1122,7 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
 			return 1;
 
 		/*
-		 * Clear apic_assist portion of f(struct hv_vp_assist_page
+		 * Clear apic_assist portion of struct hv_vp_assist_page
 		 * only, there can be valuable data in the rest which needs
 		 * to be preserved e.g. on migration.
 		 */
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 679692b55f6d..ea402e741bd5 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -969,7 +969,7 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src,
  * - For single-destination interrupts, handle it in posted mode
  * - Else if vector hashing is enabled and it is a lowest-priority
  *   interrupt, handle it in posted mode and use the following mechanism
- *   to find the destinaiton vCPU.
+ *   to find the destination vCPU.
  *	1. For lowest-priority interrupts, store all the possible
  *	   destination vCPUs in an array.
  *	2. Use "guest vector % max number of destination vCPUs" to find
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index 7b01ef1d87e6..63ab49de324d 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -3427,7 +3427,7 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
 
 /*
  * On a nested exit from L2 to L1, vmcs12.guest_cr0 might not be up-to-date
- * because L2 may have changed some cr0 bits directly (CRO_GUEST_HOST_MASK).
+ * because L2 may have changed some cr0 bits directly (CR0_GUEST_HOST_MASK).
  * This function returns the new value we should put in vmcs12.guest_cr0.
  * It's not enough to just return the vmcs02 GUEST_CR0. Rather,
  *  1. Bits that neither L0 nor L1 trapped, were set directly by L2 and are now
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index bf24fbb2056c..1be3854f1090 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -6720,7 +6720,7 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
 	 * If PML is turned on, failure on enabling PML just results in failure
 	 * of creating the vcpu, therefore we can simplify PML logic (by
 	 * avoiding dealing with cases, such as enabling PML partially on vcpus
-	 * for the guest, etc.
+	 * for the guest), etc.
 	 */
 	if (enable_pml) {
 		vmx->pml_pg = alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO);
-- 
2.19.1


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

* [PATCH 4/6] KVM: Fix some grammar mistakes
  2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
                   ` (2 preceding siblings ...)
  2019-12-11  6:26 ` [PATCH 3/6] KVM: Fix some comment typos and missing parentheses linmiaohe
@ 2019-12-11  6:26 ` linmiaohe
  2019-12-11  6:26 ` [PATCH 5/6] KVM: hyperv: Fix some typos in vcpu unimpl info linmiaohe
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: linmiaohe @ 2019-12-11  6:26 UTC (permalink / raw)
  To: pbonzini, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
	jmattson, joro, tglx, mingo, bp, hpa
  Cc: linmiaohe, kvm, linux-kernel, x86

From: Miaohe Lin <linmiaohe@huawei.com>

Fix some grammar mistakes in the comments.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 arch/x86/kvm/ioapic.c | 2 +-
 arch/x86/kvm/lapic.c  | 2 +-
 virt/kvm/kvm_main.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c
index 77538fd77dc2..7312aab33298 100644
--- a/arch/x86/kvm/ioapic.c
+++ b/arch/x86/kvm/ioapic.c
@@ -189,7 +189,7 @@ static int ioapic_set_irq(struct kvm_ioapic *ioapic, unsigned int irq,
 	/*
 	 * Return 0 for coalesced interrupts; for edge-triggered interrupts,
 	 * this only happens if a previous edge has not been delivered due
-	 * do masking.  For level interrupts, the remote_irr field tells
+	 * to masking.  For level interrupts, the remote_irr field tells
 	 * us if the interrupt is waiting for an EOI.
 	 *
 	 * RTC is special: it is edge-triggered, but userspace likes to know
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index ea402e741bd5..88c3c0c6d1e3 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -964,7 +964,7 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src,
 }
 
 /*
- * This routine tries to handler interrupts in posted mode, here is how
+ * This routine tries to handle interrupts in posted mode, here is how
  * it deals with different cases:
  * - For single-destination interrupts, handle it in posted mode
  * - Else if vector hashing is enabled and it is a lowest-priority
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 63df3586f062..f0501272268f 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -964,7 +964,7 @@ static struct kvm_memslots *install_new_memslots(struct kvm *kvm,
 
 	/*
 	 * Increment the new memslot generation a second time, dropping the
-	 * update in-progress flag and incrementing then generation based on
+	 * update in-progress flag and incrementing the generation based on
 	 * the number of address spaces.  This provides a unique and easily
 	 * identifiable generation number while the memslots are in flux.
 	 */
-- 
2.19.1


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

* [PATCH 5/6] KVM: hyperv: Fix some typos in vcpu unimpl info
  2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
                   ` (3 preceding siblings ...)
  2019-12-11  6:26 ` [PATCH 4/6] KVM: Fix some grammar mistakes linmiaohe
@ 2019-12-11  6:26 ` linmiaohe
  2019-12-11  6:26 ` [PATCH 6/6] KVM: Fix some writing mistakes linmiaohe
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: linmiaohe @ 2019-12-11  6:26 UTC (permalink / raw)
  To: pbonzini, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
	jmattson, joro, tglx, mingo, bp, hpa
  Cc: linmiaohe, kvm, linux-kernel, x86

From: Miaohe Lin <linmiaohe@huawei.com>

Fix some typos in vcpu unimpl info. It should be unhandled rather than
uhandled.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 arch/x86/kvm/hyperv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index a48d5708f1f8..b255b9e865e5 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -1059,7 +1059,7 @@ static int kvm_hv_set_msr_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data,
 			return 1;
 		break;
 	default:
-		vcpu_unimpl(vcpu, "Hyper-V uhandled wrmsr: 0x%x data 0x%llx\n",
+		vcpu_unimpl(vcpu, "Hyper-V unhandled wrmsr: 0x%x data 0x%llx\n",
 			    msr, data);
 		return 1;
 	}
@@ -1179,7 +1179,7 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
 			return 1;
 		break;
 	default:
-		vcpu_unimpl(vcpu, "Hyper-V uhandled wrmsr: 0x%x data 0x%llx\n",
+		vcpu_unimpl(vcpu, "Hyper-V unhandled wrmsr: 0x%x data 0x%llx\n",
 			    msr, data);
 		return 1;
 	}
-- 
2.19.1


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

* [PATCH 6/6] KVM: Fix some writing mistakes
  2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
                   ` (4 preceding siblings ...)
  2019-12-11  6:26 ` [PATCH 5/6] KVM: hyperv: Fix some typos in vcpu unimpl info linmiaohe
@ 2019-12-11  6:26 ` linmiaohe
  2019-12-11 15:51   ` Sean Christopherson
  2019-12-11 16:01 ` [PATCH 0/6] Fix various comment errors Sean Christopherson
  2020-01-15 17:56 ` Paolo Bonzini
  7 siblings, 1 reply; 13+ messages in thread
From: linmiaohe @ 2019-12-11  6:26 UTC (permalink / raw)
  To: pbonzini, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
	jmattson, joro, tglx, mingo, bp, hpa
  Cc: linmiaohe, kvm, linux-kernel, x86

From: Miaohe Lin <linmiaohe@huawei.com>

Fix some writing mistakes in the comments.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 arch/x86/include/asm/kvm_host.h | 2 +-
 arch/x86/kvm/vmx/vmx.c          | 2 +-
 virt/kvm/kvm_main.c             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 159a28512e4c..efba864ed42d 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -606,7 +606,7 @@ struct kvm_vcpu_arch {
 	 * Paging state of an L2 guest (used for nested npt)
 	 *
 	 * This context will save all necessary information to walk page tables
-	 * of the an L2 guest. This context is only initialized for page table
+	 * of the L2 guest. This context is only initialized for page table
 	 * walking and not for faulting since we never handle l2 page faults on
 	 * the host.
 	 */
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 1be3854f1090..dae712c8785e 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -1922,7 +1922,7 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 }
 
 /*
- * Writes msr value into into the appropriate "register".
+ * Writes msr value into the appropriate "register".
  * Returns 0 on success, non-0 otherwise.
  * Assumes vcpu_load() was already called.
  */
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f0501272268f..1a6d5ebd5c42 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1519,7 +1519,7 @@ static inline int check_user_page_hwpoison(unsigned long addr)
 /*
  * The fast path to get the writable pfn which will be stored in @pfn,
  * true indicates success, otherwise false is returned.  It's also the
- * only part that runs if we can are in atomic context.
+ * only part that runs if we can in atomic context.
  */
 static bool hva_to_pfn_fast(unsigned long addr, bool write_fault,
 			    bool *writable, kvm_pfn_t *pfn)
-- 
2.19.1


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

* Re: [PATCH 3/6] KVM: Fix some comment typos and missing parentheses
  2019-12-11  6:26 ` [PATCH 3/6] KVM: Fix some comment typos and missing parentheses linmiaohe
@ 2019-12-11 15:46   ` Sean Christopherson
  0 siblings, 0 replies; 13+ messages in thread
From: Sean Christopherson @ 2019-12-11 15:46 UTC (permalink / raw)
  To: linmiaohe
  Cc: pbonzini, rkrcmar, vkuznets, wanpengli, jmattson, joro, tglx,
	mingo, bp, hpa, kvm, linux-kernel, x86

On Wed, Dec 11, 2019 at 02:26:22PM +0800, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@huawei.com>
> 
> Fix some typos and add missing parentheses in the comments.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  arch/x86/kvm/hyperv.c     | 2 +-
>  arch/x86/kvm/lapic.c      | 2 +-
>  arch/x86/kvm/vmx/nested.c | 2 +-
>  arch/x86/kvm/vmx/vmx.c    | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
> index c7d4640b7b1c..a48d5708f1f8 100644
> --- a/arch/x86/kvm/hyperv.c
> +++ b/arch/x86/kvm/hyperv.c
> @@ -1122,7 +1122,7 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
>  			return 1;
>  
>  		/*
> -		 * Clear apic_assist portion of f(struct hv_vp_assist_page
> +		 * Clear apic_assist portion of struct hv_vp_assist_page
>  		 * only, there can be valuable data in the rest which needs
>  		 * to be preserved e.g. on migration.
>  		 */
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 679692b55f6d..ea402e741bd5 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -969,7 +969,7 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src,
>   * - For single-destination interrupts, handle it in posted mode
>   * - Else if vector hashing is enabled and it is a lowest-priority
>   *   interrupt, handle it in posted mode and use the following mechanism
> - *   to find the destinaiton vCPU.
> + *   to find the destination vCPU.
>   *	1. For lowest-priority interrupts, store all the possible
>   *	   destination vCPUs in an array.
>   *	2. Use "guest vector % max number of destination vCPUs" to find
> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> index 7b01ef1d87e6..63ab49de324d 100644
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -3427,7 +3427,7 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
>  
>  /*
>   * On a nested exit from L2 to L1, vmcs12.guest_cr0 might not be up-to-date
> - * because L2 may have changed some cr0 bits directly (CRO_GUEST_HOST_MASK).
> + * because L2 may have changed some cr0 bits directly (CR0_GUEST_HOST_MASK).

Holy cow this one is hard to see :-)

>   * This function returns the new value we should put in vmcs12.guest_cr0.
>   * It's not enough to just return the vmcs02 GUEST_CR0. Rather,
>   *  1. Bits that neither L0 nor L1 trapped, were set directly by L2 and are now
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index bf24fbb2056c..1be3854f1090 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -6720,7 +6720,7 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
>  	 * If PML is turned on, failure on enabling PML just results in failure
>  	 * of creating the vcpu, therefore we can simplify PML logic (by
>  	 * avoiding dealing with cases, such as enabling PML partially on vcpus
> -	 * for the guest, etc.
> +	 * for the guest), etc.
>  	 */
>  	if (enable_pml) {
>  		vmx->pml_pg = alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO);
> -- 
> 2.19.1
> 

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

* Re: [PATCH 6/6] KVM: Fix some writing mistakes
  2019-12-11  6:26 ` [PATCH 6/6] KVM: Fix some writing mistakes linmiaohe
@ 2019-12-11 15:51   ` Sean Christopherson
  0 siblings, 0 replies; 13+ messages in thread
From: Sean Christopherson @ 2019-12-11 15:51 UTC (permalink / raw)
  To: linmiaohe
  Cc: pbonzini, rkrcmar, vkuznets, wanpengli, jmattson, joro, tglx,
	mingo, bp, hpa, kvm, linux-kernel, x86

On Wed, Dec 11, 2019 at 02:26:25PM +0800, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@huawei.com>
> 
> Fix some writing mistakes in the comments.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  arch/x86/include/asm/kvm_host.h | 2 +-
>  arch/x86/kvm/vmx/vmx.c          | 2 +-
>  virt/kvm/kvm_main.c             | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 159a28512e4c..efba864ed42d 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -606,7 +606,7 @@ struct kvm_vcpu_arch {
>  	 * Paging state of an L2 guest (used for nested npt)
>  	 *
>  	 * This context will save all necessary information to walk page tables
> -	 * of the an L2 guest. This context is only initialized for page table
> +	 * of the L2 guest. This context is only initialized for page table

I'd whack "the" instead of "and", i.e. ...walk page tables of an L2 guest,
as KVM isn't limited to just one L2 guest.

>  	 * walking and not for faulting since we never handle l2 page faults on

While you're here, want to change "l2" to "L2"?

>  	 * the host.
>  	 */
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 1be3854f1090..dae712c8785e 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -1922,7 +1922,7 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
>  }
>  
>  /*
> - * Writes msr value into into the appropriate "register".
> + * Writes msr value into the appropriate "register".
>   * Returns 0 on success, non-0 otherwise.
>   * Assumes vcpu_load() was already called.
>   */
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index f0501272268f..1a6d5ebd5c42 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -1519,7 +1519,7 @@ static inline int check_user_page_hwpoison(unsigned long addr)
>  /*
>   * The fast path to get the writable pfn which will be stored in @pfn,
>   * true indicates success, otherwise false is returned.  It's also the
> - * only part that runs if we can are in atomic context.
> + * only part that runs if we can in atomic context.

This should remove "can" instead of "are", i.e. ...part that runs if we are
in atomic context.  The comment is calling out that hva_to_pfn() will return
immediately if hva_to_pfn_fast() and the kernel is atomic context.

>   */
>  static bool hva_to_pfn_fast(unsigned long addr, bool write_fault,
>  			    bool *writable, kvm_pfn_t *pfn)
> -- 
> 2.19.1
> 

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

* Re: [PATCH 0/6] Fix various comment errors
  2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
                   ` (5 preceding siblings ...)
  2019-12-11  6:26 ` [PATCH 6/6] KVM: Fix some writing mistakes linmiaohe
@ 2019-12-11 16:01 ` Sean Christopherson
  2020-01-15 17:56 ` Paolo Bonzini
  7 siblings, 0 replies; 13+ messages in thread
From: Sean Christopherson @ 2019-12-11 16:01 UTC (permalink / raw)
  To: linmiaohe
  Cc: pbonzini, rkrcmar, vkuznets, wanpengli, jmattson, joro, tglx,
	mingo, bp, hpa, kvm, linux-kernel, x86

On Wed, Dec 11, 2019 at 02:26:19PM +0800, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@huawei.com>
> 
> Fix various comment mistakes, such as typo, grammar mistake, out-dated
> function name, writing error and so on. It is a bit tedious and many
> thanks for review in advance.
> 
> Miaohe Lin (6):
>   KVM: Fix some wrong function names in comment
>   KVM: Fix some out-dated function names in comment
>   KVM: Fix some comment typos and missing parentheses
>   KVM: Fix some grammar mistakes
>   KVM: hyperv: Fix some typos in vcpu unimpl info
>   KVM: Fix some writing mistakes

Regarding the patch organizing, I'd probably group the comment changes
based on what files they touch as opposed to what type of comment issue
they're fixing.

E.g. three patches for the comments

   KVM: VMX: Fix comment blah blah blah
   KVM: x86: Fix comment blah blah blah
   KVM: Fix comment blah blah blah

and one patch for the print typo in hyperv

   KVM: hyperv: Fix some typos in vcpu unimpl info

For KVM, the splits don't matter _that_ much since they more or less all
get routed through the maintainers/reviewers, but it is nice when patches
can be contained to specific subsystems/areas as it allows people to easily
skip over patches that aren't relevant to them.

>  arch/x86/include/asm/kvm_host.h       | 2 +-
>  arch/x86/kvm/hyperv.c                 | 6 +++---
>  arch/x86/kvm/ioapic.c                 | 2 +-
>  arch/x86/kvm/lapic.c                  | 4 ++--
>  arch/x86/kvm/vmx/nested.c             | 2 +-
>  arch/x86/kvm/vmx/vmcs_shadow_fields.h | 4 ++--
>  arch/x86/kvm/vmx/vmx.c                | 8 ++++----
>  virt/kvm/kvm_main.c                   | 6 +++---
>  8 files changed, 17 insertions(+), 17 deletions(-)
> 
> -- 
> 2.19.1
> 

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

* Re: [PATCH 0/6] Fix various comment errors
  2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
                   ` (6 preceding siblings ...)
  2019-12-11 16:01 ` [PATCH 0/6] Fix various comment errors Sean Christopherson
@ 2020-01-15 17:56 ` Paolo Bonzini
  7 siblings, 0 replies; 13+ messages in thread
From: Paolo Bonzini @ 2020-01-15 17:56 UTC (permalink / raw)
  To: linmiaohe, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
	jmattson, joro, tglx, mingo, bp, hpa
  Cc: kvm, linux-kernel, x86

On 11/12/19 07:26, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@huawei.com>
> 
> Fix various comment mistakes, such as typo, grammar mistake, out-dated
> function name, writing error and so on. It is a bit tedious and many
> thanks for review in advance.
> 
> Miaohe Lin (6):
>   KVM: Fix some wrong function names in comment
>   KVM: Fix some out-dated function names in comment
>   KVM: Fix some comment typos and missing parentheses
>   KVM: Fix some grammar mistakes
>   KVM: hyperv: Fix some typos in vcpu unimpl info
>   KVM: Fix some writing mistakes
> 
>  arch/x86/include/asm/kvm_host.h       | 2 +-
>  arch/x86/kvm/hyperv.c                 | 6 +++---
>  arch/x86/kvm/ioapic.c                 | 2 +-
>  arch/x86/kvm/lapic.c                  | 4 ++--
>  arch/x86/kvm/vmx/nested.c             | 2 +-
>  arch/x86/kvm/vmx/vmcs_shadow_fields.h | 4 ++--
>  arch/x86/kvm/vmx/vmx.c                | 8 ++++----
>  virt/kvm/kvm_main.c                   | 6 +++---
>  8 files changed, 17 insertions(+), 17 deletions(-)
> 

Queued, thanks.

Paolo


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

* Re: [PATCH 0/6] Fix various comment errors
  2019-12-12  2:08 linmiaohe
@ 2019-12-12  2:59 ` Xiaoyao Li
  0 siblings, 0 replies; 13+ messages in thread
From: Xiaoyao Li @ 2019-12-12  2:59 UTC (permalink / raw)
  To: linmiaohe, Sean Christopherson
  Cc: pbonzini, rkrcmar, vkuznets, wanpengli, jmattson, joro, tglx,
	mingo, bp, hpa, kvm, linux-kernel, x86

Hi,

On 12/12/2019 10:08 AM, linmiaohe wrote:
> Sean Christopherson wrote:
>> On Wed, Dec 11, 2019 at 02:26:19PM +0800, linmiaohe wrote:
>>> From: Miaohe Lin <linmiaohe@huawei.com>
>>>
>>> Miaohe Lin (6):
>>>    KVM: Fix some wrong function names in comment
>>>    KVM: Fix some out-dated function names in comment
>>>    KVM: Fix some comment typos and missing parentheses
>>>    KVM: Fix some grammar mistakes
>>>    KVM: hyperv: Fix some typos in vcpu unimpl info
>>>    KVM: Fix some writing mistakes
>>
>> Regarding the patch organizing, I'd probably group the comment changes based on what files they touch as opposed to what type of comment issue they're fixing.
>>
>> E.g. three patches for the comments
>>
>>    KVM: VMX: Fix comment blah blah blah
>>    KVM: x86: Fix comment blah blah blah
>>    KVM: Fix comment blah blah blah
>>
>> and one patch for the print typo in hyperv
>>
>>    KVM: hyperv: Fix some typos in vcpu unimpl info
>>
>> For KVM, the splits don't matter _that_ much since they more or less all get routed through the maintainers/reviewers, but it is nice when patches can be contained to specific subsystems/areas as it allows people to easily skip over patches that aren't relevant to them.
>>
> 
> Many thanks for your advice and patient explanation. I feel sorry for my poor patch organizing.
> I would reorganize my patches. Thanks again.
>   

Could you please use the "In-Reply-To" tag when you reply a mail next 
time? Otherwise every replying mail from you is listed as a separate 
one, but not folded into the initial thread in my mail client.



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

* Re: [PATCH 0/6] Fix various comment errors
@ 2019-12-12  2:08 linmiaohe
  2019-12-12  2:59 ` Xiaoyao Li
  0 siblings, 1 reply; 13+ messages in thread
From: linmiaohe @ 2019-12-12  2:08 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: pbonzini, rkrcmar, vkuznets, wanpengli, jmattson, joro, tglx,
	mingo, bp, hpa, kvm, linux-kernel, x86

Sean Christopherson wrote:
> On Wed, Dec 11, 2019 at 02:26:19PM +0800, linmiaohe wrote:
>> From: Miaohe Lin <linmiaohe@huawei.com>
>> 
>> Miaohe Lin (6):
>>   KVM: Fix some wrong function names in comment
>>   KVM: Fix some out-dated function names in comment
>>   KVM: Fix some comment typos and missing parentheses
>>   KVM: Fix some grammar mistakes
>>   KVM: hyperv: Fix some typos in vcpu unimpl info
>>   KVM: Fix some writing mistakes
>
>Regarding the patch organizing, I'd probably group the comment changes based on what files they touch as opposed to what type of comment issue they're fixing.
>
>E.g. three patches for the comments
>
>   KVM: VMX: Fix comment blah blah blah
>   KVM: x86: Fix comment blah blah blah
>   KVM: Fix comment blah blah blah
>
>and one patch for the print typo in hyperv
>
>   KVM: hyperv: Fix some typos in vcpu unimpl info
>
>For KVM, the splits don't matter _that_ much since they more or less all get routed through the maintainers/reviewers, but it is nice when patches can be contained to specific subsystems/areas as it allows people to easily skip over patches that aren't relevant to them.
>

Many thanks for your advice and patient explanation. I feel sorry for my poor patch organizing.
I would reorganize my patches. Thanks again.
 

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

end of thread, other threads:[~2020-01-15 17:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
2019-12-11  6:26 ` [PATCH 1/6] KVM: Fix some wrong function names in comment linmiaohe
2019-12-11  6:26 ` [PATCH 2/6] KVM: Fix some out-dated " linmiaohe
2019-12-11  6:26 ` [PATCH 3/6] KVM: Fix some comment typos and missing parentheses linmiaohe
2019-12-11 15:46   ` Sean Christopherson
2019-12-11  6:26 ` [PATCH 4/6] KVM: Fix some grammar mistakes linmiaohe
2019-12-11  6:26 ` [PATCH 5/6] KVM: hyperv: Fix some typos in vcpu unimpl info linmiaohe
2019-12-11  6:26 ` [PATCH 6/6] KVM: Fix some writing mistakes linmiaohe
2019-12-11 15:51   ` Sean Christopherson
2019-12-11 16:01 ` [PATCH 0/6] Fix various comment errors Sean Christopherson
2020-01-15 17:56 ` Paolo Bonzini
2019-12-12  2:08 linmiaohe
2019-12-12  2:59 ` Xiaoyao Li

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.