From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 2/2] Provide fast path for "rep ins" emulation if possible. Date: Tue, 5 Jun 2012 20:36:50 +0300 Message-ID: <20120605173650.GI20236@redhat.com> References: <1337782095-32287-1-git-send-email-gleb@redhat.com> <1337782095-32287-3-git-send-email-gleb@redhat.com> <4FBCF6EB.8040604@redhat.com> <4FBCF8FB.6050308@redhat.com> <20120524103457.GK2604@amd.com> <4FBE0F43.4060408@redhat.com> <20120524105403.GL2604@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Roedel, Joerg" , Avi Kivity , kvm@vger.kernel.org, mtosatti@redhat.com To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:22352 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755216Ab2FERg4 (ORCPT ); Tue, 5 Jun 2012 13:36:56 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Jun 05, 2012 at 07:27:40PM +0200, Alexander Graf wrote: > > On 24.05.2012, at 12:54, Roedel, Joerg wrote: > > > On Thu, May 24, 2012 at 01:36:51PM +0300, Avi Kivity wrote: > >> On 05/24/2012 01:34 PM, Roedel, Joerg wrote: > >>> On Wed, May 23, 2012 at 05:49:31PM +0300, Avi Kivity wrote: > >>>> On 05/23/2012 05:40 PM, Avi Kivity wrote: > >>>>> On 05/23/2012 05:08 PM, Gleb Natapov wrote: > >>>>> If decode assists are not available, we still need to emulate, see 15.33.5. > >>>>> > >>>> > >>>> Joerg, the 2010 version of the manual says that the effective segment > >>>> (10:12) is only available with decode assists. The 2012 version says > >>>> it's unconditional. What's correct? > >>> > >>> It is still conditional and only available with decode-assists. I will > >>> talk to the APM authors to clarify this in the documentation. > >> > >> Thanks. As it happens it doesn't matter for INS emulation, only OUTS, > >> unless other bits in that word also depend on decode assists. > > > > Doesn't look like it. All other bits EXITINFO1 bits for the IOIO > > intercept are documented from the very ancient beginnings of SVM. So the > > segment number is the only addition. > > I do remember some bits missing in early implementations though. Don't ask me what, I just remember that when looking at intercept logs back in the day, some bits were not set even though they were documented as such - and those were pretty crucial bits, which is why we go through the emulator usually. > I know exactly why code goes through the emulation because I made it do so :) And the reason was because the previous code didn't handle anything except string pio to memory with address increment. i.e the case this patch turns to fast path. -- Gleb.