From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 0/30] nVMX: Nested VMX, v9 Date: Thu, 12 May 2011 19:14:20 +0300 Message-ID: <20110512161420.GB20193@redhat.com> References: <1304842511-nyh@il.ibm.com> <4DC7CD81.2070305@redhat.com> <20110511082027.GG19019@redhat.com> <20110512154228.GA7943@fermat.math.technion.ac.il> <20110512155727.GA20193@redhat.com> <4DCC061B.5070504@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Nadav Har'El" , kvm@vger.kernel.org, abelg@il.ibm.com To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757974Ab1ELRHH (ORCPT ); Thu, 12 May 2011 13:07:07 -0400 Content-Disposition: inline In-Reply-To: <4DCC061B.5070504@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, May 12, 2011 at 07:08:59PM +0300, Avi Kivity wrote: > On 05/12/2011 06:57 PM, Gleb Natapov wrote: > >On Thu, May 12, 2011 at 06:42:28PM +0300, Nadav Har'El wrote: > >> So I guess my question is, and Avi and Gleb I'd love your comments about this > >> question: Is it really beneficial that I rewrite the "ugly" nested-VMX > >> injection code to be somewhat-ugly in exactly the same way that nested-SVM > >> injection code? Won't it be more beneficial to rewrite *both* codes to > >> be cleaner? This would probably mean changes to the common x86.c, that both > >> will use. For example, x86.c's injection code could check the nested case > >> itself, perhaps calling a special x86_op to handle the nested injection (exit, > >> set interrupt window, etc.) instead of calling the regular > >> interrupt_allowed/enable_irq_window and forcing those to be modified in > >> mysterious ways. > >> > >That is exactly what should be done and what I have in mind when I am > >asking to change VMX code to be SVM like. To achieve what you outlined > >above gradually we need to move common VMX and SVM logic into x86.c > >and then change the logic to be more nested friendly. If VMX will have > >different interrupt handling logic we will have to have additional step: > >making SVM and VMX code similar (so it will be possible to move it > >into x86.c). All I am asking is to make this step now, before merge, > >while the code is still actively developed. > > > > I don't think it's fair to ask Nadav to do a unification right now. Definitely. And I am not asking for it! > Or productive - there's a limit to the size of a patchset that can > be carried outside. Also it needs to be done in consideration with > future changes to interrupt injection, like using the svm interrupt > queue to avoid an interrupt window exit. > > Are there vmx-only changes that you think can help? > I am asking for vmx-only change actually. To make interrupt handling logic the same as SVM. This will allow me or you or someone else to handle unification part later without rewriting VMX. -- Gleb.