From: Nadav Har'El Subject: Re: [PATCH] KVM: nVMX: Rework event injection and recovery Date: Thu, 21 Feb 2013 15:28:51 +0200 Message-ID: <20130221132851.GA8847@fermat.math.technion.ac.il> References: <20130220170159.GT3600@redhat.com> <512506B2.2020300@siemens.com> <51250CFA.10600@siemens.com> <20130221092221.GZ3600@redhat.com> <5125EC5D.4050408@siemens.com> <20130221100653.GB3600@redhat.com> <5125F492.8080902@siemens.com> <5125F6C4.7040802@siemens.com> <5125F7FA.8060008@siemens.com> <20130221131332.GA14354@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kiszka , Marcelo Tosatti , kvm , "Nakajima, Jun" To: Gleb Natapov Return-path: Received: from mailgw13.technion.ac.il ([132.68.225.13]:53998 "EHLO mailgw13.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752589Ab3BUNag (ORCPT ); Thu, 21 Feb 2013 08:30:36 -0500 Content-Disposition: inline In-Reply-To: <20130221131332.GA14354@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Feb 21, 2013, Gleb Natapov wrote about "Re: [PATCH] KVM: nVMX: Rework event injection and recovery": > will not be called while there is an event to reinject. 51cfe38ea5 still > does not explain why nested_run_pending is needed. We cannot #vmexit > without entering L2, but we can undo VMLAUNCH/VMRESUME emulation leaving > rip pointing to the instruction. We can start by moving > skip_emulated_instruction() from nested_vmx_run() to nested_vmx_vmexit(). This is a very interesting idea! Don't forget to also skip_emulated_instruction() in nested_vmx_entry_failure(). And please expand the comment at the end of nested_vmx_run(), saying that also skipping the instruction is done on exit, unless the instruction needs to be retried because we needed to inject an interrupt into L1 before running it. Whether this is actually clearer than the "nested_run_pending" approach I don't know. -- Nadav Har'El | Thursday, Feb 21 2013, 11 Adar 5773 nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |Cat rule #2: Bite the hand that won't http://nadav.harel.org.il |feed you fast enough.