diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-04-28 12:15:44 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 03:35:37 -0400 |
commit | 54b8486f469475d6c8e8aec917b91239a54eb8c8 (patch) | |
tree | a619826dc8e4915fcf308f3514a43615345e077a /arch/x86/include/asm/kvm_emulate.h | |
parent | 95cb229530f329ec8002274891793be9c91385f7 (diff) |
KVM: x86 emulator: do not inject exception directly into vcpu
Return exception as a result of instruction emulation and handle
injection in KVM code.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_emulate.h')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index a87d95f09572..51cfd730ac5d 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h | |||
@@ -216,6 +216,12 @@ struct x86_emulate_ctxt { | |||
216 | int interruptibility; | 216 | int interruptibility; |
217 | 217 | ||
218 | bool restart; /* restart string instruction after writeback */ | 218 | bool restart; /* restart string instruction after writeback */ |
219 | |||
220 | int exception; /* exception that happens during emulation or -1 */ | ||
221 | u32 error_code; /* error code for exception */ | ||
222 | bool error_code_valid; | ||
223 | unsigned long cr2; /* faulted address in case of #PF */ | ||
224 | |||
219 | /* decode cache */ | 225 | /* decode cache */ |
220 | struct decode_cache decode; | 226 | struct decode_cache decode; |
221 | }; | 227 | }; |