diff options
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r-- | target-i386/kvm.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 4004de76dd..8b868ad40a 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -264,11 +264,13 @@ static void kvm_do_inject_x86_mce(void *_data) } } } + +static void kvm_mce_broadcast_rest(CPUState *env); #endif void kvm_inject_x86_mce(CPUState *cenv, int bank, uint64_t status, uint64_t mcg_status, uint64_t addr, uint64_t misc, - int abort_on_error) + int flag) { #ifdef KVM_CAP_MCE struct kvm_x86_mce mce = { @@ -288,10 +290,15 @@ void kvm_inject_x86_mce(CPUState *cenv, int bank, uint64_t status, return; } + if (flag & MCE_BROADCAST) { + kvm_mce_broadcast_rest(cenv); + } + run_on_cpu(cenv, kvm_do_inject_x86_mce, &data); #else - if (abort_on_error) + if (flag & ABORT_ON_ERROR) { abort(); + } #endif } @@ -1716,7 +1723,8 @@ static void kvm_mce_broadcast_rest(CPUState *env) continue; } kvm_inject_x86_mce(cenv, 1, MCI_STATUS_VAL | MCI_STATUS_UC, - MCG_STATUS_MCIP | MCG_STATUS_RIPV, 0, 0, 1); + MCG_STATUS_MCIP | MCG_STATUS_RIPV, 0, 0, + ABORT_ON_ERROR); } } } @@ -1816,7 +1824,7 @@ int kvm_on_sigbus(int code, void *addr) | 0xc0; kvm_inject_x86_mce(first_cpu, 9, status, MCG_STATUS_MCIP | MCG_STATUS_RIPV, paddr, - (MCM_ADDR_PHYS << 6) | 0xc, 1); + (MCM_ADDR_PHYS << 6) | 0xc, ABORT_ON_ERROR); kvm_mce_broadcast_rest(first_cpu); } else #endif |