From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: x86: Rework INIT and SIPI handling Date: Wed, 13 Mar 2013 12:36:58 +0100 Message-ID: <514064DA.1080009@siemens.com> References: <51403DEF.3090403@siemens.com> <20130313103139.GI11223@redhat.com> <51405FFD.2040102@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm , Paolo Bonzini To: Gleb Natapov Return-path: Received: from goliath.siemens.de ([192.35.17.28]:29521 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755461Ab3CMLhD (ORCPT ); Wed, 13 Mar 2013 07:37:03 -0400 In-Reply-To: <51405FFD.2040102@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2013-03-13 12:16, Jan Kiszka wrote: >>> @@ -5871,8 +5867,8 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) >>> srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx); >>> kvm_vcpu_block(vcpu); >>> vcpu->srcu_idx = srcu_read_lock(&kvm->srcu); >>> - if (kvm_check_request(KVM_REQ_UNHALT, vcpu)) >>> - { >>> + if (kvm_check_request(KVM_REQ_UNHALT, vcpu)) { >>> + kvm_apic_accept_events(vcpu); >> I think we can drop this. If INIT happens while vcpu is halted it will >> become runnable here and kvm_apic_accept_events() will be called in >> vcpu_enter_guest(). > > I'm not that sure, but I will recheck carefully. Doesn't work: If the state was INIT_RECEIVED, we will not process the SIPI but reenter kvm_vcpu_block. And it's more consistent to process the events here IMHO. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux