diff mbox series

[1/1] KVM: x86: remove incorrect comment on active_mmu_pages

Message ID 20210223203707.1135-1-dongli.zhang@oracle.com (mailing list archive)
State New, archived
Headers show
Series [1/1] KVM: x86: remove incorrect comment on active_mmu_pages | expand

Commit Message

Dongli Zhang Feb. 23, 2021, 8:37 p.m. UTC
The 'mmu_page_hash' is used as hash table while 'active_mmu_pages' is a
list. This patch removes the incorrect comment on active_mmu_pages.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
 arch/x86/include/asm/kvm_host.h | 3 ---
 1 file changed, 3 deletions(-)

Comments

Sean Christopherson Feb. 26, 2021, 12:44 a.m. UTC | #1
On Tue, Feb 23, 2021, Dongli Zhang wrote:
> The 'mmu_page_hash' is used as hash table while 'active_mmu_pages' is a
> list. This patch removes the incorrect comment on active_mmu_pages.

Maybe change the last sentence to "Remove the misplaced comment, it's mostly
stating the obvious anyways."  It's more misplaced than flat out incorrect, e.g.
the alternative would be to hoist the comment above mmu_page_hash.  I like
removing it though, IMO mmu_page_hash is the most obvious name out of the
various structures that track shadow pages.

With that tweak:

Reviewed-by: Sean Christopherson <seanjc@google.com>


> Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
> ---
>  arch/x86/include/asm/kvm_host.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 84499aad01a4..318242512407 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -937,9 +937,6 @@ struct kvm_arch {
>  	unsigned int indirect_shadow_pages;
>  	u8 mmu_valid_gen;
>  	struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES];
> -	/*
> -	 * Hash table of struct kvm_mmu_page.
> -	 */
>  	struct list_head active_mmu_pages;
>  	struct list_head zapped_obsolete_pages;
>  	struct list_head lpage_disallowed_mmu_pages;
> -- 
> 2.17.1
>
Dongli Zhang Feb. 26, 2021, 5:39 a.m. UTC | #2
On 2/25/21 4:44 PM, Sean Christopherson wrote:
> On Tue, Feb 23, 2021, Dongli Zhang wrote:
>> The 'mmu_page_hash' is used as hash table while 'active_mmu_pages' is a
>> list. This patch removes the incorrect comment on active_mmu_pages.
> 
> Maybe change the last sentence to "Remove the misplaced comment, it's mostly
> stating the obvious anyways."  It's more misplaced than flat out incorrect, e.g.
> the alternative would be to hoist the comment above mmu_page_hash.  I like
> removing it though, IMO mmu_page_hash is the most obvious name out of the
> various structures that track shadow pages.

Thank you very much!

I will change the last sentence and send v2 with your Reviewed-by.

Dongli Zhang

> 
> With that tweak:
> 
> Reviewed-by: Sean Christopherson <seanjc@google.com>
> 
> 
>> Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
>> ---
>>  arch/x86/include/asm/kvm_host.h | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
>> index 84499aad01a4..318242512407 100644
>> --- a/arch/x86/include/asm/kvm_host.h
>> +++ b/arch/x86/include/asm/kvm_host.h
>> @@ -937,9 +937,6 @@ struct kvm_arch {
>>  	unsigned int indirect_shadow_pages;
>>  	u8 mmu_valid_gen;
>>  	struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES];
>> -	/*
>> -	 * Hash table of struct kvm_mmu_page.
>> -	 */
>>  	struct list_head active_mmu_pages;
>>  	struct list_head zapped_obsolete_pages;
>>  	struct list_head lpage_disallowed_mmu_pages;
>> -- 
>> 2.17.1
>>
diff mbox series

Patch

diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 84499aad01a4..318242512407 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -937,9 +937,6 @@  struct kvm_arch {
 	unsigned int indirect_shadow_pages;
 	u8 mmu_valid_gen;
 	struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES];
-	/*
-	 * Hash table of struct kvm_mmu_page.
-	 */
 	struct list_head active_mmu_pages;
 	struct list_head zapped_obsolete_pages;
 	struct list_head lpage_disallowed_mmu_pages;