From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: x86: Convert INIT and SIPI signals into synchronously handled events Date: Tue, 12 Mar 2013 14:43:38 +0100 Message-ID: <513F310A.40700@redhat.com> References: <513F1529.3040309@siemens.com> <20130312131211.GB11223@redhat.com> <513F2BCD.5040405@siemens.com> <20130312134145.GE11223@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , Marcelo Tosatti , kvm To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:26459 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753330Ab3CLNno (ORCPT ); Tue, 12 Mar 2013 09:43:44 -0400 In-Reply-To: <20130312134145.GE11223@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 12/03/2013 14:41, Gleb Natapov ha scritto: > Not sure I understand. I am saying the code should be: > > if (test_and_clear_bit(KVM_APIC_INIT, &apic->pending_events)) { > vcpu->arch.mp_state = KVM_MP_STATE_INIT_RECEIVED; > kvm_lapic_reset(vcpu); > kvm_vcpu_reset(vcpu); > } > if (test_and_clear_bit(KVM_APIC_SIPI, &apic->pending_events) && > vcpu->arch.mp_state == KVM_MP_STATE_INIT_RECEIVED) { > vcpu->arch.sipi_vector = apic->sipi_vector; > } > Yes, this is also discussed in the async_pf thread. But kvm_vcpu_reset is what sets CS based on the sipi_vector, so some more changes are needed (or you can just reset the VCPU twice, but that's ugly...). Paolo