aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-06-11 08:43:28 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:32:52 -0400
commit3f5d18a96577fd78277e08c467041573b9a65eaf (patch)
tree5c9e15a3b48d188729bb77283cf353fd42903155 /include
parent988a2cae6a3c0dea6df59808a935a9a697bfc28c (diff)
KVM: Return to userspace on emulation failure
Instead of mindlessly retrying to execute the instruction, report the failure to userspace. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kvm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 5037e170a70d..671051829da6 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -95,6 +95,10 @@ struct kvm_pit_config {
95#define KVM_EXIT_S390_RESET 14 95#define KVM_EXIT_S390_RESET 14
96#define KVM_EXIT_DCR 15 96#define KVM_EXIT_DCR 15
97#define KVM_EXIT_NMI 16 97#define KVM_EXIT_NMI 16
98#define KVM_EXIT_INTERNAL_ERROR 17
99
100/* For KVM_EXIT_INTERNAL_ERROR */
101#define KVM_INTERNAL_ERROR_EMULATION 1
98 102
99/* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ 103/* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */
100struct kvm_run { 104struct kvm_run {
@@ -181,6 +185,9 @@ struct kvm_run {
181 __u32 data; 185 __u32 data;
182 __u8 is_write; 186 __u8 is_write;
183 } dcr; 187 } dcr;
188 struct {
189 __u32 suberror;
190 } internal;
184 /* Fix the size of the union. */ 191 /* Fix the size of the union. */
185 char padding[256]; 192 char padding[256];
186 }; 193 };