Re: [Qemu-devel] [BUG/RFC] INIT IPI lost when VM starts

2017-11-23 Thread rkrc...@redhat.com
2017-11-20 06:57+, Gonglei (Arei): > Hi Paolo, > > What's your opinion about this patch? We found it just before finishing > patches > for the past two days. I think your case was fixed by f4ef19108608 ("KVM: X86: Fix loss of pending INIT due to race"), but that patch didn't fix it

Re: [Qemu-devel] [BUG/RFC] INIT IPI lost when VM starts

2017-11-19 Thread Gonglei (Arei)
Hi Paolo, What's your opinion about this patch? We found it just before finishing patches for the past two days. Thanks, -Gonglei > -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > Behalf Of Herongguang (Stephen) > Sent: Thursday, April 06,

Re: [Qemu-devel] [BUG/RFC] INIT IPI lost when VM starts

2017-04-05 Thread Herongguang (Stephen)
On 2017/4/6 0:16, Paolo Bonzini wrote: On 20/03/2017 15:21, Herongguang (Stephen) wrote: We encountered a problem that when a domain starts, seabios failed to online a vCPU. After investigation, we found that the reason is in kvm-kmod, KVM_APIC_INIT bit in vcpu->arch.apic->pending_events

Re: [Qemu-devel] [BUG/RFC] INIT IPI lost when VM starts

2017-04-05 Thread Paolo Bonzini
On 20/03/2017 15:21, Herongguang (Stephen) wrote: > > We encountered a problem that when a domain starts, seabios failed to > online a vCPU. > > After investigation, we found that the reason is in kvm-kmod, > KVM_APIC_INIT bit in > vcpu->arch.apic->pending_events was overwritten by qemu, and

Re: [Qemu-devel] [BUG/RFC] INIT IPI lost when VM starts

2017-03-20 Thread Herongguang (Stephen)
Let me clarify it more clearly. Time sequence is that qemu handles ‘query-cpus’ qmp command, vcpu 1 (and vcpu 0) got registers from kvm-kmod (qmp_query_cpus-> cpu_synchronize_state-> kvm_cpu_synchronize_state-> > do_kvm_cpu_synchronize_state-> kvm_arch_get_registers), then vcpu 0 (BSP) sends

[Qemu-devel] [BUG/RFC] INIT IPI lost when VM starts

2017-03-20 Thread Herongguang (Stephen)
Hi, We encountered a problem that when a domain starts, seabios failed to online a vCPU. After investigation, we found that the reason is in kvm-kmod, KVM_APIC_INIT bit in vcpu->arch.apic->pending_events was overwritten by qemu, and thus an INIT IPI sent to AP was lost. Qemu does this since