]> Git Repo - linux.git/commit
KVM: x86/mmu: Automatically update iter->old_spte if cmpxchg fails
authorDavid Matlack <[email protected]>
Wed, 19 Jan 2022 23:07:24 +0000 (23:07 +0000)
committerPaolo Bonzini <[email protected]>
Thu, 10 Feb 2022 18:50:37 +0000 (13:50 -0500)
commit3255530ab191cf75caa2cfc52fe984f5c4c44c74
tree6a70a594c8e26961c8e0aea0bc701b3f0aa3f145
parent1346bbb6b4189bc355417ef4d021011ac7e8d239
KVM: x86/mmu: Automatically update iter->old_spte if cmpxchg fails

Consolidate a bunch of code that was manually re-reading the spte if the
cmpxchg failed. There is no extra cost of doing this because we already
have the spte value as a result of the cmpxchg (and in fact this
eliminates re-reading the spte), and none of the call sites depend on
iter->old_spte retaining the stale spte value.

Reviewed-by: Ben Gardon <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Reviewed-by: Sean Christopherson <[email protected]>
Signed-off-by: David Matlack <[email protected]>
Message-Id: <20220119230739.2234394[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/kvm/mmu/tdp_mmu.c
This page took 0.055122 seconds and 4 git commands to generate.