Re: [PATCH v2] KVM: SVM: Fix potential wrong physical id in avic_handle_ldr_update

2019-10-22 Thread Paolo Bonzini
On 18/10/19 04:50, Miaohe Lin wrote: > 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_ha

[PATCH v2] KVM: SVM: Fix potential wrong physical id in avic_handle_ldr_update

2019-10-17 Thread Miaohe Lin
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. Si