]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Fix potential wrong physical id in avic_handle_ldr_update
authorMiaohe Lin <linmiaohe@huawei.com>
Fri, 18 Oct 2019 02:50:31 +0000 (10:50 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Oct 2019 16:47:50 +0000 (18:47 +0200)
commit62be84c0d425ed44b623db5b126b0a2dbc61e5be
tree293779223b4f869c256b8548a7ea3cc9e1b18348
parent0458ecd09054a588547586527a35e97225473230
KVM: SVM: Fix potential wrong physical id in avic_handle_ldr_update

Guest physical APIC ID may not equal to vcpu->vcpu_id in some case.
We may set the wrong physical id in avic_handle_ldr_update as we
always use vcpu->vcpu_id. Get physical APIC ID from vAPIC page
instead.
Export and use kvm_xapic_id here and in avic_handle_apic_id_update
as suggested by Vitaly.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h
arch/x86/kvm/svm.c