[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/7] x86, mce: ignore SRAO only when MCG_SER_P is av
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH 1/7] x86, mce: ignore SRAO only when MCG_SER_P is available |
Date: |
Thu, 21 Oct 2010 16:25:47 -0200 |
From: Hidetoshi Seto <address@hidden>
And restruct this block to call kvm_mce_in_exception() only when it is
required.
Signed-off-by: Hidetoshi Seto <address@hidden>
Signed-off-by: Marcelo Tosatti <address@hidden>
---
target-i386/kvm.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 512d533..b813953 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -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) {
--
1.7.2.1
- [Qemu-devel] [PATCH 0/7] [PULL] qemu-kvm.git uq/master queue, Marcelo Tosatti, 2010/10/21
- [Qemu-devel] [PATCH 5/7] kvm: factor out kvm_has_msr_star, Marcelo Tosatti, 2010/10/21
- [Qemu-devel] [PATCH 4/7] kvm: add save/restore of MSR_VM_HSAVE_PA, Marcelo Tosatti, 2010/10/21
- [Qemu-devel] [PATCH 3/7] Fix build on !KVM_CAP_MCE, Marcelo Tosatti, 2010/10/21
- [Qemu-devel] [PATCH 7/7] kvm: save/restore x86-64 MSRs on x86-64 kernels, Marcelo Tosatti, 2010/10/21
- [Qemu-devel] [PATCH 1/7] x86, mce: ignore SRAO only when MCG_SER_P is available,
Marcelo Tosatti <=
- [Qemu-devel] [PATCH 6/7] kvm: writeback SMP TSCs on migration only, Marcelo Tosatti, 2010/10/21
- [Qemu-devel] [PATCH 2/7] x86, mce: broadcast mce depending on the cpu version, Marcelo Tosatti, 2010/10/21
- Re: [Qemu-devel] [PATCH 0/7] [PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2010/10/22