@@ -984,7 +984,7 @@ X86CPU *cpu_x86_create(const char *cpu_model, Error **errp);
int cpu_x86_exec(CPUX86State *s);
void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf);
void x86_cpudef_setup(void);
-int cpu_x86_support_mca_broadcast(CPUX86State *env);
+int cpu_x86_support_mca_broadcast(X86CPU *cpu);
int cpu_get_pic_interrupt(CPUX86State *s);
/* MSDOS compatibility mode FPU exception support */
@@ -38,12 +38,12 @@ static void cpu_x86_version(CPUX86State *env, int *family, int *model)
}
/* Broadcast MCA signal for processor version 06H_EH and above */
-int cpu_x86_support_mca_broadcast(CPUX86State *env)
+int cpu_x86_support_mca_broadcast(X86CPU *cpu)
{
int family = 0;
int model = 0;
- cpu_x86_version(env, &family, &model);
+ cpu_x86_version(&cpu->env, &family, &model);
if ((family == 6 && model >= 14) || family > 6) {
return 1;
}
@@ -1148,7 +1148,7 @@ void cpu_x86_inject_mce(Monitor *mon, X86CPU *cpu, int bank,
return;
}
if ((flags & MCE_INJECT_BROADCAST)
- && !cpu_x86_support_mca_broadcast(cenv)) {
+ && !cpu_x86_support_mca_broadcast(cpu)) {
monitor_printf(mon, "Guest CPU does not support MCA broadcast\n");
return;
}
@@ -298,7 +298,6 @@ static int kvm_get_mce_cap_supported(KVMState *s, uint64_t *mce_cap,
static void kvm_mce_inject(X86CPU *cpu, hwaddr paddr, int code)
{
- CPUX86State *env = &cpu->env;
uint64_t status = MCI_STATUS_VAL | MCI_STATUS_UC | MCI_STATUS_EN |
MCI_STATUS_MISCV | MCI_STATUS_ADDRV | MCI_STATUS_S;
uint64_t mcg_status = MCG_STATUS_MCIP;
@@ -312,7 +311,7 @@ static void kvm_mce_inject(X86CPU *cpu, hwaddr paddr, int code)
}
cpu_x86_inject_mce(NULL, cpu, 9, status, mcg_status, paddr,
(MCM_ADDR_PHYS << 6) | 0xc,
- cpu_x86_support_mca_broadcast(env) ?
+ cpu_x86_support_mca_broadcast(cpu) ?
MCE_INJECT_BROADCAST : 0);
}
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- target-i386/cpu.h | 2 +- target-i386/helper.c | 6 +++--- target-i386/kvm.c | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-)