From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Regression] kvm-userspace: VM freezes after booting FreeDOS Date: Sun, 13 Jul 2008 13:08:50 +0300 Message-ID: <4879D432.6030104@qumranet.com> References: <52d4a3890807100847q5aef1a69hbd7179b018cb02ad@mail.gmail.com> <48766AE0.2050400@codemonkey.ws> <52d4a3890807101332v2cfe5604g78dc2d225e3c67d9@mail.gmail.com> <48767DB3.7090701@web.de> <52d4a3890807101559i408e3d3at8030034e858f0256@mail.gmail.com> <48773BA3.7090900@siemens.com> <52d4a3890807110755j4c501040y4749181ccfc33420@mail.gmail.com> <4878934E.70504@web.de> <4879B4AC.1070809@qumranet.com> <4879C636.30003@web.de> <52d4a3890807130226t40ed349eq3b5e367754d64978@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , Jan Kiszka , Anthony Liguori , kvm@vger.kernel.org, Rik van Riel To: Mohammed Gamal Return-path: Received: from il.qumranet.com ([212.179.150.194]:43893 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbYGMKIw (ORCPT ); Sun, 13 Jul 2008 06:08:52 -0400 In-Reply-To: <52d4a3890807130226t40ed349eq3b5e367754d64978@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Mohammed Gamal wrote: > >>>> + vmx_inject_irq(vcpu, vec); >>>> >>>> >>> kvm_queue_exception() >>> >> OK. >> > > Not so fast, the GP# pops up again with kvm_queue_exception(). Why > should we use kvm_queue_exception() here? kvm_queue_exception() will also block interrupt injection. Without this, there's the risk that the breakpoint injection will be overridden by a following interrupt injection. > Shouldn't this be the part > where we handle/service that exception, rather than adding it, may be > I am misunderstanding so CIIW. > It is indeed where we handle the guest exception, and we handle it by queuing it right back. Of course, we need to find out why kvm_queue_exception() is broken. It probably needs the same hacky treatment as vmx_inject_irq() for real mode. Eventually I'd like to inject real mode interrupts by writing the stack frame, but currently this is diffcult as everything happens in interrupts disabled context on the host. -- error compiling committee.c: too many arguments to function