]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: x86: avoid write-tearing of TDP
authorNadav Amit <nadav.amit@gmail.com>
Wed, 11 May 2016 15:04:29 +0000 (08:04 -0700)
committerRadim Krčmář <rkrcmar@redhat.com>
Thu, 2 Jun 2016 15:38:50 +0000 (17:38 +0200)
commitb19ee2ff3b287fea48a2896a381e31319394fe58
treef1678e5632fa80ba384d77546a26fd2b6a963725
parent13e98fd1efc7f65cab1bba6cfab7859840f9aa66
KVM: x86: avoid write-tearing of TDP

In theory, nothing prevents the compiler from write-tearing PTEs, or
split PTE writes. These partially-modified PTEs can be fetched by other
cores and cause mayhem. I have not really encountered such case in
real-life, but it does seem possible.

For example, the compiler may try to do something creative for
kvm_set_pte_rmapp() and perform multiple writes to the PTE.

Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/mmu.c