KVM: x86/mmu: Fix comment mentioning skip_4k
PATCH 1/1 KVM: x86/mmu: Fix comment mentioning skip_4k
This comment was left over from a previous version of the patch that introduced wrprot_gfn_range, when skip_4k was passed in instead of min_level.
--- arch/x86/kvm/mmu/tdp_mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kvm/mmu/tdp_mmu.c +3 -3
@@ -1192,9 +1192,9 @@ bool kvm_tdp_mmu_set_spte_gfn(struct kvm *kvm, struct kvm_gfn_range *range) }/* -* Remove write access from all the SPTEs mapping GFNs [start, end). If -* skip_4k is set, SPTEs that map 4k pages, will not be write-protected. -* Returns true if an SPTE has been changed and the TLBs need to be flushed. +* Remove write access from all SPTEs at or above min_level that map GFNs +* [start, end). Returns true if an SPTE has been changed and the TLBs need to +* be flushed. */ static bool wrprot_gfn_range (struct kvm *kvm,struct kvm_mmu_page *root,gfn_t start,gfn_t end,int min_level)
Signature · 1 line
2.32.0.rc0.204.g9fa02ecfa5-goog
Put version information in the subject, otherwise it's not always obvious which patch you want to be accepted, e.g.
[PATCH v2] KVM: x86/mmu: Fix comment mentioning skip_4k
Quoted 5 lines · David Matlack
This comment was left over from a previous version of the patch that introduced
wrprot_gfn_range, whenskip_4kwas passed in instead ofmin_level.Signed-off-by David Matlack <[email protected]>
Quoted 5 lines · Sean Christopherson
Put version information in the subject, otherwise it's not always obvious which patch you want to be accepted, e.g.
[PATCH v2] KVM: x86/mmu: Fix comment mentioning
skip_4k
Got it. My thinking was that I changed the title of the patch so should omit the v2, but that doesn't really make sense.
Quoted 9 lines · David Matlack
Quoted 5 lines
This comment was left over from a previous version of the patch that introduced
wrprot_gfn_range, whenskip_4kwas passed in instead ofmin_level.Signed-off-by David Matlack <[email protected]>Reviewed-by Sean Christopherson <[email protected]>
Sean Christopherson
maintainerQuoted 9 lines · David Matlack
Quoted 5 lines · Sean Christopherson
Put version information in the subject, otherwise it's not always obvious which patch you want to be accepted, e.g.
[PATCH v2] KVM: x86/mmu: Fix comment mentioning
skip_4kGot it. My thinking was that I changed the title of the patch so should omit the v2, but that doesn't really make sense.
Ha, yeah, the version should get bumped even if a patch/series gets heavily rewritten. There are exceptions (though I'm struggling to think of a good example), but even then it's helpful to describe the relationship to any previous series.
It's also customery to describe the changes between versions in the cover letter, or in the case of a one-off patch, in the part of the patch that git ignores.
And my own personal preference is to also include lore links to previous versions, e.g. in this case I would do something like:
v2: Reword comment to document min_level. [sean]
v1: https://lkml.kernel.org/r/[email protected]
Providing the explicit link in addition to the delta summaray makes it easy for reviewers to see the history and understand the context of _why_ changes were made. That's especially helpful for reviewers that didn't read/review earlier versions.
Quoted 23 lines · Sean Christopherson
Quoted 9 lines · David Matlack
Quoted 5 lines · Sean Christopherson
Put version information in the subject, otherwise it's not always obvious which patch you want to be accepted, e.g.
[PATCH v2] KVM: x86/mmu: Fix comment mentioning
skip_4kGot it. My thinking was that I changed the title of the patch so should omit the v2, but that doesn't really make sense.
Ha, yeah, the version should get bumped even if a patch/series gets heavily rewritten. There are exceptions (though I'm struggling to think of a good example), but even then it's helpful to describe the relationship to any previous series.
It's also customery to describe the changes between versions in the cover letter, or in the case of a one-off patch, in the part of the patch that git ignores.
And my own personal preference is to also include lore links to previous versions, e.g. in this case I would do something like:
Quoted 8 lines
v2: Reword comment to document
min_level. [sean]v1: https://lkml.kernel.org/r/[email protected]
Providing the explicit link in addition to the delta summaray makes it easy for reviewers to see the history and understand the context of _why_ changes were made. That's especially helpful for reviewers that didn't read/review earlier versions.
Great advice. Thanks Sean!
Quoted 17 lines · David Matlack
This comment was left over from a previous version of the patch that introduced
wrprot_gfn_range, whenskip_4kwas passed in instead ofmin_level.Signed-off-by David Matlack <[email protected]>--- arch/x86/kvm/mmu/tdp_mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/x86/kvm/mmu/tdp_mmu.c +0
-0@@ -1192,9 +1192,9 @@ bool kvm_tdp_mmu_set_spte_gfn(struct kvm *kvm, struct kvm_gfn_range *range) }
arch/x86/kvm/mmu/tdp_mmu.c bool kvm_tdp_mmu_set_spte_gfn(struct kvm *kvm, struct kvm_gfn_range *range) · line 1200
Quoted 10 lines
arch/x86/kvm/mmu/tdp_mmu.c +3
-3/* -* Remove write access from all the SPTEs mapping GFNs [start, end). If -* skip_4k is set, SPTEs that map 4k pages, will not be write-protected. -* Returns true if an SPTE has been changed and the TLBs need to be flushed. +* Remove write access from all SPTEs at or above min_level that map GFNs +* [start, end). Returns true if an SPTE has been changed and the TLBs need to +* be flushed. */ static bool wrprot_gfn_range (struct kvm *kvm,struct kvm_mmu_page *root,gfn_t start,gfn_t end,int min_level)
Queued, thanks.
Paolo