From: Paolo Bonzini Subject: Re: Fixing nested SVM event injection Date: Mon, 23 May 2016 13:22:44 +0200 Message-ID: <7c2284f1-bd46-1cf8-ea7d-20dbde95f567@redhat.com> References: <5742B382.2050006@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: kvm To: Jan Kiszka , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Bandan Das , Joerg Roedel Return-path: Received: from mail-wm0-f49.google.com ([74.125.82.49]:37365 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754479AbcEWLXC (ORCPT ); Mon, 23 May 2016 07:23:02 -0400 Received: by mail-wm0-f49.google.com with SMTP id z87so44103368wmh.0 for ; Mon, 23 May 2016 04:23:01 -0700 (PDT) In-Reply-To: <5742B382.2050006@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 23/05/2016 09:38, Jan Kiszka wrote: > But now I'm loosing interrupts for L2 (keep in mind: under Jailhouse, L1 > takes no interrupts, only NMIs, L2 will get them all). The pattern is > that an interrupt is received and accepted over L1, but I'm not seeing > it being injected into L2 after vmrun. What should ensure the injection > when switching to guest mode? > > Right now, I'm not even finding this for VMX anymore, but I know it's > working reliably there. Is the interrupt window on VMX opened over L1 > and simply kept during guest transition? Is this check_nested_events? After vmlaunch/vmresume, check_nested_events returns -EBUSY, an immediate exit is requested, nested_run_pending causes vmx_vcpu_run to do if (vmx->nested.nested_run_pending) kvm_make_request(KVM_REQ_EVENT, vcpu); and on the next entry inject_pending_event sets in the CPU_BASED_INTR_PENDING in vmcs02? SVM doesn't have the equivalent of nested_run_pending, nor does it implement check_nested_events. Paolo > Then we probably lack that with > SVM, and I would have a trace.