From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 6/6] KVM: x86: Emulator support for TF Date: Tue, 23 Feb 2010 14:02:22 +0200 Message-ID: <20100223120222.GK29041@redhat.com> References: <20100223095553.GC29041@redhat.com> <4B83A9B1.2060103@siemens.com> <20100223102620.GF29041@redhat.com> <4B83AFE1.3070905@siemens.com> <20100223110054.GI29041@redhat.com> <4B83BC53.6090102@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , kvm To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42622 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710Ab0BWMCZ (ORCPT ); Tue, 23 Feb 2010 07:02:25 -0500 Content-Disposition: inline In-Reply-To: <4B83BC53.6090102@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Feb 23, 2010 at 12:30:27PM +0100, Jan Kiszka wrote: > Gleb Natapov wrote: > > On Tue, Feb 23, 2010 at 11:37:21AM +0100, Jan Kiszka wrote: > >> Gleb Natapov wrote: > >>> On Tue, Feb 23, 2010 at 11:10:57AM +0100, Jan Kiszka wrote: > >>>> Gleb Natapov wrote: > >>>>> On Mon, Feb 22, 2010 at 06:51:23PM +0100, Jan Kiszka wrote: > >>>>>> Support both guest- as well as host-owned EFLAGS.TF while emulating > >>>>>> instructions. For guest-owned TF, we simply inject DB and update DR6.BS > >>>>>> after completing an instruction that has TF set on entry. To support > >>>>>> guest single-stepping under host control, we store the pending step > >>>>>> along with its CS and RIP and trigger a corresponding user space exit > >>>>>> once guest execution is about to resume. This check is is also required > >>>>>> in the VMX emulation loop during invalid guest states. > >>>>>> > >>>>> Emulator currently is a total mess. It is not a good time to add more mess > >>>>> there right now IMO. > >>>> Then let's clean up what you consider "mess" in this feature. Unless > >>>> there are plans to clean up the emulator for the next or next-but-one > >>>> kernel release, I do not want to wait for this. > >>>> > >>> There are plans to cleanup the emulator. > >> When? > > ASAP :) I am looking into that, but it will not be easy. > > Ok, so you are targeting 2.6.35? Then I'm fine to wait for this, keeping > the patch for local use so far. > As I said ASAP :) I can't as of yet tell how much time it will take. Right now I am trying to revive emulator tests that we have, since touching this code without test cases is madness. > But we should then merge patch 5 as a workaround so that guest debugging > is at least not completely broken when stepping over emulated instructions. Yes, patch 5 is fine. -- Gleb.