Re: [PATCH 8/8] KVM: SVM: Handle MCE intercepts always on host level

Previous thread: [PATCH 3/8] KVM: SVM: Sync cr0 and cr3 to kvm state before nested handling by Joerg Roedel on Thursday, April 22, 2010 - 3:33 am. (4 messages)

Next thread: [PATCH 2/8] KVM: SVM: Make sure rip is synced to vmcb before nested vmexit by Joerg Roedel on Thursday, April 22, 2010 - 3:33 am. (1 message)
From: Joerg Roedel
Date: Thursday, April 22, 2010 - 3:33 am

This patch prevents MCE intercepts from being propagated
into the L1 guest if they happened in an L2 guest.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 arch/x86/kvm/svm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 30e49fe..889f660 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1651,6 +1651,7 @@ static int nested_svm_exit_special(struct vcpu_svm *svm)
 	switch (exit_code) {
 	case SVM_EXIT_INTR:
 	case SVM_EXIT_NMI:
+	case SVM_EXIT_EXCP_BASE + MC_VECTOR:
 		return NESTED_EXIT_HOST;
 	case SVM_EXIT_NPF:
 		/* For now we are always handling NPFs when using them */
-- 
1.7.0.4


--

From: Alexander Graf
Date: Friday, April 23, 2010 - 6:58 am

Good catch. How did you stumble over this?

Ack.

Alex

--

From: Joerg Roedel
Date: Friday, April 23, 2010 - 7:28 am

While thinking about another issue which I can't disclose
right now ;-) Stay tuned...

	Joerg


--

Previous thread: [PATCH 3/8] KVM: SVM: Sync cr0 and cr3 to kvm state before nested handling by Joerg Roedel on Thursday, April 22, 2010 - 3:33 am. (4 messages)

Next thread: [PATCH 2/8] KVM: SVM: Make sure rip is synced to vmcb before nested vmexit by Joerg Roedel on Thursday, April 22, 2010 - 3:33 am. (1 message)