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>,
Laurent Vivier <Laurent.Vivier-6ktuUTfB/bM@public.gmane.org>
Subject: [PATCH] (big) real mode emulation - dec reg
Date: Fri, 14 Sep 2007 11:50:41 -0700 [thread overview]
Message-ID: <1189795841.28738.53.camel@lnitindesktop.sc.intel.com> (raw)
In-Reply-To: <1189795407.28738.50.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
[-- Attachment #1.1.1: Type: text/plain, Size: 338 bytes --]
Hi Avi,
Attached is the patch to implement emulation of instruction:
dec reg
opcodes: 0x48 - 0x4f
Please apply.
--
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.1.2: dec_reg.patch --]
[-- Type: text/x-patch, Size: 1501 bytes --]
commit ea06cdff59c8f9d74be2f6d7b7c4137a7c150a50
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date: Fri Sep 14 14:55:33 2007 -0700
Implement emulation of instruction:
dec reg
opcode: 0x48 - 0x4f
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index f5a4f4a..64909ff 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -100,7 +100,8 @@ static u8 opcode_table[256] = {
ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
/* 0x48 - 0x4F */
- 0, 0, 0, 0, 0, 0, 0, 0,
+ ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+ ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
/* 0x50 - 0x57 */
ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
@@ -1409,6 +1410,22 @@ pop_instruction:
}
no_wb = 1; /* Disable writeback. */
break;
+ case 0x48 ... 0x4f: /* dec r16/r32 */
+ dst.ptr = (unsigned long *)&_regs[b & 0x7];
+ dst.val = *dst.ptr;
+ switch (op_bytes) {
+ case 2:
+ *(u16 *)dst.ptr = (u16)dst.val - 1;
+ break;
+ case 4:
+ *dst.ptr = (u32)dst.val - 1;
+ break; /* 64b: zero-ext */
+ case 8:
+ *dst.ptr = dst.val - 1;
+ break;
+ }
+ no_wb = 1; /* Disable writeback. */
+ break;
case 0xa4 ... 0xa5: /* movs */
dst.type = OP_MEM;
dst.bytes = (d & ByteOp) ? 1 : op_bytes;
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
[-- 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
next prev parent reply other threads:[~2007-09-14 18:50 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1188349132.9270.7.camel@lnitindesktop.sc.intel.com>
[not found] ` <20070829020005.GA32726@jim.sh>
[not found] ` <20070829020005.GA32726-lSbMZ+N7itA@public.gmane.org>
2007-09-01 14:10 ` [PATCH] (big) real mode emulation - push imm8 Avi Kivity
[not found] ` <1188349132.9270.7.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-12 7:54 ` Avi Kivity
[not found] ` <46E79B2A.60506-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-12 8:16 ` Laurent Vivier
[not found] ` <46E7A073.6030601-6ktuUTfB/bM@public.gmane.org>
2007-09-12 8:28 ` Avi Kivity
[not found] ` <46E7A317.208-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-13 0:36 ` Kamble, Nitin A
[not found] ` <47DF6B76DC88174EB18F2393E76FC46EB20712F4@scsmsx412.amr.corp.intel.com>
[not found] ` <47DF6B76DC88174EB18F2393E76FC46EB20712F4-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-09-13 18:15 ` Nitin A Kamble
[not found] ` <1189707324.28738.0.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 18:28 ` Nitin A Kamble
[not found] ` <1189708119.28738.5.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-15 7:13 ` Avi Kivity
2007-09-13 18:55 ` [PATCH] (big) real mode emulation - jump conditional relative Nitin A Kamble
[not found] ` <1189709705.28738.9.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 20:48 ` Anthony Liguori
[not found] ` <46E9A215.9020304-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-09-13 20:53 ` Kamble, Nitin A
2007-09-13 23:18 ` [PATCH] (big) real mode emulation - jump conditional short relative Nitin A Kamble
[not found] ` <1189725509.28738.12.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 23:26 ` [PATCH] (big) real mode emulation - or instruction correction Nitin A Kamble
[not found] ` <1189725983.28738.15.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 23:36 ` [PATCH] (big) real mode emulation - sub imm Nitin A Kamble
[not found] ` <1189726560.28738.18.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 23:47 ` [PATCH] (big) real mode emulation - cmp correction Nitin A Kamble
[not found] ` <1189727241.28738.21.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-13 23:54 ` [PATCH] (big) real mode emulation - mov correction Nitin A Kamble
[not found] ` <1189727640.28738.24.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 0:02 ` [PATCH] (big) real mode emulation - lea Nitin A Kamble
[not found] ` <1189728138.28738.27.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 0:15 ` [PATCH] (big) real mode emulation - mov imm Nitin A Kamble
[not found] ` <1189728902.28738.31.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 0:22 ` [PATCH] (big) real mode emulation - initialization fixes Nitin A Kamble
[not found] ` <1189729357.28738.33.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 0:40 ` [PATCH] (big) real mode emulation - popf Nitin A Kamble
[not found] ` <1189730445.28738.36.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 18:20 ` [PATCH] (big) real mode emulation - jmp abs Nitin A Kamble
[not found] ` <1189794045.28738.47.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 18:43 ` [PATCH] (big) real mode emulation - inc reg Nitin A Kamble
[not found] ` <1189795407.28738.50.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 18:50 ` Nitin A Kamble [this message]
[not found] ` <1189795841.28738.53.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-18 22:14 ` [PATCH] (big) real mode emulation - correct code placement Nitin A Kamble
[not found] ` <1190153661.4620.3.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-19 12:12 ` Avi Kivity
2007-09-15 7:39 ` [PATCH] (big) real mode emulation - inc reg Avi Kivity
2007-09-15 7:41 ` [PATCH] (big) real mode emulation - jmp abs Avi Kivity
2007-09-15 7:45 ` [PATCH] (big) real mode emulation - popf Avi Kivity
2007-09-14 17:08 ` [PATCH] (big) real mode emulation - initialization fixes Avi Kivity
[not found] ` <46EAC01F.7040609-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-14 17:33 ` Nitin A Kamble
[not found] ` <1189791233.28738.42.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-09-14 17:42 ` Avi Kivity
2007-09-15 7:43 ` Avi Kivity
2007-09-15 7:48 ` [PATCH] (big) real mode emulation - mov imm Avi Kivity
2007-09-15 7:36 ` [PATCH] (big) real mode emulation - lea Avi Kivity
2007-09-15 7:33 ` [PATCH] (big) real mode emulation - or instruction correction Avi Kivity
2007-09-15 7:29 ` [PATCH] (big) real mode emulation - jump conditional relative 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=1189795841.28738.53.camel@lnitindesktop.sc.intel.com \
--to=nitin.a.kamble-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=Laurent.Vivier-6ktuUTfB/bM@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