]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: Don't inhibit APICv/AVIC on xAPIC ID "change" if APIC is disabled
authorSean Christopherson <seanjc@google.com>
Fri, 6 Jan 2023 01:12:38 +0000 (01:12 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:11 +0000 (09:34 +0100)
commitb9e4281361290be50b0caea2951af1c68815ec06
tree118da01f6b8acb281f82e13232cb1a8877a34fc3
parent084a6deb86ab88468a901a53c148a8ed026b2857
KVM: x86: Don't inhibit APICv/AVIC on xAPIC ID "change" if APIC is disabled

commit a58a66afc464d6d2ec294cd3102f36f3652e7ce4 upstream.

Don't inhibit APICv/AVIC due to an xAPIC ID mismatch if the APIC is
hardware disabled.  The ID cannot be consumed while the APIC is disabled,
and the ID is guaranteed to be set back to the vcpu_id when the APIC is
hardware enabled (architectural behavior correctly emulated by KVM).

Fixes: 3743c2f02517 ("KVM: x86: inhibit APICv/AVIC on changes to APIC ID or APIC base")
Cc: stable@vger.kernel.org
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230106011306.85230-6-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/lapic.c