Revision 4513d923
b/kvm-all.c | ||
---|---|---|
764 | 764 |
cpu_dump_state(env, stderr, fprintf, 0); |
765 | 765 |
if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) { |
766 | 766 |
fprintf(stderr, "emulation failure\n"); |
767 |
if (!kvm_arch_stop_on_emulation_error(env)) |
|
768 |
return; |
|
767 | 769 |
} |
768 | 770 |
/* FIXME: Should trigger a qmp message to let management know |
769 | 771 |
* something went wrong. |
b/kvm.h | ||
---|---|---|
140 | 140 |
|
141 | 141 |
void kvm_arch_update_guest_debug(CPUState *env, struct kvm_guest_debug *dbg); |
142 | 142 |
|
143 |
bool kvm_arch_stop_on_emulation_error(CPUState *env); |
|
144 |
|
|
143 | 145 |
int kvm_check_extension(KVMState *s, unsigned int extension); |
144 | 146 |
|
145 | 147 |
uint32_t kvm_arch_get_supported_cpuid(CPUState *env, uint32_t function, |
b/target-i386/kvm.c | ||
---|---|---|
1289 | 1289 |
} |
1290 | 1290 |
} |
1291 | 1291 |
#endif /* KVM_CAP_SET_GUEST_DEBUG */ |
1292 |
|
|
1293 |
bool kvm_arch_stop_on_emulation_error(CPUState *env) |
|
1294 |
{ |
|
1295 |
return !(env->cr[0] & CR0_PE_MASK) || |
|
1296 |
((env->segs[R_CS].selector & 3) != 3); |
|
1297 |
} |
|
1298 |
|
b/target-ppc/kvm.c | ||
---|---|---|
326 | 326 |
retval = atoi(ns); |
327 | 327 |
return retval; |
328 | 328 |
} |
329 |
|
|
330 |
bool kvm_arch_stop_on_emulation_error(CPUState *env) |
|
331 |
{ |
|
332 |
return true; |
|
333 |
} |
b/target-s390x/kvm.c | ||
---|---|---|
485 | 485 |
|
486 | 486 |
return ret; |
487 | 487 |
} |
488 |
|
|
489 |
bool kvm_arch_stop_on_emulation_error(CPUState *env) |
|
490 |
{ |
|
491 |
return true; |
|
492 |
} |
Also available in: Unified diff