]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Bail to userspace if emulation of atomic user access faults
authorSean Christopherson <seanjc@google.com>
Wed, 2 Feb 2022 00:49:45 +0000 (00:49 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Apr 2022 17:37:48 +0000 (13:37 -0400)
commit3d32329e86738d7286d6ee0d8304781c0f214196
treee261522c73654e70f39b57475c699d44855567b9
parent557b4e681631bc05b90d38be5f78dc4715ae2290
KVM: x86: Bail to userspace if emulation of atomic user access faults

Exit to userspace when emulating an atomic guest access if the CMPXCHG on
the userspace address faults.  Emulating the access as a write and thus
likely treating it as emulated MMIO is wrong, as KVM has already
confirmed there is a valid, writable memslot.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220202004945.2540433-6-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c