diff options
author | Lai Jiangshan <laijs@linux.alibaba.com> | 2021-10-19 19:01:53 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-22 05:43:21 -0400 |
commit | 264d3dc1d3dca13b7eaf0c4fa7a4b2c91a5e056a (patch) | |
tree | 9287dedd4681a9118d5d4f4c4326845e1e4e76eb /arch/mips/ar7 | |
parent | 509bfe3d979672cd69c318d520420cf95b474fd9 (diff) |
KVM: X86: pair smp_wmb() of mmu_try_to_unsync_pages() with smp_rmb()
The commit 578e1c4db2213 ("kvm: x86: Avoid taking MMU lock
in kvm_mmu_sync_roots if no sync is needed") added smp_wmb() in
mmu_try_to_unsync_pages(), but the corresponding smp_load_acquire() isn't
used on the load of SPTE.W. smp_load_acquire() orders _subsequent_
loads after sp->is_unsync; it does not order _earlier_ loads before
the load of sp->is_unsync.
This has no functional change; smp_rmb() is a NOP on x86, and no
compiler barrier is required because there is a VMEXIT between the
load of SPTE.W and kvm_mmu_snc_roots.
Cc: Junaid Shahid <junaids@google.com>
Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Message-Id: <20211019110154.4091-4-jiangshanlai@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips/ar7')
0 files changed, 0 insertions, 0 deletions