From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v2] KVM: x86: Convert INIT and SIPI signals into synchronously handled requests Date: Wed, 06 Mar 2013 23:43:30 +0100 Message-ID: <5137C692.9090609@redhat.com> References: <20130306000658.GA9720@amt.cnet> <70318159.3047162.1362550372481.JavaMail.root@redhat.com> <20130306211942.GA23299@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm , Jan Kiszka To: Marcelo Tosatti Return-path: Received: from mail-ee0-f47.google.com ([74.125.83.47]:63726 "EHLO mail-ee0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700Ab3CFWnf (ORCPT ); Wed, 6 Mar 2013 17:43:35 -0500 Received: by mail-ee0-f47.google.com with SMTP id e52so6064312eek.6 for ; Wed, 06 Mar 2013 14:43:34 -0800 (PST) In-Reply-To: <20130306211942.GA23299@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Il 06/03/2013 22:19, Marcelo Tosatti ha scritto: > Vcpu should only invoke kvm_emulate_halt if it has been through a > KVM_MP_STATE_UNINITIALIZED -> KVM_MP_STATE_INIT_RECEIVED -> > KVM_MP_STATE_SIPI_RECEIVED -> KVM_MP_STATE_RUNNABLE transition. > > If it has been through that, how can a KVM_MP_STATE_INIT_RECEIVED be > overwritten? > > That is, KVM_MP_STATE_RUNNABLE (precondition for kvm_emulate_halt) is > only reachable if KVM_MP_STATE_INIT_RECEIVED/KVM_MP_STATE_SIPI_RECEIVED > have not been overwritten. You can always go back to the KVM_MP_STATE_INIT_RECEIVED state; either by an APIC write or by various soft resets (port 92h, keyboard controller, port cf9h) that aren't emulated correctly right now. Paolo > The point i'm trying to make is it appears the symptom is being fixed > with the proposed patch, not the root cause (which, if the reasoning > above is correct, is somewhere in nVMX code).