提交 f8502cfb 编写于 作者: H Hidetoshi Seto 提交者: Marcelo Tosatti

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: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
上级 633aa0ac
......@@ -239,12 +239,16 @@ static void kvm_do_inject_x86_mce(void *_data)
struct kvm_x86_mce_data *data = _data;
int r;
/* If there is an MCE excpetion being processed, ignore this SRAO MCE */
r = kvm_mce_in_exception(data->env);
if (r == -1)
fprintf(stderr, "Failed to get MCE status\n");
else if (r && !(data->mce->status & MCI_STATUS_AR))
return;
/* If there is an MCE exception being processed, ignore this SRAO MCE */
if ((data->env->mcg_cap & MCG_SER_P) &&
!(data->mce->status & MCI_STATUS_AR)) {
r = kvm_mce_in_exception(data->env);
if (r == -1) {
fprintf(stderr, "Failed to get MCE status\n");
} else if (r) {
return;
}
}
r = kvm_set_mce(data->env, data->mce);
if (r < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册