diff options
| author | Uros Bizjak <[email protected]> | 2022-05-18 15:51:11 +0200 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2022-06-15 08:11:14 -0400 |
| commit | aee98a6838d52d5cca14610d228893e9208f4ed1 (patch) | |
| tree | 79551e55c29d47e91ef351508b21ab314744ce1b /tools/perf/scripts/python | |
| parent | d895f28ed6da96d7b922bd79977e2b732b103a99 (diff) | |
KVM: x86/mmu: Use try_cmpxchg64 in tdp_mmu_set_spte_atomic
Use try_cmpxchg64 instead of cmpxchg64 (*ptr, old, new) != old in
tdp_mmu_set_spte_atomic. cmpxchg returns success in ZF flag, so this
change saves a compare after cmpxchg (and related move instruction
in front of cmpxchg). Also, remove explicit assignment to iter->old_spte
when cmpxchg fails, this is what try_cmpxchg does implicitly.
Cc: Paolo Bonzini <[email protected]>
Cc: Sean Christopherson <[email protected]>
Signed-off-by: Uros Bizjak <[email protected]>
Reviewed-by: David Matlack <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions