From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] qemu-kvm initialize vcpu state after machine initialization Date: Tue, 15 Dec 2009 14:31:16 +0200 Message-ID: <4B278194.7000209@redhat.com> References: <20091209174654.GA28056@amt.cnet> <4B20C058.5080307@redhat.com> <4B20C32B.7070005@redhat.com> <20091214203637.GA7120@amt.cnet> <20091215112037.GC8031@redhat.com> <20091215122415.GA9715@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Glauber de Oliveira Costa , kvm To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47499 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760142AbZLOMbS (ORCPT ); Tue, 15 Dec 2009 07:31:18 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBFCVHQK003525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 15 Dec 2009 07:31:17 -0500 In-Reply-To: <20091215122415.GA9715@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 12/15/2009 02:24 PM, Marcelo Tosatti wrote: >> >> This patch essentially revers commit 898c51c3. This commit fixes two >> races. First race is like this: >> >> vcpu0 vcpu1 >> >> starts running >> loads lapic state into kernel >> sends event to vcpu1 >> starts running >> loads lapic state into kernel >> overwrites event from vcpu0 >> >> At the time 898c51c3 was committed the race was easily reproducible >> by starting VM with 16 cpus + seabios. Sometimes some vcpus lost INIT/SIPI >> events. Now I am not able to reproduce it even with this patch applied, >> so something else changed, but it doesn't make the race non existent or >> acceptable. >> > Note qemu_kvm_load_lapic depends on env->created set (kvm_vcpu_inited), > so having init_vcpu+load_regs before signalling vcpu creation did not > fix this one (but yeah, thanks for the reminder on the races). > So safest to revert and wait for a fixed patch? -- error compiling committee.c: too many arguments to function