diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-02-21 19:58:58 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-02-21 19:58:58 +0000 |
commit | fffb99beabd72d2422a7c12f119257d430095853 (patch) | |
tree | 5957c56e768390ed01341cc55f790178d7fa5d13 /xen/include/asm-x86/x86_emulate.h | |
parent | 5f7fc2a2756d9e7651eea9982806cb2fee3e2239 (diff) | |
download | xen-fffb99beabd72d2422a7c12f119257d430095853.tar.gz xen-fffb99beabd72d2422a7c12f119257d430095853.tar.bz2 xen-fffb99beabd72d2422a7c12f119257d430095853.zip |
x86: Extend emulator return codes.
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.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/xen/include/asm-x86/x86_emulate.h b/xen/include/asm-x86/x86_emulate.h index b38cc3f471..156b9efd8b 100644 --- a/xen/include/asm-x86/x86_emulate.h +++ b/xen/include/asm-x86/x86_emulate.h @@ -46,26 +46,32 @@ enum x86_segment { }; /* + * Return codes from state-accessor functions and from x86_emulate(). + */ + /* Completed successfully. State modified appropriately. */ +#define X86EMUL_OKAY 0 + /* Unhandleable access or emulation. No state modified. */ +#define X86EMUL_UNHANDLEABLE 1 + /* Exception raised and requires delivery. */ +#define X86EMUL_EXCEPTION 2 + /* Retry the emulation for some reason. No state modified. */ +#define X86EMUL_RETRY 3 + /* (cmpxchg accessor): CMPXCHG failed. Maps to X86EMUL_RETRY in caller. */ +#define X86EMUL_CMPXCHG_FAILED 3 + +/* * These operations represent the instruction emulator's interface to memory. * * NOTES: * 1. If the access fails (cannot emulate, or a standard access faults) then * it is up to the memop to propagate the fault to the guest VM via * some out-of-band mechanism, unknown to the emulator. The memop signals - * failure by returning X86EMUL_PROPAGATE_FAULT to the emulator, which will + * failure by returning X86EMUL_EXCEPTION to the emulator, which will * then immediately bail. * 2. Valid access sizes are 1, 2, 4 and 8 bytes. On x86/32 systems only * cmpxchg8b_emulated need support 8-byte accesses. * 3. The emulator cannot handle 64-bit mode emulation on an x86/32 system. */ -/* Access completed successfully: continue emulation as normal. */ -#define X86EMUL_CONTINUE 0 -/* Access is unhandleable: bail from emulation and return error to caller. */ -#define X86EMUL_UNHANDLEABLE 1 -/* Terminate emulation but return success to the caller. */ -#define X86EMUL_PROPAGATE_FAULT 2 /* propagate a generated fault to guest */ -#define X86EMUL_RETRY_INSTR 2 /* retry the instruction for some reason */ -#define X86EMUL_CMPXCHG_FAILED 2 /* cmpxchg did not see expected value */ struct x86_emulate_ops { /* |