From: Mohammed Gamal <m.gamal005@gmail.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm@vger.kernel.org, riel@surriel.com
Subject: Re: [PATCH][RESEND] x86_emulator: Emulate cld and std instruction
Date: Thu, 31 Jul 2008 16:27:14 +0300 [thread overview]
Message-ID: <20080731132714.GA8990@mohd-laptop> (raw)
In-Reply-To: <4891990C.7000202@qumranet.com>
Here is an update patch.
This adds 'cld' and 'std' instructions. The group table entries are
added.
Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
---
arch/x86/kvm/x86_emulate.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 07a277c..4c7ca7f 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -182,7 +182,7 @@ static u16 opcode_table[256] = {
ImplicitOps, ImplicitOps, Group | Group3_Byte, Group | Group3,
/* 0xF8 - 0xFF */
ImplicitOps, 0, ImplicitOps, ImplicitOps,
- 0, 0, Group | Group4, Group | Group5,
+ ImplicitOps, ImplicitOps, Group | Group4, Group | Group5,
};
static u16 twobyte_table[256] = {
@@ -1757,6 +1757,14 @@ special_insn:
ctxt->eflags |= X86_EFLAGS_IF;
c->dst.type = OP_NONE; /* Disable writeback. */
break;
+ case 0xfc: /* cld */
+ ctxt->eflags &= ~EFLG_DF;
+ c->dst.type = OP_NONE; /* Disable writeback. */
+ break;
+ case 0xfd: /* std */
+ ctxt->eflags |= EFLG_DF;
+ c->dst.type = OP_NONE; /* Disable writeback. */
+ break;
case 0xfe ... 0xff: /* Grp4/Grp5 */
rc = emulate_grp45(ctxt, ops);
if (rc != 0)
--
1.5.4.3
next prev parent reply other threads:[~2008-07-31 13:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 21:27 [PATCH][RESEND] x86_emulator: Emulate cld and std instruction Mohammed Gamal
2008-07-31 9:57 ` Avi Kivity
2008-07-31 10:25 ` Mohammed Gamal
2008-07-31 10:50 ` Avi Kivity
2008-07-31 13:27 ` Mohammed Gamal [this message]
2008-07-31 18:16 ` Andrea Arcangeli
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=20080731132714.GA8990@mohd-laptop \
--to=m.gamal005@gmail.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=riel@surriel.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