diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-02-09 10:04:34 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-03-03 16:40:02 +0100 |
commit | 4d39892cca86a9162beaa3944057d118ef42edcd (patch) | |
tree | 4848f257f09d798d7ab35b3a3ced3e089ca2417a /kvm-all.c | |
parent | a16fc07ebd58da51d5e1c2928069879c40a26f59 (diff) |
KVM: remove kvm_arch_on_sigbus
Build it on kvm_arch_on_sigbus_vcpu instead. They do the same
for "action optional" SIGBUSes, and the main thread should never get
"action required" SIGBUSes because it blocks the signal.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -2391,6 +2391,7 @@ int kvm_set_signal_mask(CPUState *cpu, const sigset_t *sigset) return r; } + int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr) { return kvm_arch_on_sigbus_vcpu(cpu, code, addr); @@ -2398,7 +2399,13 @@ int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr) int kvm_on_sigbus(int code, void *addr) { - return kvm_arch_on_sigbus(code, addr); + /* Action required MCE kills the process if SIGBUS is blocked. Because + * that's what happens in the I/O thread, where we handle MCE via signalfd, + * we can only get action optional here. + */ + assert(code != BUS_MCEERR_AR); + kvm_arch_on_sigbus_vcpu(first_cpu, code, addr); + return 0; } int kvm_create_device(KVMState *s, uint64_t type, bool test) |