Re: [PATCH] KVM: arm/arm64: Simplify active_change_prepare and plug race

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 10, 2017 at 12:01:18PM +0200, Christoffer Dall wrote:
> We don't need to stop a specific VCPU when changing the active state,
> because private IRQs can only be modified by a running VCPU for the
> VCPU itself and it is therefore already stopped.
> 
> However, it is also possible for two VCPUs to be modifying the active
> state of SPIs at the same time, which can cause the thread being stuck
> in the loop that checks other VCPU threads for a potentially very long
> time, or to modify the active state of a running VCPU.  Fix this by
> serializing all accesses to setting and clearing the active state of
> interrupts using the KVM mutex.
> 
> Reported-by: Andrew Jones <drjones@xxxxxxxxxx>
> Signed-off-by: Christoffer Dall <cdall@xxxxxxxxxx>
> ---
>  arch/arm/include/asm/kvm_host.h   |  2 --
>  arch/arm64/include/asm/kvm_host.h |  2 --
>  virt/kvm/arm/arm.c                | 20 ++++----------------
>  virt/kvm/arm/vgic/vgic-mmio.c     | 18 ++++++++++--------
>  virt/kvm/arm/vgic/vgic.c          | 11 ++++++-----
>  5 files changed, 20 insertions(+), 33 deletions(-)
>
 
Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux