target-i386: Pass X86CPU to cpu_x86_inject_mce()
Needed for changing run_on_cpu() argument to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
bee615d4b9
commit
8c5cf3b621
@ -1988,7 +1988,8 @@ static void do_acl_remove(Monitor *mon, const QDict *qdict)
|
|||||||
#if defined(TARGET_I386)
|
#if defined(TARGET_I386)
|
||||||
static void do_inject_mce(Monitor *mon, const QDict *qdict)
|
static void do_inject_mce(Monitor *mon, const QDict *qdict)
|
||||||
{
|
{
|
||||||
CPUArchState *cenv;
|
X86CPU *cpu;
|
||||||
|
CPUX86State *cenv;
|
||||||
int cpu_index = qdict_get_int(qdict, "cpu_index");
|
int cpu_index = qdict_get_int(qdict, "cpu_index");
|
||||||
int bank = qdict_get_int(qdict, "bank");
|
int bank = qdict_get_int(qdict, "bank");
|
||||||
uint64_t status = qdict_get_int(qdict, "status");
|
uint64_t status = qdict_get_int(qdict, "status");
|
||||||
@ -2001,8 +2002,9 @@ static void do_inject_mce(Monitor *mon, const QDict *qdict)
|
|||||||
flags |= MCE_INJECT_BROADCAST;
|
flags |= MCE_INJECT_BROADCAST;
|
||||||
}
|
}
|
||||||
for (cenv = first_cpu; cenv != NULL; cenv = cenv->next_cpu) {
|
for (cenv = first_cpu; cenv != NULL; cenv = cenv->next_cpu) {
|
||||||
|
cpu = x86_env_get_cpu(cenv);
|
||||||
if (cenv->cpu_index == cpu_index) {
|
if (cenv->cpu_index == cpu_index) {
|
||||||
cpu_x86_inject_mce(mon, cenv, bank, status, mcg_status, addr, misc,
|
cpu_x86_inject_mce(mon, cpu, bank, status, mcg_status, addr, misc,
|
||||||
flags);
|
flags);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1135,7 +1135,7 @@ void do_cpu_sipi(X86CPU *cpu);
|
|||||||
#define MCE_INJECT_BROADCAST 1
|
#define MCE_INJECT_BROADCAST 1
|
||||||
#define MCE_INJECT_UNCOND_AO 2
|
#define MCE_INJECT_UNCOND_AO 2
|
||||||
|
|
||||||
void cpu_x86_inject_mce(Monitor *mon, CPUX86State *cenv, int bank,
|
void cpu_x86_inject_mce(Monitor *mon, X86CPU *cpu, int bank,
|
||||||
uint64_t status, uint64_t mcg_status, uint64_t addr,
|
uint64_t status, uint64_t mcg_status, uint64_t addr,
|
||||||
uint64_t misc, int flags);
|
uint64_t misc, int flags);
|
||||||
|
|
||||||
|
@ -1141,10 +1141,11 @@ static void do_inject_x86_mce(void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpu_x86_inject_mce(Monitor *mon, CPUX86State *cenv, int bank,
|
void cpu_x86_inject_mce(Monitor *mon, X86CPU *cpu, int bank,
|
||||||
uint64_t status, uint64_t mcg_status, uint64_t addr,
|
uint64_t status, uint64_t mcg_status, uint64_t addr,
|
||||||
uint64_t misc, int flags)
|
uint64_t misc, int flags)
|
||||||
{
|
{
|
||||||
|
CPUX86State *cenv = &cpu->env;
|
||||||
MCEInjectionParams params = {
|
MCEInjectionParams params = {
|
||||||
.mon = mon,
|
.mon = mon,
|
||||||
.env = cenv,
|
.env = cenv,
|
||||||
|
@ -243,7 +243,7 @@ static void kvm_mce_inject(X86CPU *cpu, hwaddr paddr, int code)
|
|||||||
status |= 0xc0;
|
status |= 0xc0;
|
||||||
mcg_status |= MCG_STATUS_RIPV;
|
mcg_status |= MCG_STATUS_RIPV;
|
||||||
}
|
}
|
||||||
cpu_x86_inject_mce(NULL, env, 9, status, mcg_status, paddr,
|
cpu_x86_inject_mce(NULL, cpu, 9, status, mcg_status, paddr,
|
||||||
(MCM_ADDR_PHYS << 6) | 0xc,
|
(MCM_ADDR_PHYS << 6) | 0xc,
|
||||||
cpu_x86_support_mca_broadcast(env) ?
|
cpu_x86_support_mca_broadcast(env) ?
|
||||||
MCE_INJECT_BROADCAST : 0);
|
MCE_INJECT_BROADCAST : 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user