From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 22/24] Correct handling of idt vectoring info Date: Sun, 26 Sep 2010 17:14:37 +0200 Message-ID: <4C9F635D.1060603@redhat.com> References: <1276431753-nyh@il.ibm.com> <201006131233.o5DCXoel013156@rice.haifa.ibm.com> <20100617115803.GP523@redhat.com> <20100920063704.GA29641@fermat.math.technion.ac.il> <20100920093440.GH3008@redhat.com> <20100920100340.GB29641@fermat.math.technion.ac.il> <4C973350.7070203@redhat.com> <20100922231509.GB20148@fermat.math.technion.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm@vger.kernel.org To: "Nadav Har'El" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3677 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755Ab0IZPOr (ORCPT ); Sun, 26 Sep 2010 11:14:47 -0400 In-Reply-To: <20100922231509.GB20148@fermat.math.technion.ac.il> Sender: kvm-owner@vger.kernel.org List-ID: On 09/23/2010 01:15 AM, Nadav Har'El wrote: > On Mon, Sep 20, 2010, Avi Kivity wrote about "Re: [PATCH 22/24] Correct handling of idt vectoring info": > > >I'm afraid I know very little about the SVM architecture. Does SVM even > > >have > > >a parallel of the IDT_VECTORING_INFO that this patch is trying to address? > > > > It does. exit_int_info. > > Thanks. I guess I need to do some serious reading on this subject. I guessed > that exit_int_info was more of a parallel of VMX's vm_exit_intr_info field and > not idt_vectoring_info, but I guess I was wrong. svm has separate intercepts for every exception, so it doesn't need the vector field of vm_exit_intr_info_field. The error code is stored in exit_info_1, cr2 (for #PF) in exit_info_2. > > >I agree that the nested SVM's handle_exit() looks cleaner that the parallel > > >code in nested VMX. The root of all evil is that second exit decision point > > >in the injection phase, and I'll think some more if I can find a way to > > >avoid it without rocking the foundations too much. > > > > > > > I think svm needs it too. > > Can you please clarify? I didn't understand what "it" refers to here. > > Sorry, it was a week ago. In general I think both svm and vmx need to go through the exception/interrupt queues. That is, if you exit with IDT_VECTORING_INFO_VALID, you unpack it into the queue as a pending exception, and when you enter again you load it into VM_ENTRY_INTR_INFO_FIELD. That's a bit of work, but it reduces the amount of code paths when L0 needs to inject an exception into L2 (like in emulation) - all it has to do is to queue it into the generic exception queue. -- error compiling committee.c: too many arguments to function