diff options
| author | Sean Christopherson <[email protected]> | 2022-07-12 02:07:22 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2022-07-14 11:31:23 -0400 |
| commit | 79e48cec6cba4eee0bd3a13f31320e33a1729931 (patch) | |
| tree | 6fbaf53d21b12bde36b5a011c3403c0a181e47b2 /tools/perf/scripts/python/event_analyzing_sample.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 <[email protected]>
Reviewed-by: David Matlack <[email protected]>
Signed-off-by: Sean Christopherson <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions