From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: nSVM/nVMX: Implement vmexit on INIT assertion Date: Wed, 27 Feb 2013 12:22:03 +0100 Message-ID: <512DEC5B.3070906@siemens.com> References: <512A1EF5.2070709@web.de> <20130227111727.GF26252@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , Gleb Natapov , "Nadav Har'El" , "Nakajima, Jun" , kvm To: Joerg Roedel Return-path: Received: from goliath.siemens.de ([192.35.17.28]:30898 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756450Ab3B0LWS (ORCPT ); Wed, 27 Feb 2013 06:22:18 -0500 In-Reply-To: <20130227111727.GF26252@8bytes.org> Sender: kvm-owner@vger.kernel.org List-ID: On 2013-02-27 12:17, Joerg Roedel wrote: > On Sun, Feb 24, 2013 at 03:08:53PM +0100, Jan Kiszka wrote: >> From: Jan Kiszka > >> @@ -2390,6 +2390,21 @@ static int nested_svm_vmexit(struct vcpu_svm *svm) >> return 0; >> } >> +static bool nested_svm_handle_init_received(struct kvm_vcpu *vcpu) >> +{ >> + struct vcpu_svm *svm = to_svm(vcpu); >> + >> + if (!is_guest_mode(vcpu) || >> + !(svm->nested.intercept & (1ULL << INTERCEPT_INIT))) >> + return false; >> + >> + svm->vmcb->control.exit_code = SVM_EXIT_INIT; >> + svm->vmcb->control.exit_int_info = 0; >> + nested_svm_vmexit(svm); >> + >> + return true; >> +} > > [...] > >> + if (vcpu->arch.mp_state == KVM_MP_STATE_INIT_RECEIVED && >> + kvm_x86_ops->handle_init_received(vcpu)) { >> + /* nested vmexit, L1 is runnable now */ >> + vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; >> + return 1; >> + } > > Hmm, looks like the INIT signal is lost after the VMEXIT. But on SVM the > INIT signal is still pending an will be delivered when GIF becomes one > again. Do I miss anything? No, this is unsolved yet, see the other mail. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux