Re: [PATCH] svm: Add mutex_lock to protect apic_access_page_done on AMD systems

2018-11-25 Thread Paolo Bonzini
On 12/11/18 14:37, j...@8bytes.org wrote: > On Mon, Nov 12, 2018 at 12:23:14PM +, Suthikulpanit, Suravee wrote: >> From: Wei Wang >> >> 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

Re: [PATCH] svm: Add mutex_lock to protect apic_access_page_done on AMD systems

2018-11-12 Thread j...@8bytes.org
On Mon, Nov 12, 2018 at 12:23:14PM +, Suthikulpanit, Suravee wrote: > From: Wei Wang > > 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 t

[PATCH] svm: Add mutex_lock to protect apic_access_page_done on AMD systems

2018-11-12 Thread Suthikulpanit, Suravee
From: Wei Wang 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 purpo