diff options
author | Sean Christopherson <seanjc@google.com> | 2022-07-12 02:07:22 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-07-14 11:31:23 -0400 |
commit | 79e48cec6cba4eee0bd3a13f31320e33a1729931 (patch) | |
tree | 6fbaf53d21b12bde36b5a011c3403c0a181e47b2 /scripts/gdb/linux/lists.py | |
parent | b184b35d06b2a3de65ff2ef4303f83535572266c (diff) |
KVM: x86/mmu: Add optimized helper to retrieve an SPTE's index
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>
Reviewed-by: David Matlack <dmatlack@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220712020724.1262121-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/gdb/linux/lists.py')
0 files changed, 0 insertions, 0 deletions