Messages in this thread | | | Date | Fri, 24 Jun 2022 23:41:34 +0000 | From | David Matlack <> | Subject | Re: [PATCH v2 1/4] KVM: x86/mmu: Add optimized helper to retrieve an SPTE's index |
| |
On Fri, Jun 24, 2022 at 09:30:36PM +0000, Sean Christopherson wrote: > Add spte_index() to dedup all the code that calculates a SPTE's index > into its parent's page table and/or spt array. Opportunistically tweak > the calculation to avoid pointer arithmetic, which is subtle (subtract in > 8-byte chunks) and less performant (requires the compiler to generate the > subtraction). > > Suggested-by: David Matlack <dmatlack@google.com> > Signed-off-by: Sean Christopherson <seanjc@google.com>
Thanks for the cleanup. I did a git-grep to look for any other users to convert to spte_index() and didn't find any.
Reviewed-by: David Matlack <dmatlack@google.com>
| |