From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH -tip 0/6 V4] tracing: kprobe-based event tracer Date: Fri, 03 Apr 2009 14:50:35 +0300 Message-ID: <49D5F80B.7000305@redhat.com> References: <49D4F4B5.9040107@redhat.com> <20090403112639.GC31399@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Masami Hiramatsu , "H. Peter Anvin" , Frederic Weisbecker , Steven Rostedt , Ananth N Mavinakayanahalli , Andrew Morton , Andi Kleen , Jim Keniston , kvm@vger.kernel.org, systemtap-ml , LKML To: Ingo Molnar Return-path: In-Reply-To: <20090403112639.GC31399@elte.hu> List-Unsubscribe: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org List-Id: kvm.vger.kernel.org Ingo Molnar wrote: > ok, the structure and concept looks quite good now, really nice! > > I'm wondering about something i suggested many moons ago: to look > into the KVM decoder+emulator (arch/x86/kvm/x86_emulate.c). > > I remember there were some issues with that (one problem being that > the KVM decoder is a special-purpose thing covering specific range > of execution environments - not a near-full integer-ops decoder like > the one we are aiming for here) - are there any other fundamental > problems beyond 'it has to be done' ? > > Conceptually we want just a single piece of decoder logic in > arch/x86/. If the KVM folks are cool with it we could factor out the > KVM one into arch/x86/lib/. But ... if there are compelling reasons > to leave the KVM one alone in its limited environment we can do that > too. > kvm has three requirements not needed by kprobes: - it wants to execute instructions, not just decode them, including generating faults where appropriate - it is performance critical - it needs to support 16-bit, 32-bit, and 64-bit instructions simultaneously If an arch/x86/ decoder/emulator gives me these I'll gladly switch to it. x86_emulate.c is high on my list of most disliked code. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.