+AD4- -----Original Message----- +AD4- From: Sean Christopherson +AFs-mailto:sean.j.christopherson+AEA-intel.com+AF0- +AD4- Sent: Saturday, September 26, 2020 12:44 AM +AD4- To: Li,Rongqing +ADw-lirongqing+AEA-baidu.com+AD4- +AD4- Cc: kvm+AEA-vger.kernel.org+ADs- x86+AEA-kernel.org +AD4- Subject: Re: +AFs-PATCH+AF0AWw-v2+AF0- KVM: x86/mmu: fix counting of rmap entries in +AD4- pte+AF8-list+AF8-add +AD4- +AD4- On Wed, Sep 23, 2020 at 12:58:58PM +-0800, Li RongQing wrote: +AD4- +AD4- counting of rmap entries was missed when desc-+AD4-sptes is full and +AD4- +AD4- desc-+AD4-more is NULL +AD4- +AD4- +AD4- +AD4- and merging two PTE+AF8-LIST+AF8-EXT-1 check as one, to avoids the extra +AD4- +AD4- comparison to give slightly optimization +AD4- +AD4- Please write complete sentences, and use proper capitalization and +AD4- punctuation. +AD4- It's not a big deal for short changelogs, but it's crucial for readability of larger +AD4- changelogs. +AD4- +AD4- E.g. +AD4- +AD4- Fix an off-by-one style bug in pte+AF8-list+AF8-add() where it failed to account +AD4- the last full set of SPTEs, i.e. when desc-+AD4-sptes is full and desc-+AD4-more +AD4- is NULL. +AD4- +AD4- Merge the two +ACI-PTE+AF8-LIST+AF8-EXT-1+ACI- checks as part of the fix to avoid an +AD4- extra comparison. +AD4- +AD4- +AD4- Suggested-by: Sean Christopherson +ADw-sean.j.christopherson+AEA-intel.com+AD4- +AD4- +AD4- No need to give me credit, I just nitpicked the code, identifying the bug and the +AD4- fix was all you. :-) +AD4- +AD4- Thanks for the fix+ACE- +AD4- +AD4- +AD4- Signed-off-by: Li RongQing +ADw-lirongqing+AEA-baidu.com+AD4- +AD4- +AD4- Paolo, +AD4- +AD4- Although it's a bug fix, I don't think this needs a Fixes / Cc:stable. The bug +AD4- only results in rmap recycling being delayed by one rmap. Stable kernels can +AD4- probably live with an off-by-one bug given that RMAP+AF8-RECYCLE+AF8-THRESHOLD is +AD4- completely arbitrary. :-) +AD4- +AD4- Reviewed-by: Sean Christopherson +ADw-sean.j.christopherson+AEA-intel.com+AD4- +AD4- Thank you very much , I will send V3 -Li