[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cc8b429e-74dd-70f1-8f1c-8893a5485e76@redhat.com>
Date: Mon, 22 Jun 2020 16:37:06 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Igor Mammedov <imammedo@...hat.com>
Cc: Wanpeng Li <kernellwp@...il.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org,
Sean Christopherson <sean.j.christopherson@...el.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>
Subject: Re: [PATCH v3] KVM: LAPIC: Recalculate apic map in batch
On 22/06/20 00:26, Igor Mammedov wrote:
>
> following sequence looks like a race that can cause lost map update events:
>
> cpu1 cpu2
>
> apic_map_dirty = true
> ------------------------------------------------------------
> kvm_recalculate_apic_map:
> pass check
> mutex_lock(&kvm->arch.apic_map_lock);
> if (!kvm->arch.apic_map_dirty)
> and in process of updating map
> -------------------------------------------------------------
> other calls to
> apic_map_dirty = true might be too late for affected cpu
> -------------------------------------------------------------
> apic_map_dirty = false
> -------------------------------------------------------------
> kvm_recalculate_apic_map:
> bail out on
> if (!kvm->arch.apic_map_dirty)
I will post a fix for that. Thanks for the analysis!
Paolo
Powered by blists - more mailing lists