diff options
author | Wei Wang <wawei@amazon.de> | 2018-11-12 15:23:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-08 15:03:38 +0300 |
commit | b002e9dc214f0f917ce1b4df753c1da0b8a9ac84 (patch) | |
tree | bf787c64f98340b11d5eaafc8871ba83d1ab6e6a /tools | |
parent | e8693a9829d1135ff6da551023de0c707394733c (diff) | |
download | linux-b002e9dc214f0f917ce1b4df753c1da0b8a9ac84.tar.xz |
svm: Add mutex_lock to protect apic_access_page_done on AMD systems
commit 30510387a5e45bfcf8190e03ec7aa15b295828e2 upstream.
There is a race condition when accessing kvm->arch.apic_access_page_done.
Due to it, x86_set_memory_region will fail when creating the second vcpu
for a svm guest.
Add a mutex_lock to serialize the accesses to apic_access_page_done.
This lock is also used by vmx for the same purpose.
Signed-off-by: Wei Wang <wawei@amazon.de>
Signed-off-by: Amadeusz Juskowiak <ajusk@amazon.de>
Signed-off-by: Julian Stecklina <jsteckli@amazon.de>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Joerg Roedel <jroedel@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions