From: Nitin A Kamble Subject: Re: [patch] (big) real mode emulation - mov rl/rh/r Date: Tue, 30 Oct 2007 18:43:46 -0800 Message-ID: <1193798626.9258.34.camel@lnitindesktop.sc.intel.com> References: <1193791385.9258.17.camel@lnitindesktop.sc.intel.com> <4727D531.7090401@qumranet.com> Reply-To: nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1413479768==" Cc: kvm-devel To: Avi Kivity Return-path: In-Reply-To: <4727D531.7090401-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org --===============1413479768== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ML0bXR+hIcTaV99vxObD" --=-ML0bXR+hIcTaV99vxObD Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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) > > > > =20 > > @@ -146,8 +146,12 @@ static u16 opcode_table[256] =3D { > > 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 */ >=20 > 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 =3D + (unsigned long *)&c->regs[VCPU_REGS_RAX + (c->b & 0x3)]; + c->dst.ptr =3D + ((void *)&c->regs[VCPU_REGS_RAX + (c->b & 0x3)] + 1); + c->dst.ptr =3D + (unsigned long *)&c->regs[VCPU_REGS_RAX + (c->b & 0x7)]; > -- > Any sufficiently difficult bug is indistinguishable from a feature. >=20 >=20 --=20 Thanks & Regards, Nitin Open Source Technology Center, Intel Corporation ----------------------------------------------------------------- The mind is like a parachute; it works much better when it's open --=-ML0bXR+hIcTaV99vxObD Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBHJ+viEA5Hv97Fde4RAjQMAJ0b+FC1eJRk2urfEiZqoGv4noynmACcCotS JgXjhK5k7Vg6PWyHDY1CnpQ= =jMYF -----END PGP SIGNATURE----- --=-ML0bXR+hIcTaV99vxObD-- --===============1413479768== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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/ --===============1413479768== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============1413479768==--