From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 4/4] Fix task switching. Date: Mon, 30 Mar 2009 19:39:42 +0300 Message-ID: <20090330163942.GK25718@redhat.com> References: <20090329141202.30481.91797.stgit@trex.usersys.redhat.com> <20090329141218.30481.92675.stgit@trex.usersys.redhat.com> <49D0ED9D.9080600@web.de> <20090330162155.GI25718@redhat.com> <49D0F4B9.5040008@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, kvm@vger.kernel.org, Bernhard Kohl , "Ostler, Thomas (NSN - DE/Munich)" , bliitz@users.sourceforge.net To: Jan Kiszka Return-path: Received: from mx2.redhat.com ([66.187.237.31]:40237 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751913AbZC3Qjy (ORCPT ); Mon, 30 Mar 2009 12:39:54 -0400 Content-Disposition: inline In-Reply-To: <49D0F4B9.5040008@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Mar 30, 2009 at 06:35:05PM +0200, Jan Kiszka wrote: > Gleb Natapov wrote: > > On Mon, Mar 30, 2009 at 06:04:45PM +0200, Jan Kiszka wrote: > >> Gleb Natapov wrote: > >>> The patch fixes two problems with task switching. > >>> 1. Back link is written to a wrong TSS. > >>> 2. Instruction emulation is not needed if the reason for task switch > >>> is a task gate in IDT and access to it is caused by an external even. > >>> > >>> 2 is currently solved only for VMX since there is not reliable way to > >>> skip an instruction in SVM. We should emulate it instead. > >> Does this series fix all issues Bernhard, Thomas and Julian stumbled over? > >> > > Haven't tried. I wrote my own tests for task switching. How can I check it? > > > > There is a test case attached to Julian's sourceforge-reported bug: > > https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2681442&group_id=180599 > I'll try that. > And I guess Thomas or Bernhard will be happy to give it a try, too... :) > > There was one issue, the IRQ injection bug [1] which was related to IRQ > tasks IIRC. Thomas and I finally suspected after a private chat that > there is actually a different reason behind it, something like > interrupt.pending should be cleared when the injection took place via an > (emulated) task switch. Any news on this, Thomas? > If this is the case then the patch series should fix it. > Jan > > [1] http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/29288 > -- Gleb.