From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] do not enter vcpu again if it was stopped during IO Date: Wed, 23 Jun 2010 11:24:06 +0300 Message-ID: <20100623082406.GC4689@redhat.com> References: <20100621090152.GG4689@redhat.com> <4C21C437.7050302@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62806 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751209Ab0FWIYI (ORCPT ); Wed, 23 Jun 2010 04:24:08 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5N8O79o004313 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 23 Jun 2010 04:24:08 -0400 Content-Disposition: inline In-Reply-To: <4C21C437.7050302@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jun 23, 2010 at 11:22:15AM +0300, Avi Kivity wrote: > On 06/21/2010 12:01 PM, Gleb Natapov wrote: > >To prevent reentering vcpu after IO completion it is not enough > >to set env->stopped since it is checked only in main loop but control > >will not get there until next non-IO exit since kvm_run() will reenter > >vcpu to complete IO instruction. Solve this by sending self-signal to > >request exit after IO instruction completion. > > > > Applied, thanks. > > Does uq/master need such a patch? > The code is very different there. I looks to me broken too, but the fix will be different. -- Gleb.