From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LvYov-0007Ym-1r for qemu-devel@nongnu.org; Sun, 19 Apr 2009 11:20:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LvYop-0007Sn-Hi for qemu-devel@nongnu.org; Sun, 19 Apr 2009 11:20:36 -0400 Received: from [199.232.76.173] (port=48177 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LvYop-0007Sc-Cv for qemu-devel@nongnu.org; Sun, 19 Apr 2009 11:20:31 -0400 Received: from mx2.redhat.com ([66.187.237.31]:48386) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LvYoo-0008A1-UU for qemu-devel@nongnu.org; Sun, 19 Apr 2009 11:20:31 -0400 Date: Sun, 19 Apr 2009 18:20:23 +0300 From: Gleb Natapov Message-ID: <20090419152023.GC21459@redhat.com> References: <1239616545-25199-1-git-send-email-gleb@redhat.com> <1239616545-25199-6-git-send-email-gleb@redhat.com> <49E99A7F.7000902@web.de> <20090418162820.GI27675@redhat.com> <20090419135745.GO10126@redhat.com> <49EB2FA1.2090305@web.de> <49EB3DF5.6070601@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49EB3DF5.6070601@web.de> Subject: [Qemu-devel] Re: [PATCH 05/15] Coalesce userspace/kernel irqchip interrupt injection logic. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: kvm@vger.kernel.org, Dmitry Eremin-Solenikov , Joerg Roedel , qemu-devel , Alexander Graf , Avi Kivity On Sun, Apr 19, 2009 at 05:06:29PM +0200, Jan Kiszka wrote: > Jan Kiszka wrote: > > Gleb Natapov wrote: > >> On Sat, Apr 18, 2009 at 07:28:20PM +0300, Gleb Natapov wrote: > >>>> So this patch may either expose a bug in the svm emulation of qemu or > >>>> comes with a subtle regression that only triggers due to qemu's timing. > >>>> This needs to be understood. Gleb, any progress on reproducing it on > >>>> your side? > >>>> > >>> I reproduced it and I am debugging it. In my case the boot hangs on sti;hlt > >>> sequence. Instrumentation thus far shows that at this point interrupts no longer > >>> injected because ppr value is too big. Need to see why, but tpr handling > >>> is not complete in qemu svm. May be this is the reason. Will know more > >>> tomorrow. > >>> > >> I've looked into this and my conclusion is that if you are not going to > >> develop SVM in qemu don't use it just yet. > > > > We had a resource conflict regarding SVM capable AMD boxes and a tight > > schedule, so we decided to pick qemu as initial development platform. > > Turns out that this has was a bit too optimistic. :) > > > >> QEMU doesn't handle exceptions > >> during event injection properly. Actually it does not handle it at all, > >> so if PF happens during interrupt injection interrupt is lost and, what > >> worse, is never acked. If interrupt was high prio it blocks all other > >> interrupts. > >> > >> The patch below adds exception handling during event injection. Valid > >> flag removed from EVENTINJ only after successful injection and EVENTINJ > >> is copied to EXITINTINFO on exit. Can you give it a try? > > > > Ah, great, thanks. Will test. > > I can confirm: patch below makes my kvm-in-qemu test case happy, too. > Maybe you want to post this with changelog and signed-off to qemu-devel. > Yeah, I'll reformat and submit. -- Gleb.