From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: [PATCH v2 1/4] x86/emul: Introduce a test covering legacy byte ops
Date: Tue, 30 Jan 2018 15:56:09 +0000 [thread overview]
Message-ID: <1517327772-22297-1-git-send-email-andrew.cooper3@citrix.com> (raw)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
v2:
* New
---
tools/tests/x86_emulator/test_x86_emulator.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tools/tests/x86_emulator/test_x86_emulator.c b/tools/tests/x86_emulator/test_x86_emulator.c
index 7a8df41..850fba6 100644
--- a/tools/tests/x86_emulator/test_x86_emulator.c
+++ b/tools/tests/x86_emulator/test_x86_emulator.c
@@ -442,6 +442,21 @@ int main(int argc, char **argv)
goto fail;
printf("okay\n");
+ printf("%-40s", "Testing xchgl %bl,%ah...");
+ instr[0] = 0x86; instr[1] = 0xdc;
+ regs.eflags = 0x200;
+ regs.eip = (unsigned long)&instr[0];
+ regs.eax = 0xaaaabbcc;
+ regs.ebx = 0xddddeeff;
+ rc = x86_emulate(&ctxt, &emulops);
+ if ( (rc != X86EMUL_OKAY) ||
+ (regs.eax != 0xaaaaffcc) ||
+ (regs.ebx != 0xddddeebb) ||
+ (regs.eflags != 0x200) ||
+ (regs.eip != (unsigned long)&instr[2]) )
+ goto fail;
+ printf("okay\n");
+
printf("%-40s", "Testing lock cmpxchgl %ecx,(%ebx)...");
instr[0] = 0xf0; instr[1] = 0x0f; instr[2] = 0xb1; instr[3] = 0x0b;
regs.eflags = 0x200;
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2018-01-30 15:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 15:56 Andrew Cooper [this message]
2018-01-30 15:56 ` [PATCH v2 2/4] x86/emul: Optimise decode_register() somewhat Andrew Cooper
2018-01-31 11:09 ` Jan Beulich
2018-01-30 15:56 ` [PATCH v2 3/4] x86/hvm: Improvements to external users of decode_register() Andrew Cooper
2018-01-30 15:56 ` [PATCH v2 4/4] x86/emul: Improvements to internal " Andrew Cooper
2018-01-31 11:17 ` Jan Beulich
2018-01-31 11:06 ` [PATCH v2 1/4] x86/emul: Introduce a test covering legacy byte ops Jan Beulich
2018-01-31 11:24 ` Andrew Cooper
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=1517327772-22297-1-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).