linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 6/6] KVM: Fix some writing mistakes
@ 2019-12-12  2:02 linmiaohe
  0 siblings, 0 replies; 3+ messages in thread
From: linmiaohe @ 2019-12-12  2:02 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: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>
>> ---
>>  	 * 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.

I'd change this.

>>  	 * walking and not for faulting since we never handle l2 page faults 
>> on
>
>While you're here, want to change "l2" to "L2"?

I do nothing here. :)

>>  	 * the host.
>>  	 */
>> 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.
>

Many thanks for your explanation, I would change this too. And many thanks for your review.

^ permalink raw reply	[flat|nested] 3+ 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; 3+ 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] 3+ messages in thread

* [PATCH 6/6] KVM: Fix some writing mistakes
  2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
@ 2019-12-11  6:26 ` linmiaohe
  2019-12-11 15:51   ` Sean Christopherson
  0 siblings, 1 reply; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2019-12-12  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12  2:02 [PATCH 6/6] KVM: Fix some writing mistakes linmiaohe
  -- strict thread matches above, loose matches on Subject: below --
2019-12-11  6:26 [PATCH 0/6] Fix various comment errors linmiaohe
2019-12-11  6:26 ` [PATCH 6/6] KVM: Fix some writing mistakes linmiaohe
2019-12-11 15:51   ` Sean Christopherson

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