diff options
| author | David Matlack <[email protected]> | 2021-06-17 23:19:46 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2021-06-18 06:45:46 -0400 |
| commit | 0b873fd7fb53ed7343ee7ee166e1373aec02a9cb (patch) | |
| tree | 0a8a768eaa17782bf54852d0b95f91f16c654de6 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | aa23c0ad14228ccfcd0b6f799dd34b348a5f2b1e (diff) | |
KVM: x86/mmu: Remove redundant is_tdp_mmu_enabled check
This check is redundant because the root shadow page will only be a TDP
MMU page if is_tdp_mmu_enabled() returns true, and is_tdp_mmu_enabled()
never changes for the lifetime of a VM.
It's possible that this check was added for performance reasons but it
is unlikely that it is useful in practice since to_shadow_page() is
cheap. That being said, this patch also caches the return value of
is_tdp_mmu_root() in direct_page_fault() since there's no reason to
duplicate the call so many times, so performance is not a concern.
Suggested-by: Sean Christopherson <[email protected]>
Signed-off-by: David Matlack <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions