Skip to content

Commit

Permalink
KVM: x86 emulator: do not inject exception directly into vcpu
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gleb Natapov authored and Avi Kivity committed Aug 1, 2010
1 parent 95cb229 commit 54b8486
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 50 deletions.
6 changes: 6 additions & 0 deletions arch/x86/include/asm/kvm_emulate.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ struct x86_emulate_ctxt {
int interruptibility;

bool restart; /* restart string instruction after writeback */

int exception; /* exception that happens during emulation or -1 */
u32 error_code; /* error code for exception */
bool error_code_valid;
unsigned long cr2; /* faulted address in case of #PF */

/* decode cache */
struct decode_cache decode;
};
Expand Down
Loading

0 comments on commit 54b8486

Please sign in to comment.