summaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-04-28 19:15:44 +0300
committerAvi Kivity <avi@redhat.com>2010-08-01 10:35:37 +0300
commit54b8486f469475d6c8e8aec917b91239a54eb8c8 (patch)
treea619826dc8e4915fcf308f3514a43615345e077a /arch/x86/include
parent95cb229530f329ec8002274891793be9c91385f7 (diff)
downloadblackbird-op-linux-54b8486f469475d6c8e8aec917b91239a54eb8c8.tar.gz
blackbird-op-linux-54b8486f469475d6c8e8aec917b91239a54eb8c8.zip
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')
-rw-r--r--arch/x86/include/asm/kvm_emulate.h6
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 {
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;
};
OpenPOWER on IntegriCloud