Revision 2bd3e04c target-i386/helper.c
b/target-i386/helper.c | ||
---|---|---|
110 | 110 |
qemu_free(env); |
111 | 111 |
} |
112 | 112 |
|
113 |
static void cpu_x86_version(CPUState *env, int *family, int *model) |
|
114 |
{ |
|
115 |
int cpuver = env->cpuid_version; |
|
116 |
|
|
117 |
if (family == NULL || model == NULL) { |
|
118 |
return; |
|
119 |
} |
|
120 |
|
|
121 |
*family = (cpuver >> 8) & 0x0f; |
|
122 |
*model = ((cpuver >> 12) & 0xf0) + ((cpuver >> 4) & 0x0f); |
|
123 |
} |
|
124 |
|
|
125 |
/* Broadcast MCA signal for processor version 06H_EH and above */ |
|
126 |
int cpu_x86_support_mca_broadcast(CPUState *env) |
|
127 |
{ |
|
128 |
int family = 0; |
|
129 |
int model = 0; |
|
130 |
|
|
131 |
cpu_x86_version(env, &family, &model); |
|
132 |
if ((family == 6 && model >= 14) || family > 6) { |
|
133 |
return 1; |
|
134 |
} |
|
135 |
|
|
136 |
return 0; |
|
137 |
} |
|
138 |
|
|
113 | 139 |
/***********************************************************/ |
114 | 140 |
/* x86 debug */ |
115 | 141 |
|
... | ... | |
1080 | 1106 |
return; |
1081 | 1107 |
} |
1082 | 1108 |
|
1109 |
if (broadcast) { |
|
1110 |
if (!cpu_x86_support_mca_broadcast(cenv)) { |
|
1111 |
fprintf(stderr, "Current CPU does not support broadcast\n"); |
|
1112 |
return; |
|
1113 |
} |
|
1114 |
} |
|
1115 |
|
|
1083 | 1116 |
if (kvm_enabled()) { |
1084 | 1117 |
if (broadcast) { |
1085 | 1118 |
flag |= MCE_BROADCAST; |
Also available in: Unified diff