mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
x86: Optionally avoid injecting AO MCEs while others are pending
Allow to tell cpu_x86_inject_mce that it should ignore Action Optional MCE events when the target VCPU is still processing another one. This will be used by KVM soon. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> CC: Huang Ying <ying.huang@intel.com> CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> CC: Jin Dongming <jin.dongming@np.css.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
316378e4d0
commit
747461c76b
3 changed files with 28 additions and 10 deletions
|
@ -2709,12 +2709,15 @@ static void do_inject_mce(Monitor *mon, const QDict *qdict)
|
|||
uint64_t mcg_status = qdict_get_int(qdict, "mcg_status");
|
||||
uint64_t addr = qdict_get_int(qdict, "addr");
|
||||
uint64_t misc = qdict_get_int(qdict, "misc");
|
||||
int broadcast = qdict_get_try_bool(qdict, "broadcast", 0);
|
||||
int flags = MCE_INJECT_UNCOND_AO;
|
||||
|
||||
if (qdict_get_try_bool(qdict, "broadcast", 0)) {
|
||||
flags |= MCE_INJECT_BROADCAST;
|
||||
}
|
||||
for (cenv = first_cpu; cenv != NULL; cenv = cenv->next_cpu) {
|
||||
if (cenv->cpu_index == cpu_index) {
|
||||
cpu_x86_inject_mce(mon, cenv, bank, status, mcg_status, addr, misc,
|
||||
broadcast);
|
||||
flags);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue