kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@redhat.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>, Ingo Molnar <mingo@elte.hu>,
	        Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
	        Andi Kleen <andi@firstfloor.org>,
	kvm@vger.kernel.org,         Steven Rostedt <rostedt@goodmis.org>,
	        Frederic Weisbecker <fweisbec@gmail.com>,
	        Andrew Morton <akpm@linux-foundation.org>,
	        Arnaldo Carvalho de Melo <acme@redhat.com>,
	        systemtap-ml <systemtap@sources.redhat.com>,
	        LKML <linux-kernel@vger.kernel.org>,
	        Vegard Nossum <vegard.nossum@gmail.com>,
	Avi Kivity <avi@redhat.com>,
	        Roland McGrath <roland@redhat.com>
Subject: Re: [PATCH -tip 3/6 V4.1] x86: instruction decorder API
Date: Fri, 17 Apr 2009 09:31:46 -0400	[thread overview]
Message-ID: <49E884C2.9030409@redhat.com> (raw)
In-Reply-To: <49E7C1B3.1070000@zytor.com>

H. Peter Anvin wrote:
> Masami Hiramatsu wrote:
>>
>> Hmm, I have an idea about instruction table. Usually, instruction tables
>> are encoded with code defined by each decoder/emulator. This method
>> will show their internal code directly, and is hard to maintain when
>> the opcode map is updated. Instead of that, I'd like to suggest using
>> the expressions in the opcode maps in a vender's genuine document (in
>> this case, Intel/AMD's manual) or www.sandpile.org for instruction
>> tables.
>>
> 
> Yes, we discussed this at the Collab Summit.  I think it's the only sane
> thing.
> 
>> e.g.
>>
>> const insn_attr_t onebyte_attr_table[ATTR_TABLE_SIZE] = {
>> /* 0x00-0x0f */
>> AT2(Eb,Gb), AT2(Ev,Gv),  AT2(Gb,Eb),  AT2(Gv,Ev),
>> AT2(AL,Ib), AT2(rAX,Iz), AT2(ES,i64), AT2(ES,i64),
>> AT2(Eb,Gb), AT2(Ev,Gv),  AT2(Gb,Eb),  AT2(Gv,Ev),
>> AT2(AL,Ib), AT2(rAX,Iz), AT2(CS,i64), AT(ESC),
>> ...
>>
>> Here, AT and AT2 macros are defined as follows:
>>
> 
> I would suggest using an actual parser, rather than relying on cpp for
> this.  The parser will be much more powerful, and will make it much
> easier to change data structure radically as we discussed.

Aah, I see. So we'd better make a parser which generates internal
data structure from genuine opcode map in compilation time.

And I changed my mind about internal data structure too.
In this version, I'll use a smallest bits which are needed
for the decoder.

Thank you,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com

  reply	other threads:[~2009-04-17 13:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02 17:24 [PATCH -tip 3/6 V4] x86: instruction decorder API Masami Hiramatsu
2009-04-03 23:29 ` [PATCH -tip 3/6 V4.1] " Masami Hiramatsu
2009-04-03 23:43   ` H. Peter Anvin
2009-04-04  0:37     ` Masami Hiramatsu
2009-04-06 22:48       ` Jim Keniston
2009-04-06 22:55         ` H. Peter Anvin
2009-04-16 23:31           ` Masami Hiramatsu
2009-04-16 23:39             ` H. Peter Anvin
2009-04-17 13:31               ` Masami Hiramatsu [this message]
2009-04-17 18:07                 ` H. Peter Anvin
2009-04-17  0:06             ` Jim Keniston
2009-04-17  0:08               ` H. Peter Anvin
2009-04-22  0:17                 ` Masami Hiramatsu
2009-04-23  0:47                   ` Jim Keniston
2009-04-23 17:29                     ` Masami Hiramatsu
2009-04-23 22:22                       ` Jim Keniston
2009-04-24  3:53                         ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49E884C2.9030409@redhat.com \
    --to=mhiramat@redhat.com \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ananth@in.ibm.com \
    --cc=andi@firstfloor.org \
    --cc=avi@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jkenisto@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=systemtap@sources.redhat.com \
    --cc=vegard.nossum@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).