aboutsummaryrefslogtreecommitdiffstats
path: root/tools/tests
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-06-30 14:19:09 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-06-30 14:19:09 +0100
commit1be51142f1bc756a5d7b5f55146af2fab8a6d89b (patch)
tree66650fd91c71490c95c353a93b9fca6e961cb7cc /tools/tests
parent04465fbeb9188b148101cff73994496c40355582 (diff)
downloadxen-1be51142f1bc756a5d7b5f55146af2fab8a6d89b.tar.gz
xen-1be51142f1bc756a5d7b5f55146af2fab8a6d89b.tar.bz2
xen-1be51142f1bc756a5d7b5f55146af2fab8a6d89b.zip
x86_emulate: read/write/insn_fetch emulation hooks now all take a
pointer to emulator data buffer, and an arbitrary byte count (up to the size of a page of memory). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'tools/tests')
-rw-r--r--tools/tests/test_x86_emulator.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/tests/test_x86_emulator.c b/tools/tests/test_x86_emulator.c
index c325887ffc..4215686888 100644
--- a/tools/tests/test_x86_emulator.c
+++ b/tools/tests/test_x86_emulator.c
@@ -22,23 +22,22 @@
static int read(
unsigned int seg,
unsigned long offset,
- unsigned long *val,
+ void *p_data,
unsigned int bytes,
struct x86_emulate_ctxt *ctxt)
{
- *val = 0;
- memcpy(val, (void *)offset, bytes);
+ memcpy(p_data, (void *)offset, bytes);
return X86EMUL_OKAY;
}
static int write(
unsigned int seg,
unsigned long offset,
- unsigned long val,
+ void *p_data,
unsigned int bytes,
struct x86_emulate_ctxt *ctxt)
{
- memcpy((void *)offset, &val, bytes);
+ memcpy((void *)offset, p_data, bytes);
return X86EMUL_OKAY;
}