aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/x86_emulate.h
diff options
context:
space:
mode:
authorkaf24@localhost.localdomain <kaf24@localhost.localdomain>2006-12-03 17:15:48 +0000
committerkaf24@localhost.localdomain <kaf24@localhost.localdomain>2006-12-03 17:15:48 +0000
commitdf69bc855199b6a79e8dcf31ad48e9534d59d109 (patch)
tree1e2e23f97648ac602a3811148a3430072976797e /xen/include/asm-x86/x86_emulate.h
parent43bbe5bc9680630a963f44acb54fc0128d581384 (diff)
downloadxen-df69bc855199b6a79e8dcf31ad48e9534d59d109.tar.gz
xen-df69bc855199b6a79e8dcf31ad48e9534d59d109.tar.bz2
xen-df69bc855199b6a79e8dcf31ad48e9534d59d109.zip
[XEN] Add 'insn_fetch' memory operation to the x86_emulator.
This can be used to perform correct access checks, provide appropriate error codes when injecting faults, and to implement an instruction-stream prefetch cache (which is included here for HVM PTE update emulations). Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/asm-x86/x86_emulate.h')
-rw-r--r--xen/include/asm-x86/x86_emulate.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/xen/include/asm-x86/x86_emulate.h b/xen/include/asm-x86/x86_emulate.h
index ef23291cdc..89a42da7b0 100644
--- a/xen/include/asm-x86/x86_emulate.h
+++ b/xen/include/asm-x86/x86_emulate.h
@@ -56,7 +56,8 @@ struct x86_emulate_ops
/*
* All functions:
* @seg: [IN ] Segment being dereferenced (specified as x86_seg_??).
- * @offset [IN ] Offset within segment.
+ * @offset:[IN ] Offset within segment.
+ * @ctxt: [IN ] Emulation context info as passed to the emulator.
*/
/*
@@ -72,6 +73,17 @@ struct x86_emulate_ops
struct x86_emulate_ctxt *ctxt);
/*
+ * insn_fetch: Emulate fetch from instruction byte stream.
+ * Parameters are same as for 'read'. @seg is always x86_seg_cs.
+ */
+ int (*insn_fetch)(
+ enum x86_segment seg,
+ unsigned long offset,
+ unsigned long *val,
+ unsigned int bytes,
+ struct x86_emulate_ctxt *ctxt);
+
+ /*
* write: Emulate a memory write.
* @val: [IN ] Value to write to memory (low-order bytes used as req'd).
* @bytes: [IN ] Number of bytes to write to memory.