diff options
author | Avi Kivity <avi@redhat.com> | 2010-11-22 15:53:21 (GMT) |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 09:29:53 (GMT) |
commit | da9cb575b1127f84984b8ad6d973dcc05ac036dd (patch) | |
tree | e0269a888731c630c9b64693b21d24b2821da362 /arch/x86/include | |
parent | a4ee1ca4a36e7857d90ae8c2b85f1bde9a042c10 (diff) | |
download | linux-da9cb575b1127f84984b8ad6d973dcc05ac036dd.tar.xz |
KVM: x86 emulator: introduce struct x86_exception to communicate faults
Introduce a structure that can contain an exception to be passed back
to main kvm code.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index b48c133..b7c1127 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h @@ -15,6 +15,12 @@ struct x86_emulate_ctxt; +struct x86_exception { + u8 vector; + bool error_code_valid; + u16 error_code; +}; + /* * x86_emulate_ops: * @@ -229,9 +235,8 @@ struct x86_emulate_ctxt { bool perm_ok; /* do not check permissions if true */ - int exception; /* exception that happens during emulation or -1 */ - u32 error_code; /* error code for exception */ - bool error_code_valid; + bool have_exception; + struct x86_exception exception; /* decode cache */ struct decode_cache decode; |