Skip to contentSkip to conversation

KVM: MCE: Fix compiling without CONFIG_X86_MCE

PATCH Applied Huang Ying 2 participants 2 messages Jun 9, 2009 – Jun 10, 2009

Subsystems (3)
lore
Share & tools
lore

Huang Ying

author
#0 lore raw

PATCH 1/1 KVM: MCE: Fix compiling without CONFIG_X86_MCE

Enclose do_machine_check with #ifdef CONFIG_X86_MCE.

---
 arch/x86/kvm/vmx.c |    2 ++
 1 file changed, 2 insertions(+)
arch/x86/kvm/vmx.c +2 -0
@@ -2623,12 +2623,14 @@ static int handle_rmode_exception(struct
  */
 static void kvm_machine_check(void)
 {
+#ifdef CONFIG_X86_MCE
 	struct pt_regs regs = {
 		.cs = 3, /* Fake ring 3 no matter what the guest ran on */
 		.flags = X86_EFLAGS_IF,
 	};
 
 	do_machine_check(&regs, 0);
+#endif
 }
 
 static int handle_machine_check(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
Applied
#1 lore raw
Quoted 6 lines · Huang Ying

Enclose do_machine_check with #ifdef CONFIG_X86_MCE.

Applied, thanks.

I would have preferred to select X86_MCE instead, but that doesn't do anything (need to select X86_MCE_INTEL as well, and that becomes fragile).

Signature · 1 line
error compiling committee.c: too many arguments to function