Revision 182735ef target-i386/helper.c
b/target-i386/helper.c | ||
---|---|---|
1188 | 1188 |
uint64_t status, uint64_t mcg_status, uint64_t addr, |
1189 | 1189 |
uint64_t misc, int flags) |
1190 | 1190 |
{ |
1191 |
CPUState *cs = CPU(cpu); |
|
1191 | 1192 |
CPUX86State *cenv = &cpu->env; |
1192 | 1193 |
MCEInjectionParams params = { |
1193 | 1194 |
.mon = mon, |
... | ... | |
1200 | 1201 |
.flags = flags, |
1201 | 1202 |
}; |
1202 | 1203 |
unsigned bank_num = cenv->mcg_cap & 0xff; |
1203 |
CPUX86State *env; |
|
1204 | 1204 |
|
1205 | 1205 |
if (!cenv->mcg_cap) { |
1206 | 1206 |
monitor_printf(mon, "MCE injection not supported\n"); |
... | ... | |
1220 | 1220 |
return; |
1221 | 1221 |
} |
1222 | 1222 |
|
1223 |
run_on_cpu(CPU(cpu), do_inject_x86_mce, ¶ms);
|
|
1223 |
run_on_cpu(cs, do_inject_x86_mce, ¶ms);
|
|
1224 | 1224 |
if (flags & MCE_INJECT_BROADCAST) { |
1225 |
CPUState *other_cs; |
|
1226 |
|
|
1225 | 1227 |
params.bank = 1; |
1226 | 1228 |
params.status = MCI_STATUS_VAL | MCI_STATUS_UC; |
1227 | 1229 |
params.mcg_status = MCG_STATUS_MCIP | MCG_STATUS_RIPV; |
1228 | 1230 |
params.addr = 0; |
1229 | 1231 |
params.misc = 0; |
1230 |
for (env = first_cpu; env != NULL; env = env->next_cpu) { |
|
1231 |
if (cenv == env) { |
|
1232 |
for (other_cs = first_cpu; other_cs != NULL; |
|
1233 |
other_cs = other_cs->next_cpu) { |
|
1234 |
if (other_cs == cs) { |
|
1232 | 1235 |
continue; |
1233 | 1236 |
} |
1234 |
params.cpu = x86_env_get_cpu(env);
|
|
1235 |
run_on_cpu(CPU(cpu), do_inject_x86_mce, ¶ms);
|
|
1237 |
params.cpu = X86_CPU(other_cs);
|
|
1238 |
run_on_cpu(other_cs, do_inject_x86_mce, ¶ms);
|
|
1236 | 1239 |
} |
1237 | 1240 |
} |
1238 | 1241 |
} |
Also available in: Unified diff