Revision c34d440a target-i386/helper.c
b/target-i386/helper.c | ||
---|---|---|
27 | 27 |
#include "exec-all.h" |
28 | 28 |
#include "qemu-common.h" |
29 | 29 |
#include "kvm.h" |
30 |
#include "kvm_x86.h" |
|
31 | 30 |
#ifndef CONFIG_USER_ONLY |
32 | 31 |
#include "sysemu.h" |
33 | 32 |
#include "monitor.h" |
... | ... | |
1167 | 1166 |
}; |
1168 | 1167 |
unsigned bank_num = cenv->mcg_cap & 0xff; |
1169 | 1168 |
CPUState *env; |
1170 |
int flag = 0; |
|
1171 | 1169 |
|
1172 | 1170 |
if (!cenv->mcg_cap) { |
1173 | 1171 |
monitor_printf(mon, "MCE injection not supported\n"); |
... | ... | |
1187 | 1185 |
return; |
1188 | 1186 |
} |
1189 | 1187 |
|
1190 |
if (kvm_enabled()) { |
|
1191 |
if (flags & MCE_INJECT_BROADCAST) { |
|
1192 |
flag |= MCE_BROADCAST; |
|
1193 |
} |
|
1194 |
|
|
1195 |
kvm_inject_x86_mce(cenv, bank, status, mcg_status, addr, misc, flag); |
|
1196 |
} else { |
|
1197 |
run_on_cpu(cenv, do_inject_x86_mce, ¶ms); |
|
1198 |
if (flags & MCE_INJECT_BROADCAST) { |
|
1199 |
params.bank = 1; |
|
1200 |
params.status = MCI_STATUS_VAL | MCI_STATUS_UC; |
|
1201 |
params.mcg_status = MCG_STATUS_MCIP | MCG_STATUS_RIPV; |
|
1202 |
params.addr = 0; |
|
1203 |
params.misc = 0; |
|
1204 |
for (env = first_cpu; env != NULL; env = env->next_cpu) { |
|
1205 |
if (cenv == env) { |
|
1206 |
continue; |
|
1207 |
} |
|
1208 |
params.env = env; |
|
1209 |
run_on_cpu(cenv, do_inject_x86_mce, ¶ms); |
|
1188 |
run_on_cpu(cenv, do_inject_x86_mce, ¶ms); |
|
1189 |
if (flags & MCE_INJECT_BROADCAST) { |
|
1190 |
params.bank = 1; |
|
1191 |
params.status = MCI_STATUS_VAL | MCI_STATUS_UC; |
|
1192 |
params.mcg_status = MCG_STATUS_MCIP | MCG_STATUS_RIPV; |
|
1193 |
params.addr = 0; |
|
1194 |
params.misc = 0; |
|
1195 |
for (env = first_cpu; env != NULL; env = env->next_cpu) { |
|
1196 |
if (cenv == env) { |
|
1197 |
continue; |
|
1210 | 1198 |
} |
1199 |
params.env = env; |
|
1200 |
run_on_cpu(cenv, do_inject_x86_mce, ¶ms); |
|
1211 | 1201 |
} |
1212 | 1202 |
} |
1213 | 1203 |
} |
Also available in: Unified diff