public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Nitin A Kamble <nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [patch] (big) real mode emulation - mov rl/rh/r
Date: Tue, 30 Oct 2007 18:43:46 -0800	[thread overview]
Message-ID: <1193798626.9258.34.camel@lnitindesktop.sc.intel.com> (raw)
In-Reply-To: <4727D531.7090401-atKUWr5tajBWk0Htik3J/w@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1878 bytes --]

On Tue, 2007-10-30 at 18:06 -0700, Avi Kivity wrote:
> Nitin A Kamble wrote:
> > Hi Avi,
> >   Attached is the patch to implement emulation of instructions
> >   mov rl, imm8 (opcodes 0xb0-0xb3)
> >   mov rh, imm8 (opcodes 0xb4-0xb7)
> >   mov r, imm (opcodes0xb8-0xbf)
> >
> >  
> > @@ -146,8 +146,12 @@ static u16 opcode_table[256] = {
> >         0, 0, ByteOp | ImplicitOps | Mov, ImplicitOps | Mov,
> >         ByteOp | ImplicitOps | Mov, ImplicitOps | Mov,
> >         ByteOp | ImplicitOps, ImplicitOps,
> > -       /* 0xB0 - 0xBF */
> > -       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> > +       /* 0xB0 - 0xB7 */
> > +       Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte, Mov |
> > SrcImmByte,
> > +       Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte, Mov |
> > SrcImmByte,
> > +       /* 0xB8 - 0xBF */
> > +       Mov | SrcImm, Mov | SrcImm, Mov | SrcImm, Mov | SrcImm,
> > +       Mov | SrcImm, Mov | SrcImm, Mov | SrcImm, Mov | SrcImm,
> >         /* 0xC0 - 0xC7 */
> 
> Perhaps adding DstReg would reduce the decoding code later on?

Avi,
The decoding of register is significantly different for these
instructions. It will be just moving code from one place to other place.

+               c->dst.ptr =
+                       (unsigned long *)&c->regs[VCPU_REGS_RAX + (c->b
& 0x3)];
+               c->dst.ptr =
+                       ((void *)&c->regs[VCPU_REGS_RAX + (c->b & 0x3)]
+ 1);
+               c->dst.ptr =
+                       (unsigned long *)&c->regs[VCPU_REGS_RAX + (c->b
& 0x7)];
> --
> Any sufficiently difficult bug is indistinguishable from a feature.
> 
> 
-- 
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation
-----------------------------------------------------------------
The mind is like a parachute; it works much better when it's open

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 314 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

[-- Attachment #3: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

  parent reply	other threads:[~2007-10-31  2:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31  0:43 [patch] (big) real mode emulation - mov rl/rh/r Nitin A Kamble
     [not found] ` <1193791385.9258.17.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-10-31  1:06   ` Avi Kivity
     [not found]     ` <4727D531.7090401-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-31  2:43       ` Nitin A Kamble [this message]
     [not found]         ` <1193798626.9258.34.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-10-31  8:04           ` Avi Kivity
     [not found]             ` <4728370E.3030401-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-31  9:38               ` Avi Kivity

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=1193798626.9258.34.camel@lnitindesktop.sc.intel.com \
    --to=nitin.a.kamble-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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