mirror of https://github.com/proxmox/mirror_qemu
x86, mce: ignore SRAO only when MCG_SER_P is available
And restruct this block to call kvm_mce_in_exception() only when it is required. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>master
parent
633aa0acfe
commit
f8502cfbbf
|
@ -239,12 +239,16 @@ static void kvm_do_inject_x86_mce(void *_data)
|
||||||
struct kvm_x86_mce_data *data = _data;
|
struct kvm_x86_mce_data *data = _data;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
/* If there is an MCE excpetion being processed, ignore this SRAO MCE */
|
/* If there is an MCE exception being processed, ignore this SRAO MCE */
|
||||||
r = kvm_mce_in_exception(data->env);
|
if ((data->env->mcg_cap & MCG_SER_P) &&
|
||||||
if (r == -1)
|
!(data->mce->status & MCI_STATUS_AR)) {
|
||||||
fprintf(stderr, "Failed to get MCE status\n");
|
r = kvm_mce_in_exception(data->env);
|
||||||
else if (r && !(data->mce->status & MCI_STATUS_AR))
|
if (r == -1) {
|
||||||
return;
|
fprintf(stderr, "Failed to get MCE status\n");
|
||||||
|
} else if (r) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
r = kvm_set_mce(data->env, data->mce);
|
r = kvm_set_mce(data->env, data->mce);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
|
|
Loading…
Reference in New Issue